Class 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 Detail

      • QuarkusMutableIdentifierGeneratorFactory

        public QuarkusMutableIdentifierGeneratorFactory()
    • Method Detail

      • register

        public void register​(String strategy,
                             Class generatorClass)
        Specified by:
        register in interface org.hibernate.id.factory.spi.MutableIdentifierGeneratorFactory
      • getDialect

        public org.hibernate.dialect.Dialect getDialect()
        Specified by:
        getDialect in interface org.hibernate.id.factory.IdentifierGeneratorFactory
      • setDialect

        public void setDialect​(org.hibernate.dialect.Dialect dialect)
        Specified by:
        setDialect in interface org.hibernate.id.factory.IdentifierGeneratorFactory
      • createIdentifierGenerator

        public org.hibernate.id.IdentifierGenerator createIdentifierGenerator​(String strategy,
                                                                              org.hibernate.type.Type type,
                                                                              Properties config)
        Specified by:
        createIdentifierGenerator in interface org.hibernate.id.factory.IdentifierGeneratorFactory
      • getIdentifierGeneratorClass

        public Class getIdentifierGeneratorClass​(String strategy)
        Specified by:
        getIdentifierGeneratorClass in interface org.hibernate.id.factory.IdentifierGeneratorFactory
      • injectServices

        public void injectServices​(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry)
        Specified by:
        injectServices in interface org.hibernate.service.spi.ServiceRegistryAwareService