net.sf.hibernate.id
Class IdentityGenerator

java.lang.Object
  extended bynet.sf.hibernate.id.IdentityGenerator
All Implemented Interfaces:
IdentifierGenerator

public class IdentityGenerator
extends Object
implements IdentifierGenerator

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

Constructor Summary
IdentityGenerator()
           
 
Method Summary
 Serializable generate(SessionImplementor s, Object obj)
          Generate a new identifier.
 
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

generate

public Serializable generate(SessionImplementor s,
                             Object obj)
                      throws SQLException,
                             HibernateException
Description copied from interface: IdentifierGenerator
Generate a new identifier.

Specified by:
generate in interface IdentifierGenerator
Parameters:
s -
obj - the entity or toplevel collection for which the id is being generated
Returns:
Serializable a new identifier
Throws:
SQLException
HibernateException