java.lang.Object
org.seasar.doma.jdbc.query.AbstractQuery
org.seasar.doma.jdbc.query.SqlBatchModifyQuery
org.seasar.doma.jdbc.query.SqlBatchUpdateQuery
- All Implemented Interfaces:
BatchModifyQuery,BatchUpdateQuery,Query
A query that performs batch update operations using SQL statements.
This class extends SqlBatchModifyQuery to provide functionality for executing batch
UPDATE statements. It initializes the SQL kind to SqlKind.UPDATE to indicate that this
query performs UPDATE operations.
-
Field Summary
Fields inherited from class org.seasar.doma.jdbc.query.SqlBatchModifyQuery
batchSize, kind, optimisticLockCheckRequired, parameters, parameterSize, sqlLogType, sqlNode, sqlsFields inherited from class org.seasar.doma.jdbc.query.AbstractQuery
callerClassName, callerMethodName, config, message, method, queryTimeout -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIncrements the version numbers for all entities in the batch.Methods inherited from class org.seasar.doma.jdbc.query.SqlBatchModifyQuery
addParameter, clearParameters, complete, getBatchSize, getSql, getSqlExecutionSkipCause, getSqlLogType, getSqls, isAutoGeneratedKeysSupported, isExecutable, isOptimisticLockCheckRequired, prepare, prepareOptions, prepareSql, setBatchSize, setSqlLogType, setSqlNode, toStringMethods inherited from class org.seasar.doma.jdbc.query.AbstractQuery
comment, getClassName, getConfig, getMethod, getMethodName, getQueryTimeout, setCallerClassName, setCallerMethodName, setConfig, setMessage, setMethod, setQueryTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.seasar.doma.jdbc.query.BatchModifyQuery
getBatchSize, getSql, getSqlExecutionSkipCause, getSqlLogType, getSqls, isAutoGeneratedKeysSupported, isExecutable, isOptimisticLockCheckRequiredMethods inherited from interface org.seasar.doma.jdbc.query.Query
comment, complete, getClassName, getConfig, getMethod, getMethodName, getQueryTimeout, prepare
-
Constructor Details
-
SqlBatchUpdateQuery
public SqlBatchUpdateQuery()Constructs a new instance.This constructor initializes the query with
SqlKind.UPDATEto indicate that it performs UPDATE operations.
-
-
Method Details
-
incrementVersions
public void incrementVersions()Increments the version numbers for all entities in the batch.This method is called after executing the batch to update the version numbers in the entity objects, ensuring they match the values in the database after the update. This is important for optimistic concurrency control.
This implementation does nothing because this query does not support version incrementation.
- Specified by:
incrementVersionsin interfaceBatchUpdateQuery
-