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

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


net.sf.hibernate.id
Interface PersistentIdentifierGenerator

All Superinterfaces:
IdentifierGenerator
All Known Implementing Classes:
SequenceGenerator, TableGenerator

public interface PersistentIdentifierGenerator
extends IdentifierGenerator

An IdentifierGenerator that requires creation of database objects.

All PersistentIdentifierGenerators that also implement Configurable have access to a special mapping parameter: schema

Author:
Gavin King
See Also:
IdentifierGenerator, Configurable

Field Summary
static String PK
          The configuration parameter holding the primary key column name of the generated id
static String SCHEMA
          The configuration parameter holding the schema name
static String TABLE
          The configuration parameter holding the table name for the generated id
 
Method Summary
 Object generatorKey()
          Return a key unique to the underlying database objects.
 String[] sqlCreateStrings(Dialect dialect)
          The SQL required to create the underlying database objects.
 String sqlDropString(Dialect dialect)
          The SQL required to remove the underlying database objects.
 
Methods inherited from interface net.sf.hibernate.id.IdentifierGenerator
generate
 

Field Detail

SCHEMA

public static final String SCHEMA
The configuration parameter holding the schema name

See Also:
Constant Field Values

TABLE

public static final String TABLE
The configuration parameter holding the table name for the generated id

See Also:
Constant Field Values

PK

public static final String PK
The configuration parameter holding the primary key column name of the generated id

See Also:
Constant Field Values
Method Detail

sqlCreateStrings

public String[] sqlCreateStrings(Dialect dialect)
                          throws HibernateException
The SQL required to create the underlying database objects.

Parameters:
dialect -
Returns:
String[]
Throws:
HibernateException

sqlDropString

public String sqlDropString(Dialect dialect)
                     throws HibernateException
The SQL required to remove the underlying database objects.

Parameters:
dialect -
Returns:
String
Throws:
HibernateException

generatorKey

public Object generatorKey()
Return a key unique to the underlying database objects. Prevents us from trying to create/remove them multiple times.

Returns:
Object an identifying key for this generator