Class QuarkusMutableIdentifierGeneratorFactory
- java.lang.Object
-
- io.quarkus.hibernate.orm.runtime.service.QuarkusMutableIdentifierGeneratorFactory
-
- All Implemented Interfaces:
Serializable
,org.hibernate.id.factory.IdentifierGeneratorFactory
,org.hibernate.service.Service
public final class QuarkusMutableIdentifierGeneratorFactory extends Object implements org.hibernate.id.factory.IdentifierGeneratorFactory, Serializable
Wraps the default DefaultIdentifierGeneratorFactory so to make sure we store the Class references of any IdentifierGenerator which is accessed during the build of the Metadata. This is not to register them for reflection access: all reflective instantiation is performed during the build of the Metadata and is therefore safe even in native mode; however we still need the Class instances as some runtime operations will need these, and will look them up by either fully qualified name (and then reflection) or strategy name. Since all IdentifierGenerator types used by a model are accessed during the Metadata creation, just watching for these will provide the full list of Class instances we need to keep.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description QuarkusMutableIdentifierGeneratorFactory(org.hibernate.service.ServiceRegistry serviceRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.hibernate.id.IdentifierGenerator
createIdentifierGenerator(jakarta.persistence.GenerationType generationType, String generatedValueGeneratorName, String generatorName, org.hibernate.type.descriptor.java.JavaType<?> javaType, Properties config, org.hibernate.id.factory.spi.GeneratorDefinitionResolver definitionResolver)
org.hibernate.generator.Generator
createIdentifierGenerator(String strategy, org.hibernate.type.Type type, Properties config)
org.hibernate.dialect.Dialect
getDialect()
Class
getIdentifierGeneratorClass(String strategy)
void
register(String strategy, Class generatorClass)
-
-
-
Method Detail
-
getDialect
public org.hibernate.dialect.Dialect getDialect()
- Specified by:
getDialect
in interfaceorg.hibernate.id.factory.IdentifierGeneratorFactory
-
createIdentifierGenerator
public org.hibernate.generator.Generator createIdentifierGenerator(String strategy, org.hibernate.type.Type type, Properties config)
- Specified by:
createIdentifierGenerator
in interfaceorg.hibernate.id.factory.IdentifierGeneratorFactory
-
getIdentifierGeneratorClass
public Class getIdentifierGeneratorClass(String strategy)
- Specified by:
getIdentifierGeneratorClass
in interfaceorg.hibernate.id.factory.IdentifierGeneratorFactory
-
createIdentifierGenerator
public org.hibernate.id.IdentifierGenerator createIdentifierGenerator(jakarta.persistence.GenerationType generationType, String generatedValueGeneratorName, String generatorName, org.hibernate.type.descriptor.java.JavaType<?> javaType, Properties config, org.hibernate.id.factory.spi.GeneratorDefinitionResolver definitionResolver)
- Specified by:
createIdentifierGenerator
in interfaceorg.hibernate.id.factory.IdentifierGeneratorFactory
-
-