org.hibernate.id
Class IdentityGenerator.InsertSelectDelegate

java.lang.Object
  extended by org.hibernate.id.insert.AbstractReturningDelegate
      extended by org.hibernate.id.IdentityGenerator.InsertSelectDelegate
All Implemented Interfaces:
InsertGeneratedIdentifierDelegate
Enclosing class:
IdentityGenerator

public static class IdentityGenerator.InsertSelectDelegate
extends AbstractReturningDelegate
implements InsertGeneratedIdentifierDelegate

Delegate for dealing with IDENTITY columns where the dialect supports returning the generated IDENTITY value directly from the insert statement.


Constructor Summary
IdentityGenerator.InsertSelectDelegate(PostInsertIdentityPersister persister, Dialect dialect)
           
 
Method Summary
 java.io.Serializable determineGeneratedIdentifier(SessionImplementor session, java.lang.Object entity)
           
 java.io.Serializable executeAndExtract(java.sql.PreparedStatement insert)
           
protected  java.sql.PreparedStatement prepare(java.lang.String insertSQL, SessionImplementor session)
           
 IdentifierGeneratingInsert prepareIdentifierGeneratingInsert()
          Build a Insert specific to the delegate's mode of handling generated key values.
 
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
performInsert
 

Constructor Detail

IdentityGenerator.InsertSelectDelegate

public IdentityGenerator.InsertSelectDelegate(PostInsertIdentityPersister persister,
                                              Dialect dialect)
Method Detail

prepareIdentifierGeneratingInsert

public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert()
Description copied from interface: InsertGeneratedIdentifierDelegate
Build a Insert specific to the delegate's mode of handling generated key values.

Specified by:
prepareIdentifierGeneratingInsert in interface InsertGeneratedIdentifierDelegate
Returns:
The insert object.

prepare

protected java.sql.PreparedStatement prepare(java.lang.String insertSQL,
                                             SessionImplementor session)
                                      throws java.sql.SQLException
Specified by:
prepare in class AbstractReturningDelegate
Throws:
java.sql.SQLException

executeAndExtract

public java.io.Serializable executeAndExtract(java.sql.PreparedStatement insert)
                                       throws java.sql.SQLException
Specified by:
executeAndExtract in class AbstractReturningDelegate
Throws:
java.sql.SQLException

determineGeneratedIdentifier

public java.io.Serializable determineGeneratedIdentifier(SessionImplementor session,
                                                         java.lang.Object entity)


Copyright © 2008 Hibernate.org. All Rights Reserved.