Package org.hibernate.id.insert
Class InsertReturningDelegate
- java.lang.Object
- org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
- org.hibernate.id.insert.AbstractReturningDelegate
- org.hibernate.id.insert.InsertReturningDelegate
- All Implemented Interfaces:
GeneratedValuesMutationDelegate,InsertGeneratedIdentifierDelegate
public classInsertReturningDelegateextendsAbstractReturningDelegate
Delegate for dealing with generated values where the dialect supports returning the generated column directly from the mutation statement.
Field Summary
Fields inherited from class org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
jdbcValuesMappingProducer,persister
Constructor Summary
Constructors Constructor Description InsertReturningDelegate(PostInsertIdentityPersister persister,Dialect dialect)Deprecated, for removal: This API element is subject to removal in a future version.InsertReturningDelegate(EntityPersister persister,EventType timing)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableMutationBuilder<?>createTableMutationBuilder(Expectation expectation,SessionFactoryImplementor sessionFactory)Create aTableMutationBuilderinstance used to build table mutations for this delegate.protectedGeneratedValuesexecuteAndExtractReturning(String sql,PreparedStatement preparedStatement,SharedSessionContractImplementor session)StringprepareIdentifierGeneratingInsert(String insertSQL)Append SQL specific to this delegate's mode of handling generated primary key values to the giveninsertstatement.PreparedStatementprepareStatement(String sql,SharedSessionContractImplementor session)Create aPreparedStatementfrom the providedsqlbased on the delegate needs.Methods inherited from class org.hibernate.id.insert.AbstractReturningDelegate
executeAndExtract,performInsertReturning,performMutation,releaseStatement
Methods inherited from class org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
dialect,getGeneratedValuesMappingProducer,getTiming,supportsArbitraryValues,supportsRowId
Methods inherited from class java.lang.Object
clone,equals,finalize,getClass,hashCode,notify,notifyAll,toString,wait,wait,wait
Methods inherited from interface org.hibernate.generator.values.GeneratedValuesMutationDelegate
getGeneratedValuesMappingProducer,getTiming,supportsArbitraryValues,supportsRowId
Methods inherited from interface org.hibernate.id.insert.InsertGeneratedIdentifierDelegate
createTableInsertBuilder,performInsert,performInsert
Constructor Detail
InsertReturningDelegate
@Deprecated(forRemoval=true,since="6.5")public InsertReturningDelegate(PostInsertIdentityPersister persister,Dialect dialect)
Deprecated, for removal: This API element is subject to removal in a future version.
InsertReturningDelegate
public InsertReturningDelegate(EntityPersister persister,EventType timing)
Method Detail
createTableMutationBuilder
public TableMutationBuilder<?> createTableMutationBuilder(Expectation expectation,SessionFactoryImplementor sessionFactory)
Description copied from interface:GeneratedValuesMutationDelegateCreate aTableMutationBuilderinstance used to build table mutations for this delegate.
executeAndExtractReturning
protected GeneratedValues executeAndExtractReturning(String sql,PreparedStatement preparedStatement,SharedSessionContractImplementor session)
- Specified by:
executeAndExtractReturningin classAbstractReturningDelegate
prepareIdentifierGeneratingInsert
public String prepareIdentifierGeneratingInsert(String insertSQL)
Description copied from interface:InsertGeneratedIdentifierDelegateAppend SQL specific to this delegate's mode of handling generated primary key values to the giveninsertstatement.- Returns:
- The processed
insertstatement string
prepareStatement
public PreparedStatement prepareStatement(String sql,SharedSessionContractImplementor session)
Description copied from interface:GeneratedValuesMutationDelegateCreate aPreparedStatementfrom the providedsqlbased on the delegate needs.