org.hibernate.id.enhanced ,
contain the built-in id generators, all of which implement either
org.hibernate.id.IdentifierGenerator or
org.hibernate.id.PostInsertIdentifierGenerator .
The most useful id generators in modern Hibernate are:
org.hibernate.id.IdentityGenerator - @GeneratedValue(strategy=IDENTITY)
org.hibernate.id.enhanced.SequenceStyleGenerator - @GeneratedValue(strategy=SEQUENCE)
org.hibernate.id.enhanced.TableGenerator - @GeneratedValue(strategy=TABLE)
org.hibernate.id.uuid.UuidGenerator - @UuidGenerator
API Note
The remaining id generators are kept around for backward compatibility
and as an implementation detail of the hbm.xml mapping format.
org.hibernate.generator
| Modifier and Type | Interface and Description |
|---|---|
| public interface | BulkInsertionCapableIdentifierGenerator
Specialized contract for |
| public interface | Configurable
An |
| public interface | IdentifierGenerator
A classic extension point from the very earliest days of Hibernate, this interface is no longer the only way to generate identifiers. |
| public interface | IdentifierGeneratorAggregator
Identifies generators which potentially aggregate other
|
| public interface | IntegralDataTypeHolder
Defines a common API for dealing with data of integral data type. |
| public interface | OptimizableGenerator
Commonality between sequence-based and table-based generators |
| public interface | PersistentIdentifierGenerator
An |
| public interface | PostInsertIdentifierGenerator
The counterpart to |
| public interface | PostInsertIdentityPersister
A persister that may have an identity assigned by execution of
a SQL |
| public interface | ResultSetIdentifierConsumer
Deprecated
for removal since 6.2. this interface is unnecessary and no longer used
An optional contract for org. or
org. implementations to handle generated
id values any way they see fit as opposed to being limited to the discrete set of
numeric types handled by IdentifierGeneratorHelper
|
| public interface | UUIDGenerationStrategy
Deprecated
since 6.0. see A strategy for generating a variant 2 UUIDGenerator
UUID value.
|
| Modifier and Type | Class and Description |
|---|---|
| public abstract class | AbstractPostInsertGenerator
Deprecated
for removal since 6.2. Subclasses should now directly inherit Basic implementation of the PostInsertIdentifierGenerator and
BulkInsertionCapableIdentifierGenerator, or even better, simply implement
org. directly.
PostInsertIdentifierGenerator contract.
|
| public abstract class | AbstractUUIDGenerator
Deprecated
since 6. since The base class for identifier generators that use a UUID algorithm.
UUIDHexGenerator is deprecated
|
| public class | Assigned
An |
| public class | CompositeNestedGeneratedValueGenerator
For composite identifiers, defines a number of "nested" generations that need to happen to "fill" the identifier property(s). |
| public class | |
| public class | ForeignGenerator
Deprecated
for removal since 6. This remains around as an implementation detail of The legacy id generator named hbm.xml mappings.
foreign.
|
| public class | GUIDGenerator
Deprecated
since 6.0. use The legacy id generator named org.
guid.
|
| public class | IdentifierGenerationException
Thrown by an |
| public class | IdentifierGeneratorHelper
Factory and helper methods for |
| public class | IdentityGenerator
An |
| public class | IncrementGenerator
An |
| public class | SelectGenerator
A generator that |
| public class | UUIDGenerator
Deprecated
since 6.0. use An org. and
org. instead
IdentifierGenerator which generates UUID values using a pluggable
generation strategy.
|
| public class | UUIDHexGenerator
Deprecated
since 6. This remains around as an implementation detail of The legacy id generator named hbm.xml mappings.
uuid / uuid.hex.
|
| Modifier and Type | Enum and Description |
|---|---|
| public enum | EntityIdentifierNature
Describes the possible natures of an entity-defined identifier. |
| public enum | SequenceMismatchStrategy
Describes the strategy for handling the mismatch between a database sequence configuration and the one defined by the entity mapping. |