org.hibernate.id
Class IdentityGenerator

java.lang.Object
  extended byorg.hibernate.id.AbstractPostInsertGenerator
      extended byorg.hibernate.id.IdentityGenerator
All Implemented Interfaces:
IdentifierGenerator, PostInsertIdentifierGenerator

public class IdentityGenerator
extends AbstractPostInsertGenerator

The IdentityGenerator for autoincrement/identity key generation.

Indicates to the Session that identity (ie. identity/autoincrement column) key generation should be used.

Author:
Christoph Sturm

Field Summary
 
Fields inherited from interface org.hibernate.id.IdentifierGenerator
ENTITY_NAME
 
Constructor Summary
IdentityGenerator()
           
 
Method Summary
protected  Serializable getResult(SessionImplementor session, ResultSet rs, Object object, PostInsertIdentityPersister persister)
           
protected  String getSQL(PostInsertIdentityPersister persister)
           
 
Methods inherited from class org.hibernate.id.AbstractPostInsertGenerator
bindParameters, generate, getGenerated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityGenerator

public IdentityGenerator()
Method Detail

getSQL

protected String getSQL(PostInsertIdentityPersister persister)
Specified by:
getSQL in class AbstractPostInsertGenerator

getResult

protected Serializable getResult(SessionImplementor session,
                                 ResultSet rs,
                                 Object object,
                                 PostInsertIdentityPersister persister)
                          throws SQLException
Specified by:
getResult in class AbstractPostInsertGenerator
Throws:
SQLException