org.eobjects.metamodel.update
Class Update

java.lang.Object
  extended by org.eobjects.metamodel.data.AbstractRowBuilder<InsertInto>
      extended by org.eobjects.metamodel.update.Update
All Implemented Interfaces:
RowBuilder<InsertInto>, WhereClauseBuilder<Update>, UpdateScript, Action<UpdateCallback>

public final class Update
extends AbstractRowBuilder<InsertInto>
implements UpdateScript, WhereClauseBuilder<Update>

Represents a single UPDATE operation to be applied to a UpdateableDataContext. Instead of providing a custom implementation of the UpdateScript interface, one can use this pre-built update implementation. Some DataContexts may even optimize specifically based on the knowledge that there will only be a single update statement executed.


Constructor Summary
Update(Table table)
           
 
Method Summary
 Table getTable()
          Gets the table that this row builder pertains to.
 void run(UpdateCallback callback)
          Invoked by MetaModel when the update script should be run.
 FilterBuilder<Update> where(Column column)
          Defines a where item to set as a criteria
 Update where(FilterItem... filterItems)
          Applies where items to set criteria
 Update where(Iterable<FilterItem> filterItems)
          Applies where items to set criteria
 FilterBuilder<Update> where(String columnName)
          Defines a where item to set as a criteria
 
Methods inherited from class org.eobjects.metamodel.data.AbstractRowBuilder
getColumns, getExplicitNulls, getStyles, getValues, isSet, toRow, value, value, value, value, value, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Update

public Update(Table table)
Method Detail

getTable

public Table getTable()
Description copied from interface: RowBuilder
Gets the table that this row builder pertains to.

Specified by:
getTable in interface RowBuilder<InsertInto>
Returns:
the table that this row builder pertains to.

run

public void run(UpdateCallback callback)
Description copied from interface: UpdateScript
Invoked by MetaModel when the update script should be run. User should implement this method and invoke update operations on the UpdateCallback.

Specified by:
run in interface UpdateScript
Specified by:
run in interface Action<UpdateCallback>

where

public FilterBuilder<Update> where(Column column)
Description copied from interface: WhereClauseBuilder
Defines a where item to set as a criteria

Specified by:
where in interface WhereClauseBuilder<Update>
Parameters:
column - a column to apply a criteria for
Returns:
a builder object for further building the where item

where

public FilterBuilder<Update> where(String columnName)
Description copied from interface: WhereClauseBuilder
Defines a where item to set as a criteria

Specified by:
where in interface WhereClauseBuilder<Update>
Parameters:
columnName - the name of the colum to which the criteria will be applied
Returns:
a builder object for further building the where item

where

public Update where(FilterItem... filterItems)
Description copied from interface: WhereClauseBuilder
Applies where items to set criteria

Specified by:
where in interface WhereClauseBuilder<Update>
Parameters:
filterItems - the where items to set
Returns:
the builder object itself, for further building of the update

where

public Update where(Iterable<FilterItem> filterItems)
Description copied from interface: WhereClauseBuilder
Applies where items to set criteria

Specified by:
where in interface WhereClauseBuilder<Update>
Parameters:
filterItems - the where items to set
Returns:
the builder object, for further building of the update


Copyright © 2007-2013. All Rights Reserved.