org.hibernate.id
Class IdentityGenerator.BasicDelegate
java.lang.Object
   org.hibernate.id.insert.AbstractSelectingDelegate
org.hibernate.id.insert.AbstractSelectingDelegate
       org.hibernate.id.IdentityGenerator.BasicDelegate
org.hibernate.id.IdentityGenerator.BasicDelegate
- All Implemented Interfaces: 
- InsertGeneratedIdentifierDelegate
- Enclosing class:
- IdentityGenerator
- public static class IdentityGenerator.BasicDelegate 
- extends AbstractSelectingDelegate- implements InsertGeneratedIdentifierDelegate
Delegate for dealing with IDENTITY columns where the dialect requires an
 additional command execution to retrieve the generated IDENTITY value
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
IdentityGenerator.BasicDelegate
public IdentityGenerator.BasicDelegate(PostInsertIdentityPersister persister,
                                       Dialect dialect)
prepareIdentifierGeneratingInsert
public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert()
- Description copied from interface: InsertGeneratedIdentifierDelegate
- Build a Insertspecific to the delegate's mode
 of handling generated key values.
 
- 
- Specified by:
- prepareIdentifierGeneratingInsertin interface- InsertGeneratedIdentifierDelegate
 
- 
- Returns:
- The insert object.
 
getSelectSQL
protected String getSelectSQL()
- Description copied from class: AbstractSelectingDelegate
- Get the SQL statement to be used to retrieve generated key values.
 
- 
- Specified by:
- getSelectSQLin class- AbstractSelectingDelegate
 
- 
- Returns:
- The SQL command string
 
getResult
protected Serializable getResult(SessionImplementor session,
                                 ResultSet rs,
                                 Object object)
                          throws SQLException
- Description copied from class: AbstractSelectingDelegate
- Extract the generated key value from the given result set.
 
- 
- Specified by:
- getResultin class- AbstractSelectingDelegate
 
- 
- Parameters:
- session- The session
- rs- The result set containing the generated primay key values.
- object- The entity being saved.
- Returns:
- The generated identifier
- Throws:
- SQLException
 
Copyright © 2001-2010 Red Hat, Inc.  All Rights Reserved.