Package org.hibernate.id.insert
Class InsertReturningDelegate
- java.lang.Object
-
- org.hibernate.id.insert.AbstractReturningDelegate
-
- org.hibernate.id.insert.InsertReturningDelegate
-
- All Implemented Interfaces:
InsertGeneratedIdentifierDelegate
public class InsertReturningDelegate extends AbstractReturningDelegate
Delegate for dealing withIDENTITYcolumns where the dialect supports returning the generatedIDENTITYvalue directly from the insert statement.
-
-
Constructor Summary
Constructors Constructor Description InsertReturningDelegate(PostInsertIdentityPersister persister, Dialect dialect)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TableInsertBuildercreateTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor sessionFactory)Create aTableInsertBuilderwith any specific identity handling already built in.protected ObjectexecuteAndExtract(String insertSql, PreparedStatement insertStatement, SharedSessionContractImplementor session)StringprepareIdentifierGeneratingInsert(String insertSQL)Append SQL specific to this delegate's mode of handling generated primary key values to the giveninsertstatement.IdentifierGeneratingInsertprepareIdentifierGeneratingInsert(SqlStringGenerationContext context)Deprecated.PreparedStatementprepareStatement(String insertSql, SharedSessionContractImplementor session)-
Methods inherited from class org.hibernate.id.insert.AbstractReturningDelegate
getPersister, performInsert, performInsert, releaseStatement
-
-
-
-
Constructor Detail
-
InsertReturningDelegate
public InsertReturningDelegate(PostInsertIdentityPersister persister, Dialect dialect)
-
-
Method Detail
-
prepareIdentifierGeneratingInsert
@Deprecated public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert(SqlStringGenerationContext context)
Deprecated.Description copied from interface:InsertGeneratedIdentifierDelegateBuild an insert statement specific to the delegate's mode of handling generated key values.- Parameters:
context- A context to help generate SQL strings- Returns:
- An
IdentifierGeneratingInsert
-
createTableInsertBuilder
public TableInsertBuilder createTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor sessionFactory)
Description copied from interface:InsertGeneratedIdentifierDelegateCreate aTableInsertBuilderwith any specific identity handling already built in.
-
executeAndExtract
protected Object executeAndExtract(String insertSql, PreparedStatement insertStatement, SharedSessionContractImplementor session)
- Specified by:
executeAndExtractin classAbstractReturningDelegate
-
prepareIdentifierGeneratingInsert
public String prepareIdentifierGeneratingInsert(String insertSQL)
Description copied from interface:InsertGeneratedIdentifierDelegateAppend SQL specific to this delegate's mode of handling generated primary key values to the giveninsertstatement.- Returns:
- The processed
insertstatement string
-
prepareStatement
public PreparedStatement prepareStatement(String insertSql, SharedSessionContractImplementor session)
-
-