Package org.hibernate.id
Class UUIDGenerator
java.lang.Object
org.hibernate.id.UUIDGenerator
- All Implemented Interfaces:
Serializable
,ExportableProducer
,BeforeExecutionGenerator
,Generator
,Configurable
,IdentifierGenerator
Deprecated.
An
IdentifierGenerator
which generates UUID
values using a pluggable
generation strategy
. The values this generator can return
include UUID
, String
and byte[16]
Supports 2 config parameters:
UUID_GEN_STRATEGY
- names theUUIDGenerationStrategy
instance to useUUID_GEN_STRATEGY_CLASS
- names theUUIDGenerationStrategy
class to use
Currently, there are 2 standard implementations of UUIDGenerationStrategy
:
StandardRandomStrategy
(the default, if none specified)CustomVersionOneStrategy
- See Also:
-
Field Summary
FieldsFields inherited from interface org.hibernate.id.IdentifierGenerator
CONTRIBUTOR_NAME, ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
configure
(GeneratorCreationContext creationContext, Properties parameters) Deprecated.Configure this instance, given the value of parameters specified by the user as XML<param>
elements and@Parameter
annotations.generate
(SharedSessionContractImplementor session, Object object) Deprecated.Generate a new identifier.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hibernate.generator.BeforeExecutionGenerator
generatedOnExecution
Methods inherited from interface org.hibernate.id.Configurable
initialize
Methods inherited from interface org.hibernate.generator.Generator
allowAssignedIdentifiers, allowMutation, generatedBeforeExecution, generatedOnExecution, generatesOnInsert, generatesOnUpdate, generatesSometimes
Methods inherited from interface org.hibernate.id.IdentifierGenerator
configure, generate, getEventTypes, registerExportables
-
Field Details
-
UUID_GEN_STRATEGY
Deprecated.- See Also:
-
UUID_GEN_STRATEGY_CLASS
Deprecated.- See Also:
-
-
Constructor Details
-
UUIDGenerator
public UUIDGenerator()Deprecated.
-
-
Method Details
-
configure
public void configure(GeneratorCreationContext creationContext, Properties parameters) throws MappingException Deprecated.Description copied from interface:Configurable
Configure this instance, given the value of parameters specified by the user as XML<param>
elements and@Parameter
annotations.This method is called just once, following instantiation. If this instance also implements
ExportableProducer
, then this method is always called beforeExportableProducer.registerExportables(Database)
,- Specified by:
configure
in interfaceConfigurable
- Parameters:
creationContext
- Access to the generator creation contextparameters
- param values, keyed by parameter name- Throws:
MappingException
- when there's something wrong with the given parameters
-
UuidGenerator
andUuidGenerator
instead