Package org.hibernate.id.insert
Class InsertReturningDelegate
- java.lang.Object
-
- org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
-
- org.hibernate.id.insert.AbstractReturningDelegate
-
- org.hibernate.id.insert.InsertReturningDelegate
-
- All Implemented Interfaces:
GeneratedValuesMutationDelegate
,InsertGeneratedIdentifierDelegate
public class InsertReturningDelegate extends AbstractReturningDelegate
Delegate for dealing with generated values where the dialect supports returning the generated column directly from the mutation statement.
-
-
Field Summary
-
Fields inherited from class org.hibernate.generator.values.AbstractGeneratedValuesMutationDelegate
jdbcValuesMappingProducer, persister
-
-
Constructor Summary
Constructors Constructor Description InsertReturningDelegate(PostInsertIdentityPersister persister, Dialect dialect)
Deprecated, for removal: This API element is subject to removal in a future version.UseInsertReturningDelegate(EntityPersister, EventType)
instead.InsertReturningDelegate(EntityPersister persister, EventType timing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableMutationBuilder<?>
createTableMutationBuilder(Expectation expectation, SessionFactoryImplementor sessionFactory)
Create aTableMutationBuilder
instance used to build table mutations for this delegate.protected GeneratedValues
executeAndExtractReturning(String sql, PreparedStatement preparedStatement, SharedSessionContractImplementor session)
String
prepareIdentifierGeneratingInsert(String insertSQL)
Append SQL specific to this delegate's mode of handling generated primary key values to the giveninsert
statement.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, performMutation, 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
-
-
-
-
Constructor Detail
-
InsertReturningDelegate
@Deprecated(forRemoval=true, since="6.5") public InsertReturningDelegate(PostInsertIdentityPersister persister, Dialect dialect)
Deprecated, for removal: This API element is subject to removal in a future version.UseInsertReturningDelegate(EntityPersister, EventType)
instead.
-
InsertReturningDelegate
public InsertReturningDelegate(EntityPersister persister, EventType timing)
-
-
Method Detail
-
createTableMutationBuilder
public TableMutationBuilder<?> createTableMutationBuilder(Expectation expectation, SessionFactoryImplementor sessionFactory)
Description copied from interface:GeneratedValuesMutationDelegate
Create aTableMutationBuilder
instance used to build table mutations for this delegate.
-
executeAndExtractReturning
protected GeneratedValues executeAndExtractReturning(String sql, PreparedStatement preparedStatement, SharedSessionContractImplementor session)
- Specified by:
executeAndExtractReturning
in classAbstractReturningDelegate
-
prepareIdentifierGeneratingInsert
public String prepareIdentifierGeneratingInsert(String insertSQL)
Description copied from interface:InsertGeneratedIdentifierDelegate
Append SQL specific to this delegate's mode of handling generated primary key values to the giveninsert
statement.- Returns:
- The processed
insert
statement string
-
prepareStatement
public PreparedStatement prepareStatement(String sql, SharedSessionContractImplementor session)
Description copied from interface:GeneratedValuesMutationDelegate
Create aPreparedStatement
from the providedsql
based on the delegate needs.
-
-