Top Fields Constructors Methods
org.hibernate.boot.model.internal

public Class GeneratorBinder

extends Object
Class Inheritance
Imports
java.lang.annotation.Annotation, java.lang.reflect.InvocationTargetException, .Member, java.util.HashMap, .Map, org.hibernate.AnnotationException, .AssertionFailure, .HibernateException, .MappingException, org.hibernate.annotations.GenericGenerator, .IdGeneratorType, .Parameter, .ValueGenerationType, org.hibernate.annotations.common.reflection.XAnnotatedElement, .XClass, .XProperty, org.hibernate.boot.internal.GenerationStrategyInterpreter, org.hibernate.boot.model.IdentifierGeneratorDefinition, org.hibernate.boot.model.relational.ExportableProducer, org.hibernate.boot.spi.InFlightMetadataCollector, .MetadataBuildingContext, .PropertyData, org.hibernate.generator.AnnotationBasedGenerator, .BeforeExecutionGenerator, .Generator, .GeneratorCreationContext, .OnExecutionGenerator, org.hibernate.id.IdentifierGenerator, .PersistentIdentifierGenerator, org.hibernate.id.factory.spi.CustomIdGeneratorCreationContext, org.hibernate.internal.CoreLogging, org.hibernate.mapping.GeneratorCreator, .IdentifierGeneratorCreator, .SimpleValue, .Table, org.jboss.logging.Logger, jakarta.persistence.GeneratedValue, .GenerationType, .SequenceGenerator, .SequenceGenerators, .TableGenerator, .TableGenerators, .Version

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Map<String, IdentifierGeneratorDefinition>
pack-priv static IdentifierGeneratorDefinition
buildIdGenerator(Annotation generatorAnnotation, MetadataBuildingContext context)

private static <A extends Annotation> void
callInitialize(A annotation, Member member, GeneratorCreationContext creationContext, Generator generator)

private static void
checkGeneratorClass(Class<? extends Generator> generatorClass)

private static void
checkGeneratorInterfaces(Class<? extends Generator> generatorClass)

private static void
checkIdGeneratorTiming(Class<? extends Annotation> annotationType, Generator generator)

private static void
pack-priv static IdentifierGeneratorDefinition
pack-priv static void
createIdGenerator(SimpleValue idValue, Map<String, IdentifierGeneratorDefinition> classGenerators, MetadataBuildingContext context, XClass entityClass, XProperty idProperty)

pack-priv static GeneratorCreator
generatorCreator(XProperty property, Annotation annotation)

In case the given annotation is a value generator annotation, the corresponding value generation strategy to be applied to the given property is returned, null otherwise.

pack-priv static String
generatorType(MetadataBuildingContext context, XClass entityXClass, boolean isComponent, GeneratedValue generatedValue)

pack-priv static String
generatorType(GeneratedValue generatedValue, final XClass javaClass, MetadataBuildingContext context)

pack-priv static IdentifierGeneratorCreator
private static <C, G extends Generator> G
instantiateGenerator(Annotation annotation, Member member, Class<? extends Annotation> annotationType, C creationContext, Class<C> contextClass, Class<? extends G> generatorClass)

private static GenerationType
private static IdentifierGeneratorDefinition
public static void
makeIdGenerator(SimpleValue id, XProperty property, String generatorType, String generatorName, MetadataBuildingContext buildingContext, Map<String, IdentifierGeneratorDefinition> localGenerators)

Apply an id generation strategy and parameters to the given SimpleValue which represents an identifier.

public static void
makeIdGenerator(SimpleValue id, XProperty idXProperty, String generatorType, String generatorName, MetadataBuildingContext buildingContext, IdentifierGeneratorDefinition foreignKGeneratorDefinition)

apply an id generator to a SimpleValue

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Logger LOG

Constructor Detail

GeneratorBinderback to summary
public GeneratorBinder()

Method Detail

buildGeneratorsback to summary
public static Map<String, IdentifierGeneratorDefinition> buildGenerators(XAnnotatedElement annotatedElement, MetadataBuildingContext context)
buildIdGeneratorback to summary
pack-priv static IdentifierGeneratorDefinition buildIdGenerator(Annotation generatorAnnotation, MetadataBuildingContext context)
callInitializeback to summary
private static <A extends Annotation> void callInitialize(A annotation, Member member, GeneratorCreationContext creationContext, Generator generator)
checkGeneratorClassback to summary
private static void checkGeneratorClass(Class<? extends Generator> generatorClass)
checkGeneratorInterfacesback to summary
private static void checkGeneratorInterfaces(Class<? extends Generator> generatorClass)
checkIdGeneratorTimingback to summary
private static void checkIdGeneratorTiming(Class<? extends Annotation> annotationType, Generator generator)
checkVersionGenerationAlwaysback to summary
private static void checkVersionGenerationAlways(XProperty property, Generator generator)
createForeignGeneratorback to summary
pack-priv static IdentifierGeneratorDefinition createForeignGenerator(PropertyData mapsIdProperty)
createIdGeneratorback to summary
pack-priv static void createIdGenerator(SimpleValue idValue, Map<String, IdentifierGeneratorDefinition> classGenerators, MetadataBuildingContext context, XClass entityClass, XProperty idProperty)
generatorCreatorback to summary
pack-priv static GeneratorCreator generatorCreator(XProperty property, Annotation annotation)

In case the given annotation is a value generator annotation, the corresponding value generation strategy to be applied to the given property is returned, null otherwise. Instantiates the given generator annotation type, initializing it with the given instance of the corresponding generator annotation and the property's type.

generatorTypeback to summary
pack-priv static String generatorType(MetadataBuildingContext context, XClass entityXClass, boolean isComponent, GeneratedValue generatedValue)
generatorTypeback to summary
pack-priv static String generatorType(GeneratedValue generatedValue, final XClass javaClass, MetadataBuildingContext context)
identifierGeneratorCreatorback to summary
pack-priv static IdentifierGeneratorCreator identifierGeneratorCreator(XProperty idProperty, Annotation annotation)
instantiateGeneratorback to summary
private static <C, G extends Generator> G instantiateGenerator(Annotation annotation, Member member, Class<? extends Annotation> annotationType, C creationContext, Class<C> contextClass, Class<? extends G> generatorClass)
interpretGenerationTypeback to summary
private static GenerationType interpretGenerationType(GeneratedValue generatedValueAnn)
makeIdentifierGeneratorDefinitionback to summary
private static IdentifierGeneratorDefinition makeIdentifierGeneratorDefinition(String name, XProperty idProperty, Map<String, IdentifierGeneratorDefinition> localGenerators, MetadataBuildingContext buildingContext)
makeIdGeneratorback to summary
public static void makeIdGenerator(SimpleValue id, XProperty property, String generatorType, String generatorName, MetadataBuildingContext buildingContext, Map<String, IdentifierGeneratorDefinition> localGenerators)

Apply an id generation strategy and parameters to the given SimpleValue which represents an identifier.

makeIdGeneratorback to summary
public static void makeIdGenerator(SimpleValue id, XProperty idXProperty, String generatorType, String generatorName, MetadataBuildingContext buildingContext, IdentifierGeneratorDefinition foreignKGeneratorDefinition)

apply an id generator to a SimpleValue