Package org.hibernate.id.insert
Class AbstractReturningDelegate
- java.lang.Object
-
- org.hibernate.id.insert.AbstractReturningDelegate
-
- All Implemented Interfaces:
InsertGeneratedIdentifierDelegate
- Direct Known Subclasses:
GetGeneratedKeysDelegate,InsertReturningDelegate
public abstract class AbstractReturningDelegate extends Object implements InsertGeneratedIdentifierDelegate
AbstractInsertGeneratedIdentifierDelegateimplementation where the underlying strategy causes the generated identifier to be returned as an effect of performing the insert statement. Thus, there is no need for an additional sql statement to determine the generated identifier.
-
-
Constructor Summary
Constructors Constructor Description AbstractReturningDelegate(PostInsertIdentityPersister persister)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ObjectexecuteAndExtract(String insertSql, PreparedStatement insertStatement, SharedSessionContractImplementor session)protected PostInsertIdentityPersistergetPersister()ObjectperformInsert(String insertSql, SharedSessionContractImplementor session, Binder binder)Execute the giveninsertstatement and return the generated key value.ObjectperformInsert(PreparedStatementDetails insertStatementDetails, JdbcValueBindings valueBindings, Object entity, SharedSessionContractImplementor session)Perform theinsertand extract the database-generated primary key value.protected voidreleaseStatement(PreparedStatement insert, SharedSessionContractImplementor session)-
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
createTableInsertBuilder, prepareIdentifierGeneratingInsert, prepareIdentifierGeneratingInsert, prepareStatement
-
-
-
-
Constructor Detail
-
AbstractReturningDelegate
public AbstractReturningDelegate(PostInsertIdentityPersister persister)
-
-
Method Detail
-
performInsert
public Object performInsert(PreparedStatementDetails insertStatementDetails, JdbcValueBindings valueBindings, Object entity, SharedSessionContractImplementor session)
Description copied from interface:InsertGeneratedIdentifierDelegatePerform theinsertand extract the database-generated primary key value.
-
performInsert
public final Object performInsert(String insertSql, SharedSessionContractImplementor session, Binder binder)
Description copied from interface:InsertGeneratedIdentifierDelegateExecute the giveninsertstatement and return the generated key value.- Specified by:
performInsertin interfaceInsertGeneratedIdentifierDelegate- Parameters:
insertSql- Theinsertstatement stringsession- The session in which we are operatingbinder- The parameter binder- Returns:
- The generated identifier value
-
getPersister
protected PostInsertIdentityPersister getPersister()
-
executeAndExtract
protected abstract Object executeAndExtract(String insertSql, PreparedStatement insertStatement, SharedSessionContractImplementor session)
-
releaseStatement
protected void releaseStatement(PreparedStatement insert, SharedSessionContractImplementor session)
-
-