R - class type which contains members for columns of a row in a tablepublic class UpdateOperation<R> extends ModifyOperation<R>
| Constructor and Description |
|---|
UpdateOperation(Table<R> table)
Constructs standard sql update for primary key as:
UPDATE table SET c1=?, c2=?, c3... |
UpdateOperation(Table<R> table,
java.lang.String whereConditionName)
Constructs for standard sql update statement as:
UPDATE table SET c1=?, c2=?, c3... |
| Modifier and Type | Method and Description |
|---|---|
protected void |
initBaseSql()
Sets base sql with
SqlOperation.setBaseSql(String). |
protected java.util.List<CascadeOperation<R,?>> |
prepareCascades(java.lang.reflect.Field field)
Creates and prepares cascade operations based upon cascade annotations for a field.
|
int |
update(java.lang.Object... parameters)
Updates rows based upon parameters.
|
int |
update(R row)
Updates a row.
|
int |
updateAll(java.util.Collection<R> rows)
Updates all rows in collection.
|
close, execute, getRowsAffected, isBatch, modify, modify, modifyAll, postExecute, postExecuteCascade, preExecute, preExecuteCascade, setBatch, setParameters, setRow, setRows, setRows, setRows, setRowsAffectedcancel, cascade, closeCascades, closeStatement, createTargetField, getBaseSql, getConnection, getCustomSql, getNextParameter, getOperationTime, getParameters, getPreparedSql, getPreparedStatement, getQueryTimeout, getSql, getTable, getTargetTable, getTimingId, getWhereConditionName, getWhereTranslator, initOperationTime, isAutoGeneratedKeys, isIncludeIdentityColumns, isReadOnly, isTimings, logTimings, prepare, prepareCascades, prepareCheck, setAutoGeneratedKeys, setBaseSql, setCustomSql, setIncludeIdentityColumns, setNextParameter, setQueryTimeout, setReadOnly, setTimingId, setTimings, setWhere, setWhereTranslator, writeColumns, writeParameter, writeParameters, writeWherepublic UpdateOperation(Table<R> table) throws OperationException
table - update this tableOperationException - if errorpublic UpdateOperation(Table<R> table, java.lang.String whereConditionName) throws OperationException
table - update this tablewhereConditionName - name of where condition to use ("primaryKey" to update
by primary key; empty string to update all rows in table)OperationException - if errorpublic int update(R row) throws OperationException
ModifyOperation.modify(Object).row - row to use for parametersModifyOperation.getRowsAffected()OperationException - if errorpublic int updateAll(java.util.Collection<R> rows) throws OperationException
ModifyOperation.modifyAll(Collection).rows - collection of rows to use as parametersModifyOperation.getRowsAffected()OperationException - if errorpublic int update(java.lang.Object... parameters)
throws OperationException
ModifyOperation.modify(Object...).parameters - operation parameters as objects (see ModifyOperation.setParameters(Object...))OperationException - if errorprotected void initBaseSql()
SqlOperation.setBaseSql(String).protected java.util.List<CascadeOperation<R,?>> prepareCascades(java.lang.reflect.Field field) throws OperationException
prepareCascades in class SqlOperation<R>field - annotation is for this field of row class ROperationException - if error