public abstract class AbstractReturningDelegate extends Object implements InsertGeneratedIdentifierDelegate
Abstract InsertGeneratedIdentifierDelegate implementation 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 and Description |
|---|
AbstractReturningDelegate(PostInsertIdentityPersister persister) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Serializable |
executeAndExtract(PreparedStatement insert,
SharedSessionContractImplementor session) |
protected PostInsertIdentityPersister |
getPersister() |
Serializable |
performInsert(String insertSQL,
SharedSessionContractImplementor session,
Binder binder)
Perform the indicated insert SQL statement and determine the identifier value
generated.
|
protected abstract PreparedStatement |
prepare(String insertSQL,
SharedSessionContractImplementor session) |
protected void |
releaseStatement(PreparedStatement insert,
SharedSessionContractImplementor session) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprepareIdentifierGeneratingInsertpublic AbstractReturningDelegate(PostInsertIdentityPersister persister)
public final Serializable performInsert(String insertSQL, SharedSessionContractImplementor session, Binder binder)
InsertGeneratedIdentifierDelegatePerform the indicated insert SQL statement and determine the identifier value generated.
performInsert in interface InsertGeneratedIdentifierDelegateinsertSQL - The INSERT statement stringsession - The session in which we are operatingbinder - The param binderprotected PostInsertIdentityPersister getPersister()
protected abstract PreparedStatement prepare(String insertSQL, SharedSessionContractImplementor session) throws SQLException
SQLExceptionprotected abstract Serializable executeAndExtract(PreparedStatement insert, SharedSessionContractImplementor session) throws SQLException
SQLExceptionprotected void releaseStatement(PreparedStatement insert, SharedSessionContractImplementor session) throws SQLException
SQLExceptionCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.