public final class Update extends AbstractRowBuilder<Update> implements UpdateScript, WhereClauseBuilder<Update>
UpdateableDataContext
. Instead of providing a custom implementation
of the UpdateScript
interface, one can use this pre-built update
implementation. Some DataContext
s may even optimize specifically
based on the knowledge that there will only be a single update statement
executed.Constructor and Description |
---|
Update(Schema schema,
String tableName) |
Update(Table table) |
Modifier and Type | Method and Description |
---|---|
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
|
getColumns, getExplicitNulls, getStyles, getValues, isSet, toRow, value, value, value, value, value, value
public Update(Table table)
public Table getTable()
RowBuilder
getTable
in interface RowBuilder<Update>
public void run(UpdateCallback callback)
UpdateScript
UpdateCallback
.run
in interface UpdateScript
run
in interface Action<UpdateCallback>
public FilterBuilder<Update> where(Column column)
WhereClauseBuilder
where
in interface WhereClauseBuilder<Update>
column
- a column to apply a criteria forpublic FilterBuilder<Update> where(String columnName)
WhereClauseBuilder
where
in interface WhereClauseBuilder<Update>
columnName
- the name of the colum to which the criteria will be appliedpublic Update where(FilterItem... filterItems)
WhereClauseBuilder
where
in interface WhereClauseBuilder<Update>
filterItems
- the where items to setpublic Update where(Iterable<FilterItem> filterItems)
WhereClauseBuilder
where
in interface WhereClauseBuilder<Update>
filterItems
- the where items to setCopyright © 2007–2014 The Apache Software Foundation. All rights reserved.