Package org.hibernate.id.insert
Class AbstractSelectingDelegate
java.lang.Object
org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
org.hibernate.id.insert.AbstractSelectingDelegate
- All Implemented Interfaces:
GeneratedValuesMutationDelegate,InsertGeneratedIdentifierDelegate
- Direct Known Subclasses:
BasicSelectingDelegate,UniqueKeySelectingDelegate
public abstract class AbstractSelectingDelegate
extends AbstractGeneratedValuesMutationDelegate
implements InsertGeneratedIdentifierDelegate
Abstract
GeneratedValuesMutationDelegate implementation where
the underlying strategy requires a subsequent select after the
insert to determine the generated identifier.-
Field Summary
Fields inherited from class org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
jdbcValuesMappingProducer, persister -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSelectingDelegate(EntityPersister persister, EventType timing, boolean supportsArbitraryValues, boolean supportsRowId) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbindParameters(Object entity, PreparedStatement ps, SharedSessionContractImplementor session) protected abstract StringGet the SQL statement to be used to retrieve generated key values.final GeneratedValuesperformInsertReturning(String sql, SharedSessionContractImplementor session, Binder binder) Execute the giveninsertstatement and return the generated key value.performMutation(PreparedStatementDetails statementDetails, JdbcValueBindings jdbcValueBindings, Object entity, SharedSessionContractImplementor session) Perform themutationand extract the database-generated values.prepareStatement(String insertSql, SharedSessionContractImplementor session) Create aPreparedStatementfrom the providedsqlbased on the delegate needs.Methods inherited from class org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
dialect, getGeneratedValuesMappingProducer, getTiming, supportsArbitraryValues, supportsRowIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.generator.values.GeneratedValuesMutationDelegate
createTableMutationBuilder, getGeneratedValuesMappingProducer, getTiming, supportsArbitraryValues, supportsRowIdMethods inherited from interface org.hibernate.id.insert.InsertGeneratedIdentifierDelegate
prepareIdentifierGeneratingInsert
-
Constructor Details
-
AbstractSelectingDelegate
protected AbstractSelectingDelegate(EntityPersister persister, EventType timing, boolean supportsArbitraryValues, boolean supportsRowId)
-
-
Method Details
-
getSelectSQL
Get the SQL statement to be used to retrieve generated key values.- Returns:
- The SQL command string
-