Top Description Fields Methods
org.hibernate.id

public Interface IdentifierGenerator

Known Direct Subinterfaces
org.hibernate.id.PersistentIdentifierGenerator, org.hibernate.id.PostInsertIdentifierGenerator
Known Direct Implementers
org.hibernate.id.IncrementGenerator, org.hibernate.id.UUIDGenerator, org.hibernate.id.AbstractUUIDGenerator, org.hibernate.id.Assigned, org.hibernate.id.CompositeNestedGeneratedValueGenerator, org.hibernate.id.ForeignGenerator, org.hibernate.id.GUIDGenerator
Imports
org.hibernate.HibernateException, org.hibernate.engine.SessionImplementor, java.io.Serializable

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

Modifier and TypeField and Description
public static final String
ENTITY_NAME

The configuration parameter holding the entity name

Method Summary

Modifier and TypeMethod and Description
public Serializable

Returns:

a new identifier
generate
(SessionImplementor session, Object
the entity or toplevel collection for which the id is being generated
object
)

Generate a new identifier.

Field Detail

ENTITY_NAMEback to summary
public static final String ENTITY_NAME

The configuration parameter holding the entity name

Method Detail

generateback to summary
public Serializable generate(SessionImplementor session, Object object) throws HibernateException

Generate a new identifier.

Parameters
object:Object

the entity or toplevel collection for which the id is being generated

Returns:Serializable

a new identifier