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 GeneratedValuesMutationDelegateEach 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:
OnExecutionGenerator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TableMutationBuilder<?>createTableMutationBuilder(Expectation expectation, SessionFactoryImplementor sessionFactory)Create aTableMutationBuilderinstance used to build table mutations for this delegate.JdbcValuesMappingProducergetGeneratedValuesMappingProducer()Retrieve the mapping producer used to read the generated values.EventTypegetTiming()Returns the timing this generated values delegate handles.GeneratedValuesperformMutation(PreparedStatementDetails statementDetails, JdbcValueBindings valueBindings, Object entity, SharedSessionContractImplementor session)Perform themutationand extract the database-generated values.PreparedStatementprepareStatement(String sql, SharedSessionContractImplementor session)Create aPreparedStatementfrom the providedsqlbased on the delegate needs.booleansupportsArbitraryValues()Returnstruewhen this delegate supports retrieving arbitrary generated values, orfalsewhen it only supports identifiers.booleansupportsRowId()Returnstruewhen this delegate supports retrieving theRowIdvalue.
-
-
-
Method Detail
-
createTableMutationBuilder
TableMutationBuilder<?> createTableMutationBuilder(Expectation expectation, SessionFactoryImplementor sessionFactory)
Create aTableMutationBuilderinstance used to build table mutations for this delegate.
-
prepareStatement
PreparedStatement prepareStatement(String sql, SharedSessionContractImplementor session)
Create aPreparedStatementfrom the providedsqlbased on the delegate needs.
-
performMutation
GeneratedValues performMutation(PreparedStatementDetails statementDetails, JdbcValueBindings valueBindings, Object entity, SharedSessionContractImplementor session)
Perform themutationand extract the database-generated values.
-
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.
-
-