Package org.hibernate.id.insert
Interface InsertGeneratedIdentifierDelegate
- All Superinterfaces:
GeneratedValuesMutationDelegate
- All Known Implementing Classes:
AbstractReturningDelegate,AbstractSelectingDelegate,BasicSelectingDelegate,GetGeneratedKeysDelegate,InsertReturningDelegate,Oracle12cGetGeneratedKeysDelegate,SybaseJConnGetGeneratedKeysDelegate,UniqueKeySelectingDelegate
@Deprecated(forRemoval=true,
since="6.5")
public interface InsertGeneratedIdentifierDelegate
extends GeneratedValuesMutationDelegate
Deprecated, for removal: This API element is subject to removal in a future version.
Each implementation defines a strategy for retrieving a primary key
generated by
the database from the database after execution of an
insert
statement. The generated primary key is usually an IDENTITY
column, but in principle it might be something else, for example,
a value generated by a trigger.
An implementation controls:
- building the SQL
insertstatement, and - retrieving the generated identifier value using JDBC.
The implementation should be written to handle any instance of
OnExecutionGenerator.
- Author:
- Steve Ebersole
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault TableInsertBuildercreateTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor sessionFactory) Deprecated, for removal: This API element is subject to removal in a future version.Create aTableInsertBuilderwith any specific identity handling already built in.default ObjectperformInsert(String insertSQL, SharedSessionContractImplementor session, Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.Execute the giveninsertstatement and return the generated key value.default ObjectperformInsert(PreparedStatementDetails insertStatementDetails, JdbcValueBindings valueBindings, Object entity, SharedSessionContractImplementor session) Deprecated, for removal: This API element is subject to removal in a future version.Perform theinsertand extract the database-generated primary key value.performInsertReturning(String insertSQL, SharedSessionContractImplementor session, Binder binder) Deprecated, for removal: This API element is subject to removal in a future version.Execute the giveninsertstatement and return the generated key value.default StringprepareIdentifierGeneratingInsert(String insertSQL) Deprecated, for removal: This API element is subject to removal in a future version.Append SQL specific to this delegate's mode of handling generated primary key values to the giveninsertstatement.prepareStatement(String insertSql, SharedSessionContractImplementor session) Deprecated, for removal: This API element is subject to removal in a future version.Create aPreparedStatementfrom the providedsqlbased on the delegate needs.Methods inherited from interface org.hibernate.generator.values.GeneratedValuesMutationDelegate
createTableMutationBuilder, getGeneratedValuesMappingProducer, getTiming, performMutation, supportsArbitraryValues, supportsRowId
-
Method Details
-
createTableInsertBuilder
default TableInsertBuilder createTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor sessionFactory) Deprecated, for removal: This API element is subject to removal in a future version.Create aTableInsertBuilderwith any specific identity handling already built in. -
prepareIdentifierGeneratingInsert
Deprecated, for removal: This API element is subject to removal in a future version.Append SQL specific to this delegate's mode of handling generated primary key values to the giveninsertstatement.- Returns:
- The processed
insertstatement string
-
GeneratedValuesMutationDelegateinstead.