java.lang.Object
org.seasar.doma.jdbc.command.BatchModifyCommand<BatchUpdateQuery>
org.seasar.doma.jdbc.command.BatchUpdateCommand
- All Implemented Interfaces:
Command<int[]>
A command to execute a batch update.
This command executes SQL UPDATE statements in batch mode and increments version numbers if entities have optimistic lock control.
-
Field Summary
Fields inherited from class org.seasar.doma.jdbc.command.BatchModifyCommand
query -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int[]executeInternal(PreparedStatement preparedStatement, List<PreparedSql> sqls) Executes the batch update and increments version numbers.Methods inherited from class org.seasar.doma.jdbc.command.BatchModifyCommand
bindParameters, execute, executeBatch, executeBatch, getQuery, log, postExecuteBatch, prepareStatement, setupOptions, validateRows
-
Constructor Details
-
BatchUpdateCommand
Creates a new instance.- Parameters:
query- the batch update query
-
-
Method Details
-
executeInternal
protected int[] executeInternal(PreparedStatement preparedStatement, List<PreparedSql> sqls) throws SQLException Executes the batch update and increments version numbers.- Specified by:
executeInternalin classBatchModifyCommand<BatchUpdateQuery>- Parameters:
preparedStatement- the prepared statementsqls- the SQL statements- Returns:
- the array of updated rows count
- Throws:
SQLException- if a database access error occurs
-