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:
OnExecutionGenerator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TableMutationBuilder<?>
createTableMutationBuilder(Expectation expectation, SessionFactoryImplementor sessionFactory)
Create aTableMutationBuilder
instance used to build table mutations for this delegate.JdbcValuesMappingProducer
getGeneratedValuesMappingProducer()
Retrieve the mapping producer used to read the generated values.EventType
getTiming()
Returns the timing this generated values delegate handles.GeneratedValues
performMutation(PreparedStatementDetails statementDetails, JdbcValueBindings valueBindings, Object entity, SharedSessionContractImplementor session)
Perform themutation
and extract the database-generated values.PreparedStatement
prepareStatement(String sql, SharedSessionContractImplementor session)
Create aPreparedStatement
from the providedsql
based on the delegate needs.boolean
supportsArbitraryValues()
Returnstrue
when this delegate supports retrieving arbitrary generated values, orfalse
when it only supports identifiers.boolean
supportsRowId()
Returnstrue
when this delegate supports retrieving theRowId
value.
-
-
-
Method Detail
-
createTableMutationBuilder
TableMutationBuilder<?> createTableMutationBuilder(Expectation expectation, SessionFactoryImplementor sessionFactory)
Create aTableMutationBuilder
instance used to build table mutations for this delegate.
-
prepareStatement
PreparedStatement prepareStatement(String sql, SharedSessionContractImplementor session)
Create aPreparedStatement
from the providedsql
based on the delegate needs.
-
performMutation
GeneratedValues performMutation(PreparedStatementDetails statementDetails, JdbcValueBindings valueBindings, Object entity, SharedSessionContractImplementor session)
Perform themutation
and extract the database-generated values.
-
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.
-
-