Package org.hibernate.id.insert
Class AbstractReturningDelegate
- java.lang.Object
-
- org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
-
- org.hibernate.id.insert.AbstractReturningDelegate
-
- All Implemented Interfaces:
GeneratedValuesMutationDelegate
,InsertGeneratedIdentifierDelegate
- Direct Known Subclasses:
GetGeneratedKeysDelegate
,InsertReturningDelegate
public abstract class AbstractReturningDelegate extends AbstractGeneratedValuesMutationDelegate implements InsertGeneratedIdentifierDelegate
AbstractGeneratedValuesMutationDelegate
implementation where the underlying strategy causes the generated identifier to be returned as an effect of performing the insert statement. Thus, there is no need for an additional sql statement to determine the generated identifier.
-
-
Field Summary
-
Fields inherited from class org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
jdbcValuesMappingProducer, persister
-
-
Constructor Summary
Constructors Constructor Description AbstractReturningDelegate(PostInsertIdentityPersister persister)
Deprecated, for removal: This API element is subject to removal in a future version.AbstractReturningDelegate(EntityPersister persister, EventType timing, boolean supportsArbitraryValues, boolean supportsRowId)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected Object
executeAndExtract(String sql, PreparedStatement preparedStatement, SharedSessionContractImplementor session)
Deprecated, for removal: This API element is subject to removal in a future version.No longer usedprotected abstract GeneratedValues
executeAndExtractReturning(String sql, PreparedStatement preparedStatement, SharedSessionContractImplementor session)
GeneratedValues
performInsertReturning(String sql, SharedSessionContractImplementor session, Binder binder)
Execute the giveninsert
statement and return the generated key value.GeneratedValues
performMutation(PreparedStatementDetails statementDetails, JdbcValueBindings valueBindings, Object entity, SharedSessionContractImplementor session)
Perform themutation
and extract the database-generated values.protected void
releaseStatement(PreparedStatement preparedStatement, SharedSessionContractImplementor session)
-
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
createTableMutationBuilder, getGeneratedValuesMappingProducer, getTiming, supportsArbitraryValues, supportsRowId
-
Methods inherited from interface org.hibernate.id.insert.InsertGeneratedIdentifierDelegate
createTableInsertBuilder, performInsert, performInsert, prepareIdentifierGeneratingInsert, prepareStatement
-
-
-
-
Constructor Detail
-
AbstractReturningDelegate
@Deprecated(forRemoval=true, since="6.5") public AbstractReturningDelegate(PostInsertIdentityPersister persister)
Deprecated, for removal: This API element is subject to removal in a future version.
-
AbstractReturningDelegate
public AbstractReturningDelegate(EntityPersister persister, EventType timing, boolean supportsArbitraryValues, boolean supportsRowId)
-
-
Method Detail
-
performMutation
public GeneratedValues performMutation(PreparedStatementDetails statementDetails, JdbcValueBindings valueBindings, Object entity, SharedSessionContractImplementor session)
Description copied from interface:GeneratedValuesMutationDelegate
Perform themutation
and extract the database-generated values.
-
performInsertReturning
public final GeneratedValues performInsertReturning(String sql, SharedSessionContractImplementor session, Binder binder)
Description copied from interface:InsertGeneratedIdentifierDelegate
Execute the giveninsert
statement and return the generated key value.- Specified by:
performInsertReturning
in interfaceInsertGeneratedIdentifierDelegate
- Parameters:
sql
- Theinsert
statement stringsession
- The session in which we are operatingbinder
- The parameter binder- Returns:
- The generated identifier value
-
executeAndExtract
@Deprecated(forRemoval=true, since="6.5") protected Object executeAndExtract(String sql, PreparedStatement preparedStatement, SharedSessionContractImplementor session)
Deprecated, for removal: This API element is subject to removal in a future version.No longer used
-
executeAndExtractReturning
protected abstract GeneratedValues executeAndExtractReturning(String sql, PreparedStatement preparedStatement, SharedSessionContractImplementor session)
-
releaseStatement
protected void releaseStatement(PreparedStatement preparedStatement, SharedSessionContractImplementor session)
-
-