Package org.hibernate.id.insert
Class GetGeneratedKeysDelegate
- java.lang.Object
-
- org.hibernate.id.insert.AbstractReturningDelegate
-
- org.hibernate.id.insert.GetGeneratedKeysDelegate
-
- All Implemented Interfaces:
InsertGeneratedIdentifierDelegate
- Direct Known Subclasses:
Oracle12cGetGeneratedKeysDelegate
public class GetGeneratedKeysDelegate extends AbstractReturningDelegate
Delegate for dealing withIDENTITYcolumns using the JDBC3 methodStatement.getGeneratedKeys().
-
-
Constructor Summary
Constructors Constructor Description GetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect, boolean inferredKeys)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TableInsertBuildercreateTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor factory)Create aTableInsertBuilderwith any specific identity handling already built in.ObjectexecuteAndExtract(String insertSql, PreparedStatement insertStatement, SharedSessionContractImplementor session)ObjectperformInsert(PreparedStatementDetails insertStatementDetails, JdbcValueBindings jdbcValueBindings, Object entity, SharedSessionContractImplementor session)Perform theinsertand extract the database-generated primary key value.IdentifierGeneratingInsertprepareIdentifierGeneratingInsert(SqlStringGenerationContext context)Deprecated.PreparedStatementprepareStatement(String insertSql, SharedSessionContractImplementor session)-
Methods inherited from class org.hibernate.id.insert.AbstractReturningDelegate
getPersister, performInsert, releaseStatement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.id.insert.InsertGeneratedIdentifierDelegate
prepareIdentifierGeneratingInsert
-
-
-
-
Constructor Detail
-
GetGeneratedKeysDelegate
public GetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect, boolean inferredKeys)
-
-
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 factory)
Description copied from interface:InsertGeneratedIdentifierDelegateCreate aTableInsertBuilderwith any specific identity handling already built in.
-
prepareStatement
public PreparedStatement prepareStatement(String insertSql, SharedSessionContractImplementor session)
-
performInsert
public Object performInsert(PreparedStatementDetails insertStatementDetails, JdbcValueBindings jdbcValueBindings, Object entity, SharedSessionContractImplementor session)
Description copied from interface:InsertGeneratedIdentifierDelegatePerform theinsertand extract the database-generated primary key value.- Specified by:
performInsertin interfaceInsertGeneratedIdentifierDelegate- Overrides:
performInsertin classAbstractReturningDelegate- See Also:
InsertGeneratedIdentifierDelegate.createTableInsertBuilder(org.hibernate.metamodel.mapping.BasicEntityIdentifierMapping, org.hibernate.jdbc.Expectation, org.hibernate.engine.spi.SessionFactoryImplementor)
-
executeAndExtract
public Object executeAndExtract(String insertSql, PreparedStatement insertStatement, SharedSessionContractImplementor session)
- Specified by:
executeAndExtractin classAbstractReturningDelegate
-
-