Package org.hibernate.id.insert
Class GetGeneratedKeysDelegate
- java.lang.Object
-
- org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
-
- org.hibernate.id.insert.AbstractReturningDelegate
-
- org.hibernate.id.insert.GetGeneratedKeysDelegate
-
- All Implemented Interfaces:
GeneratedValuesMutationDelegate
,InsertGeneratedIdentifierDelegate
- Direct Known Subclasses:
Oracle12cGetGeneratedKeysDelegate
,SybaseJConnGetGeneratedKeysDelegate
public class GetGeneratedKeysDelegate extends AbstractReturningDelegate
Delegate for dealing with generated values using the JDBC3 methodStatement.getGeneratedKeys()
.
-
-
Field Summary
-
Fields inherited from class org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
jdbcValuesMappingProducer, persister
-
-
Constructor Summary
Constructors Constructor Description GetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect, boolean inferredKeys)
Deprecated, for removal: This API element is subject to removal in a future version.GetGeneratedKeysDelegate(EntityPersister persister, boolean inferredKeys, EventType timing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableMutationBuilder<?>
createTableMutationBuilder(Expectation expectation, SessionFactoryImplementor factory)
Create aTableMutationBuilder
instance used to build table mutations for this delegate.GeneratedValues
executeAndExtractReturning(String sql, PreparedStatement preparedStatement, SharedSessionContractImplementor session)
GeneratedValues
performMutation(PreparedStatementDetails statementDetails, JdbcValueBindings jdbcValueBindings, 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.-
Methods inherited from class org.hibernate.id.insert.AbstractReturningDelegate
executeAndExtract, performInsertReturning, 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, prepareIdentifierGeneratingInsert
-
-
-
-
Constructor Detail
-
GetGeneratedKeysDelegate
@Deprecated(forRemoval=true, since="6.5") public GetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect, boolean inferredKeys)
Deprecated, for removal: This API element is subject to removal in a future version.
-
GetGeneratedKeysDelegate
public GetGeneratedKeysDelegate(EntityPersister persister, boolean inferredKeys, EventType timing)
-
-
Method Detail
-
createTableMutationBuilder
public TableMutationBuilder<?> createTableMutationBuilder(Expectation expectation, SessionFactoryImplementor factory)
Description copied from interface:GeneratedValuesMutationDelegate
Create aTableMutationBuilder
instance used to build table mutations for this delegate.
-
prepareStatement
public PreparedStatement prepareStatement(String sql, SharedSessionContractImplementor session)
Description copied from interface:GeneratedValuesMutationDelegate
Create aPreparedStatement
from the providedsql
based on the delegate needs.
-
performMutation
public GeneratedValues performMutation(PreparedStatementDetails statementDetails, JdbcValueBindings jdbcValueBindings, Object entity, SharedSessionContractImplementor session)
Description copied from interface:GeneratedValuesMutationDelegate
Perform themutation
and extract the database-generated values.- Specified by:
performMutation
in interfaceGeneratedValuesMutationDelegate
- Overrides:
performMutation
in classAbstractReturningDelegate
- See Also:
GeneratedValuesMutationDelegate.createTableMutationBuilder(org.hibernate.jdbc.Expectation, org.hibernate.engine.spi.SessionFactoryImplementor)
-
executeAndExtractReturning
public GeneratedValues executeAndExtractReturning(String sql, PreparedStatement preparedStatement, SharedSessionContractImplementor session)
- Specified by:
executeAndExtractReturning
in classAbstractReturningDelegate
-
-