当前页面:
在线文档首页 >
Hibernate 3.2.4 正式版 API 英文文档
IdentifierGenerator (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档
org.hibernate.id
Interface IdentifierGenerator
- All Known Subinterfaces:
- PersistentIdentifierGenerator, PostInsertIdentifierGenerator
- All Known Implementing Classes:
- AbstractPostInsertGenerator, AbstractUUIDGenerator, Assigned, ForeignGenerator, GUIDGenerator, IncrementGenerator, MultipleHiLoPerTableGenerator, SequenceGenerator, SequenceIdentityGenerator, SequenceStyleGenerator, TableGenerator, TableGenerator
- public interface IdentifierGenerator
The general contract between a class that generates unique
identifiers and the Session. It is not intended that
this interface ever be exposed to the application. It is
intended that users implement this interface to provide
custom identifier generation strategies.
Implementors should provide a public default constructor.
Implementations that accept configuration parameters should
also implement Configurable.
Implementors must be threadsafe
- Author:
- Gavin King
- See Also:
PersistentIdentifierGenerator
,
Configurable
Field Summary |
static String |
ENTITY_NAME
The configuration parameter holding the entity name |
ENTITY_NAME
public static final String ENTITY_NAME
- The configuration parameter holding the entity name
- See Also:
- Constant Field Values
generate
public Serializable generate(SessionImplementor session,
Object object)
throws HibernateException
- Generate a new identifier.
- Parameters:
session
- object
- the entity or toplevel collection for which the id is being generated
- Returns:
- a new identifier
- Throws:
HibernateException