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
ConstructorsModifierConstructorDescriptionprotected
AbstractSelectingDelegate
(EntityPersister persister, EventType timing, boolean supportsArbitraryValues, boolean supportsRowId) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
bindParameters
(Object entity, PreparedStatement ps, SharedSessionContractImplementor session) protected abstract String
Get the SQL statement to be used to retrieve generated key values.final GeneratedValues
performInsertReturning
(String sql, SharedSessionContractImplementor session, Binder binder) Execute the giveninsert
statement and return the generated key value.performMutation
(PreparedStatementDetails statementDetails, JdbcValueBindings jdbcValueBindings, Object entity, SharedSessionContractImplementor session) Perform themutation
and extract the database-generated values.prepareStatement
(String insertSql, SharedSessionContractImplementor session) Create aPreparedStatement
from the providedsql
based on the delegate needs.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
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
-