java.lang.Object
org.seasar.doma.jdbc.query.AbstractQuery
org.seasar.doma.jdbc.query.SqlModifyQuery
org.seasar.doma.jdbc.query.SqlUpdateQuery
- All Implemented Interfaces:
ModifyQuery,Query,UpdateQuery
A query that executes a SQL UPDATE statement.
This class extends SqlModifyQuery to provide functionality for executing UPDATE
statements. It sets the SQL kind to SqlKind.UPDATE to indicate that this query performs
an UPDATE operation.
-
Field Summary
Fields inherited from class org.seasar.doma.jdbc.query.SqlModifyQuery
kind, optimisticLockCheckRequired, parameters, sql, sqlLogType, sqlNodeFields 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 number for the entity being updated.Methods inherited from class org.seasar.doma.jdbc.query.SqlModifyQuery
addParameter, clearParameters, complete, getSql, getSqlExecutionSkipCause, getSqlLogType, isAutoGeneratedKeysSupported, isExecutable, isOptimisticLockCheckRequired, prepare, prepareOptions, prepareSql, 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.ModifyQuery
getSql, getSqlExecutionSkipCause, getSqlLogType, isAutoGeneratedKeysSupported, isExecutable, isOptimisticLockCheckRequiredMethods inherited from interface org.seasar.doma.jdbc.query.Query
comment, complete, getClassName, getConfig, getMethod, getMethodName, getQueryTimeout, prepare
-
Constructor Details
-
SqlUpdateQuery
public SqlUpdateQuery()Constructs a new instance.This constructor initializes the query with
SqlKind.UPDATEto indicate that it performs an UPDATE operation.
-
-
Method Details
-
incrementVersion
public void incrementVersion()Increments the version number for the entity being updated.This method is called after executing the UPDATE statement to update the version number in the entity object, ensuring it matches the value 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:
incrementVersionin interfaceUpdateQuery
-