Class TurUuidGenerator
java.lang.Object
com.viglet.turing.persistence.utils.TurUuidGenerator
- All Implemented Interfaces:
Serializable, org.hibernate.generator.AnnotationBasedGenerator<TurAssignableUuidGenerator>, org.hibernate.generator.BeforeExecutionGenerator, org.hibernate.generator.Generator
public class TurUuidGenerator
extends Object
implements org.hibernate.generator.BeforeExecutionGenerator, org.hibernate.generator.AnnotationBasedGenerator<TurAssignableUuidGenerator>
Custom UUID generator that allows pre-assigned identifiers.
* Updated to Hibernate 6 compatibility using AnnotationBasedGenerator.
- Since:
- 0.3.9
- Author:
- Alexandre Oliveira
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangenerate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner, Object currentValue, org.hibernate.generator.EventType eventType) booleanEnumSet<org.hibernate.generator.EventType> voidinitialize(TurAssignableUuidGenerator annotation, Member member, org.hibernate.generator.GeneratorCreationContext context) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.generator.Generator
allowMutation, generatedBeforeExecution, generatedOnExecution, generatesOnForceIncrement, generatesOnInsert, generatesOnUpdate, generatesSometimes
-
Constructor Details
-
TurUuidGenerator
public TurUuidGenerator()
-
-
Method Details
-
initialize
public void initialize(TurAssignableUuidGenerator annotation, Member member, org.hibernate.generator.GeneratorCreationContext context) - Specified by:
initializein interfaceorg.hibernate.generator.AnnotationBasedGenerator<TurAssignableUuidGenerator>
-
generatedOnExecution
public boolean generatedOnExecution()- Specified by:
generatedOnExecutionin interfaceorg.hibernate.generator.BeforeExecutionGenerator- Specified by:
generatedOnExecutionin interfaceorg.hibernate.generator.Generator
-
allowAssignedIdentifiers
public boolean allowAssignedIdentifiers()- Specified by:
allowAssignedIdentifiersin interfaceorg.hibernate.generator.Generator
-
getEventTypes
- Specified by:
getEventTypesin interfaceorg.hibernate.generator.Generator
-