org.hibernate.id.insert
Class AbstractReturningDelegate
java.lang.Object
org.hibernate.id.insert.AbstractReturningDelegate
- All Implemented Interfaces:
- InsertGeneratedIdentifierDelegate
- Direct Known Subclasses:
- IdentityGenerator.GetGeneratedKeysDelegate, IdentityGenerator.InsertSelectDelegate, SequenceIdentityGenerator.Delegate
public abstract class AbstractReturningDelegate
- extends java.lang.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.
- Author:
- Steve Ebersole
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractReturningDelegate
public AbstractReturningDelegate(PostInsertIdentityPersister persister)
performInsert
public final java.io.Serializable performInsert(java.lang.String insertSQL,
SessionImplementor session,
Binder binder)
- Description copied from interface:
InsertGeneratedIdentifierDelegate
- Perform the indicated insert SQL statement and determine the identifier value
generated.
- Specified by:
performInsert
in interface InsertGeneratedIdentifierDelegate
- Parameters:
insertSQL
- The INSERT statement stringsession
- The session in which we are operatingbinder
- The param binder
- Returns:
- The generated identifier value.
getPersister
protected PostInsertIdentityPersister getPersister()
prepare
protected abstract java.sql.PreparedStatement prepare(java.lang.String insertSQL,
SessionImplementor session)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
executeAndExtract
protected abstract java.io.Serializable executeAndExtract(java.sql.PreparedStatement insert)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
releaseStatement
protected void releaseStatement(java.sql.PreparedStatement insert,
SessionImplementor session)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
Copyright © 2013. All Rights Reserved.