Class QuarkusMutableIdentifierGeneratorFactory
- java.lang.Object
-
- io.quarkus.hibernate.orm.runtime.service.QuarkusMutableIdentifierGeneratorFactory
-
- All Implemented Interfaces:
Serializable,org.hibernate.id.factory.IdentifierGeneratorFactory,org.hibernate.id.factory.spi.MutableIdentifierGeneratorFactory,org.hibernate.service.Service,org.hibernate.service.spi.ServiceRegistryAwareService
public final class QuarkusMutableIdentifierGeneratorFactory extends Object implements org.hibernate.id.factory.spi.MutableIdentifierGeneratorFactory, Serializable, org.hibernate.service.spi.ServiceRegistryAwareService
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()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.hibernate.id.IdentifierGeneratorcreateIdentifierGenerator(String strategy, org.hibernate.type.Type type, Properties config)org.hibernate.dialect.DialectgetDialect()ClassgetIdentifierGeneratorClass(String strategy)voidinjectServices(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry)voidregister(String strategy, Class generatorClass)voidsetDialect(org.hibernate.dialect.Dialect dialect)
-
-
-
Method Detail
-
register
public void register(String strategy, Class generatorClass)
- Specified by:
registerin interfaceorg.hibernate.id.factory.spi.MutableIdentifierGeneratorFactory
-
getDialect
public org.hibernate.dialect.Dialect getDialect()
- Specified by:
getDialectin interfaceorg.hibernate.id.factory.IdentifierGeneratorFactory
-
setDialect
public void setDialect(org.hibernate.dialect.Dialect dialect)
- Specified by:
setDialectin interfaceorg.hibernate.id.factory.IdentifierGeneratorFactory
-
createIdentifierGenerator
public org.hibernate.id.IdentifierGenerator createIdentifierGenerator(String strategy, org.hibernate.type.Type type, Properties config)
- Specified by:
createIdentifierGeneratorin interfaceorg.hibernate.id.factory.IdentifierGeneratorFactory
-
getIdentifierGeneratorClass
public Class getIdentifierGeneratorClass(String strategy)
- Specified by:
getIdentifierGeneratorClassin interfaceorg.hibernate.id.factory.IdentifierGeneratorFactory
-
injectServices
public void injectServices(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry)
- Specified by:
injectServicesin interfaceorg.hibernate.service.spi.ServiceRegistryAwareService
-
-