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
,SybaseJConnGetGeneratedKeysDelegate
public class GetGeneratedKeysDelegate extends AbstractReturningDelegate
Delegate for dealing withIDENTITY
columns 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 TableInsertBuilder
createTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor factory)
Create aTableInsertBuilder
with any specific identity handling already built in.Object
executeAndExtract(String insertSql, PreparedStatement insertStatement, SharedSessionContractImplementor session)
Object
performInsert(PreparedStatementDetails insertStatementDetails, JdbcValueBindings jdbcValueBindings, Object entity, SharedSessionContractImplementor session)
Perform theinsert
and extract the database-generated primary key value.IdentifierGeneratingInsert
prepareIdentifierGeneratingInsert(SqlStringGenerationContext context)
Deprecated.PreparedStatement
prepareStatement(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: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 factory)
Description copied from interface:InsertGeneratedIdentifierDelegate
Create aTableInsertBuilder
with 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:InsertGeneratedIdentifierDelegate
Perform theinsert
and extract the database-generated primary key value.- Specified by:
performInsert
in interfaceInsertGeneratedIdentifierDelegate
- Overrides:
performInsert
in 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:
executeAndExtract
in classAbstractReturningDelegate
-
-