public interface

IdentifierGenerator

org.hibernate.id.IdentifierGenerator
Known Indirect Subclasses

Class Overview

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

Summary

Constants
String ENTITY_NAME The configuration parameter holding the entity name
Public Methods
abstract Serializable generate(SessionImplementor session, Object object)
Generate a new identifier.

Constants

public static final String ENTITY_NAME

The configuration parameter holding the entity name

Constant Value: "entity_name"

Public Methods

public abstract Serializable generate (SessionImplementor session, Object object)

Generate a new identifier.

Parameters
object the entity or toplevel collection for which the id is being generated
Returns
  • a new identifier