Class PortableSequenceGenerator

java.lang.Object
io.meeds.common.persistence.PortableSequenceGenerator
All Implemented Interfaces:
Serializable, org.hibernate.boot.model.relational.ExportableProducer, org.hibernate.generator.BeforeExecutionGenerator, org.hibernate.generator.Generator, org.hibernate.generator.OnExecutionGenerator, org.hibernate.id.Configurable, org.hibernate.id.IdentifierGenerator, org.hibernate.id.OptimizableGenerator, org.hibernate.id.PersistentIdentifierGenerator

public class PortableSequenceGenerator extends Object implements org.hibernate.generator.BeforeExecutionGenerator, org.hibernate.generator.OnExecutionGenerator, org.hibernate.id.Configurable, org.hibernate.id.PersistentIdentifierGenerator
See Also:
  • Field Summary

    Fields inherited from interface org.hibernate.id.IdentifierGenerator

    CONTRIBUTOR_NAME, ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME

    Fields inherited from interface org.hibernate.id.OptimizableGenerator

    DEFAULT_INCREMENT_SIZE, DEFAULT_INITIAL_VALUE, IMPLICIT_NAME_BASE, INCREMENT_PARAM, INITIAL_PARAM, OPT_PARAM

    Fields inherited from interface org.hibernate.id.PersistentIdentifierGenerator

    CATALOG, IDENTIFIER_NORMALIZER, OPTIONS, PK, SCHEMA, TABLE, TABLES
  • Constructor Summary

    Constructors
    Constructor
    Description
    PortableSequenceGenerator(PortableSequence config, Member annotatedMember, org.hibernate.generator.GeneratorCreationContext context)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(org.hibernate.generator.GeneratorCreationContext context, Properties parameters)
     
    generate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object object)
     
    generate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner, Object currentValue, org.hibernate.generator.EventType eventType)
     
    boolean
     
    EnumSet<org.hibernate.generator.EventType>
     
    org.hibernate.id.insert.InsertGeneratedIdentifierDelegate
    getGeneratedIdentifierDelegate(org.hibernate.persister.entity.EntityPersister persister)
     
    org.hibernate.id.enhanced.Optimizer
     
    getReferencedColumnValues(org.hibernate.dialect.Dialect dialect)
     
    void
    initialize(org.hibernate.boot.model.relational.SqlStringGenerationContext context)
     
    boolean
    referenceColumnsInSql(org.hibernate.dialect.Dialect dialect)
     
    void
    registerExportables(org.hibernate.boot.model.relational.Database database)
     
    boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.hibernate.generator.Generator

    allowAssignedIdentifiers, allowMutation, generatedBeforeExecution, generatedOnExecution, generatesOnForceIncrement, generatesOnInsert, generatesOnUpdate, generatesSometimes

    Methods inherited from interface org.hibernate.id.IdentifierGenerator

    configure

    Methods inherited from interface org.hibernate.generator.OnExecutionGenerator

    getUniqueKeyPropertyNames
  • Constructor Details

    • PortableSequenceGenerator

      public PortableSequenceGenerator(PortableSequence config, Member annotatedMember, org.hibernate.generator.GeneratorCreationContext context)
  • Method Details

    • configure

      public void configure(org.hibernate.generator.GeneratorCreationContext context, Properties parameters) throws org.hibernate.MappingException
      Specified by:
      configure in interface org.hibernate.id.Configurable
      Throws:
      org.hibernate.MappingException
    • registerExportables

      public void registerExportables(org.hibernate.boot.model.relational.Database database)
      Specified by:
      registerExportables in interface org.hibernate.boot.model.relational.ExportableProducer
      Specified by:
      registerExportables in interface org.hibernate.id.IdentifierGenerator
    • initialize

      public void initialize(org.hibernate.boot.model.relational.SqlStringGenerationContext context)
      Specified by:
      initialize in interface org.hibernate.id.Configurable
    • getEventTypes

      public EnumSet<org.hibernate.generator.EventType> getEventTypes()
      Specified by:
      getEventTypes in interface org.hibernate.generator.Generator
      Specified by:
      getEventTypes in interface org.hibernate.id.IdentifierGenerator
    • generatedOnExecution

      public boolean generatedOnExecution()
      Specified by:
      generatedOnExecution in interface org.hibernate.generator.BeforeExecutionGenerator
      Specified by:
      generatedOnExecution in interface org.hibernate.generator.Generator
      Specified by:
      generatedOnExecution in interface org.hibernate.generator.OnExecutionGenerator
    • generate

      public Object generate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner, Object currentValue, org.hibernate.generator.EventType eventType)
      Specified by:
      generate in interface org.hibernate.generator.BeforeExecutionGenerator
      Specified by:
      generate in interface org.hibernate.id.IdentifierGenerator
    • generate

      public Object generate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object object)
      Specified by:
      generate in interface org.hibernate.id.IdentifierGenerator
    • referenceColumnsInSql

      public boolean referenceColumnsInSql(org.hibernate.dialect.Dialect dialect)
      Specified by:
      referenceColumnsInSql in interface org.hibernate.generator.OnExecutionGenerator
    • writePropertyValue

      public boolean writePropertyValue()
      Specified by:
      writePropertyValue in interface org.hibernate.generator.OnExecutionGenerator
    • getReferencedColumnValues

      public String[] getReferencedColumnValues(org.hibernate.dialect.Dialect dialect)
      Specified by:
      getReferencedColumnValues in interface org.hibernate.generator.OnExecutionGenerator
    • getOptimizer

      public org.hibernate.id.enhanced.Optimizer getOptimizer()
      Specified by:
      getOptimizer in interface org.hibernate.id.OptimizableGenerator
    • getGeneratedIdentifierDelegate

      public org.hibernate.id.insert.InsertGeneratedIdentifierDelegate getGeneratedIdentifierDelegate(org.hibernate.persister.entity.EntityPersister persister)
      Specified by:
      getGeneratedIdentifierDelegate in interface org.hibernate.generator.OnExecutionGenerator