- All Superinterfaces:
ModifyQuery,Query
- All Known Implementing Classes:
AutoInsertQuery,AutoMultiInsertQuery,CriteriaQuery,SqlFileInsertQuery,SqlInsertQuery
An interface for INSERT queries.
This interface represents a query that performs INSERT operations. It extends ModifyQuery to inherit common data modification functionality while specializing for INSERT
operations.
Implementations of this interface handle the execution of INSERT statements, including the construction of the column list, values clause, and generation of auto-generated keys or sequence values.
-
Method Summary
Modifier and TypeMethodDescriptionvoidgenerateId(Statement statement) Generates an ID for the inserted row.Methods 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
-
Method Details
-
generateId
Generates an ID for the inserted row.This method is called after executing the INSERT statement to retrieve and set auto-generated keys or sequence values for the entity. It's typically used for primary key generation strategies like identity columns or sequences.
- Parameters:
statement- the statement used for the INSERT operation
-