Package org.hibernate.generator.values
Interface GeneratedValuesMutationDelegate
- All Known Subinterfaces:
InsertGeneratedIdentifierDelegate
- All Known Implementing Classes:
AbstractGeneratedValuesMutationDelegate
,AbstractReturningDelegate
,AbstractSelectingDelegate
,BasicSelectingDelegate
,GetGeneratedKeysDelegate
,InsertReturningDelegate
,Oracle12cGetGeneratedKeysDelegate
,SybaseJConnGetGeneratedKeysDelegate
,UniqueKeySelectingDelegate
public interface GeneratedValuesMutationDelegate
Each implementation defines a strategy for retrieving values
generated by
the database after execution of a mutation statement.
An implementation controls:
- building the SQL mutation statement, and
- retrieving the generated values using JDBC.
- Since:
- 6.5
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateTableMutationBuilder
(Expectation expectation, SessionFactoryImplementor sessionFactory) Create aTableMutationBuilder
instance used to build table mutations for this delegate.Retrieve the mapping producer used to read the generated values.Returns the timing this generated values delegate handles.performMutation
(PreparedStatementDetails statementDetails, JdbcValueBindings valueBindings, Object entity, SharedSessionContractImplementor session) Perform themutation
and extract the database-generated values.prepareStatement
(String sql, SharedSessionContractImplementor session) Create aPreparedStatement
from the providedsql
based on the delegate needs.boolean
Returnstrue
when this delegate supports retrieving arbitrary generated values, orfalse
when it only supports identifiers.boolean
Returnstrue
when this delegate supports retrieving theRowId
value.
-
Method Details
-
createTableMutationBuilder
TableMutationBuilder<?> createTableMutationBuilder(Expectation expectation, SessionFactoryImplementor sessionFactory) Create aTableMutationBuilder
instance used to build table mutations for this delegate. -
getTiming
EventType getTiming()Returns the timing this generated values delegate handles. -
supportsArbitraryValues
boolean supportsArbitraryValues()Returnstrue
when this delegate supports retrieving arbitrary generated values, orfalse
when it only supports identifiers. -
supportsRowId
boolean supportsRowId()Returnstrue
when this delegate supports retrieving theRowId
value. -
getGeneratedValuesMappingProducer
JdbcValuesMappingProducer getGeneratedValuesMappingProducer()Retrieve the mapping producer used to read the generated values.
-