站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

IdentityGenerator (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


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