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 withIDENTITY
columns where the dialect supports returning the generatedIDENTITY
value 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 TableInsertBuilder
createTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor sessionFactory)
Create aTableInsertBuilder
with any specific identity handling already built in.protected Object
executeAndExtract(String insertSql, PreparedStatement insertStatement, SharedSessionContractImplementor session)
String
prepareIdentifierGeneratingInsert(String insertSQL)
Append SQL specific to this delegate's mode of handling generated primary key values to the giveninsert
statement.IdentifierGeneratingInsert
prepareIdentifierGeneratingInsert(SqlStringGenerationContext context)
Deprecated.PreparedStatement
prepareStatement(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:InsertGeneratedIdentifierDelegate
Build 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:InsertGeneratedIdentifierDelegate
Create aTableInsertBuilder
with any specific identity handling already built in.
-
executeAndExtract
protected Object executeAndExtract(String insertSql, PreparedStatement insertStatement, SharedSessionContractImplementor session)
- Specified by:
executeAndExtract
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 insertSql, SharedSessionContractImplementor session)
-
-