Interface IdentifierGenerator

All Superinterfaces:
BeforeExecutionGenerator, Configurable, ExportableProducer, Generator, Serializable
All Known Subinterfaces:
OptimizableGenerator, PersistentIdentifierGenerator
All Known Implementing Classes:
AbstractUUIDGenerator, CompositeNestedGeneratedValueGenerator, ForeignGenerator, GUIDGenerator, IncrementGenerator, OrderedSequenceGenerator, SequenceStyleGenerator, TableGenerator, UUIDGenerator, UUIDHexGenerator

public interface IdentifierGenerator extends BeforeExecutionGenerator, ExportableProducer, Configurable
A classic extension point from the very earliest days of Hibernate, this interface is no longer the only way to generate identifiers. Any BeforeExecutionGenerator with timing EventTypeSets.INSERT_ONLY may now be used.

This interface extends BeforeExecutionGenerator with some additional machinery for configuration, and for caching generated SQL.

Any identifier generator, including a generator which directly implements BeforeExecutionGenerator, may also implement ExportableProducer. For the sake of convenience, PersistentIdentifierGenerator extends ExportableProducer, in case the implementation needs to export objects to the database as part of the process of schema export.

The Configurable.configure(GeneratorCreationContext, Properties) method accepts a properties object containing named values. These include:

It's not usually correct to use an IdentifierGenerator with the IdGeneratorType meta-annotation.

See Also: