Package org.hibernate.id.uuid
Class UuidGenerator
java.lang.Object
org.hibernate.id.uuid.UuidGenerator
- All Implemented Interfaces:
Serializable
,BeforeExecutionGenerator
,Generator
Generator for producing
UUID
values.
Uses a UuidValueGenerator and UUIDJavaType.ValueTransformer to
generate the values.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUuidGenerator
(Class<?> memberType) This form is used when there is no@UuidGenerator
but we know we want this generatorUuidGenerator
(UuidGenerator config, Member idMember) UuidGenerator
(UuidGenerator config, Member member, GeneratorCreationContext creationContext) UuidGenerator
(UuidGenerator config, org.hibernate.models.spi.MemberDetails memberDetails) This form is used when there is no@UuidGenerator
but we know we want this generator -
Method Summary
Modifier and TypeMethodDescriptiongenerate
(SharedSessionContractImplementor session, Object owner, Object currentValue, EventType eventType) Generate a value.The event types for which this generator should be called to produce a new value.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.generator.Generator
allowAssignedIdentifiers, allowMutation, generatedBeforeExecution, generatedOnExecution, generatesOnInsert, generatesOnUpdate, generatesSometimes
-
Constructor Details
-
UuidGenerator
This form is used when there is no@UuidGenerator
but we know we want this generator -
UuidGenerator
@Internal public UuidGenerator(UuidGenerator config, org.hibernate.models.spi.MemberDetails memberDetails) This form is used when there is no@UuidGenerator
but we know we want this generator -
UuidGenerator
-
UuidGenerator
-
-
Method Details
-
getEventTypes
Description copied from interface:Generator
The event types for which this generator should be called to produce a new value.Identifier generators must return
EventTypeSets.INSERT_ONLY
.- Specified by:
getEventTypes
in interfaceGenerator
- Returns:
EventTypeSets.INSERT_ONLY
-
getValueGenerator
-
getValueTransformer
-