Package org.hibernate.generator.values
Interface GeneratedValuesMutationDelegate
- All Known Subinterfaces:
InsertGeneratedIdentifierDelegate
- All Known Implementing Classes:
AbstractGeneratedValuesMutationDelegate,AbstractReturningDelegate,AbstractSelectingDelegate,BasicSelectingDelegate,GetGeneratedKeysDelegate,InsertReturningDelegate,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 aTableMutationBuilderinstance 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 themutationand extract the database-generated values.prepareStatement(String sql, SharedSessionContractImplementor session) Create aPreparedStatementfrom the providedsqlbased on the delegate needs.booleanReturnstruewhen this delegate supports retrieving arbitrary generated values, orfalsewhen it only supports identifiers.booleanReturnstruewhen this delegate supports retrieving theRowIdvalue.
-
Method Details
-
createTableMutationBuilder
TableMutationBuilder<?> createTableMutationBuilder(Expectation expectation, SessionFactoryImplementor sessionFactory) Create aTableMutationBuilderinstance used to build table mutations for this delegate. -
getTiming
EventType getTiming()Returns the timing this generated values delegate handles. -
supportsArbitraryValues
boolean supportsArbitraryValues()Returnstruewhen this delegate supports retrieving arbitrary generated values, orfalsewhen it only supports identifiers. -
supportsRowId
boolean supportsRowId()Returnstruewhen this delegate supports retrieving theRowIdvalue. -
getGeneratedValuesMappingProducer
JdbcValuesMappingProducer getGeneratedValuesMappingProducer()Retrieve the mapping producer used to read the generated values.
-