Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.id.insert
Class AbstractReturningDelegate  view AbstractReturningDelegate download AbstractReturningDelegate.java

java.lang.Object
  extended byorg.hibernate.id.insert.AbstractReturningDelegate
All Implemented Interfaces:
InsertGeneratedIdentifierDelegate

public abstract class AbstractReturningDelegate
extends java.lang.Object
implements InsertGeneratedIdentifierDelegate

Abstract InsertGeneratedIdentifierDelegate implementation where the underlying strategy causes the enerated identitifer 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 identitifer.


Field Summary
private  org.hibernate.id.PostInsertIdentityPersister persister
           
 
Constructor Summary
AbstractReturningDelegate(org.hibernate.id.PostInsertIdentityPersister persister)
           
 
Method Summary
protected abstract  java.io.Serializable executeAndExtract(java.sql.PreparedStatement insert)
           
protected  org.hibernate.id.PostInsertIdentityPersister getPersister()
           
 java.io.Serializable performInsert(java.lang.String insertSQL, org.hibernate.engine.SessionImplementor session, Binder binder)
          Perform the indicated insert SQL statement and determine the identifier value generated.
protected abstract  java.sql.PreparedStatement prepare(java.lang.String insertSQL, org.hibernate.engine.SessionImplementor session)
           
protected  void releaseStatement(java.sql.PreparedStatement insert, org.hibernate.engine.SessionImplementor 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
prepareIdentifierGeneratingInsert
 

Field Detail

persister

private final org.hibernate.id.PostInsertIdentityPersister persister
Constructor Detail

AbstractReturningDelegate

public AbstractReturningDelegate(org.hibernate.id.PostInsertIdentityPersister persister)
Method Detail

performInsert

public final java.io.Serializable performInsert(java.lang.String insertSQL,
                                                org.hibernate.engine.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

getPersister

protected org.hibernate.id.PostInsertIdentityPersister getPersister()

prepare

protected abstract java.sql.PreparedStatement prepare(java.lang.String insertSQL,
                                                      org.hibernate.engine.SessionImplementor session)
                                               throws java.sql.SQLException

executeAndExtract

protected abstract java.io.Serializable executeAndExtract(java.sql.PreparedStatement insert)
                                                   throws java.sql.SQLException

releaseStatement

protected void releaseStatement(java.sql.PreparedStatement insert,
                                org.hibernate.engine.SessionImplementor session)
                         throws java.sql.SQLException