Class HapiSequenceStyleGenerator

java.lang.Object
ca.uhn.fhir.jpa.model.dialect.HapiSequenceStyleGenerator
All Implemented Interfaces:
Serializable, org.hibernate.boot.model.relational.ExportableProducer, org.hibernate.generator.BeforeExecutionGenerator, org.hibernate.generator.Generator, org.hibernate.id.BulkInsertionCapableIdentifierGenerator, org.hibernate.id.Configurable, org.hibernate.id.factory.spi.StandardGenerator, org.hibernate.id.IdentifierGenerator, org.hibernate.id.OptimizableGenerator, org.hibernate.id.PersistentIdentifierGenerator

public class HapiSequenceStyleGenerator extends Object implements org.hibernate.id.PersistentIdentifierGenerator, org.hibernate.id.BulkInsertionCapableIdentifierGenerator, org.hibernate.boot.model.relational.ExportableProducer
This is a sequence generator that wraps the Hibernate default sequence generator SequenceStyleGenerator and by default will therefore work exactly as the default would, but allows for customization.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    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, PK, SCHEMA, TABLE, TABLES
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(org.hibernate.type.Type theType, Properties theParams, org.hibernate.service.ServiceRegistry theServiceRegistry)
     
    determineBulkInsertionIdentifierGenerationSelectFragment(org.hibernate.boot.model.relational.SqlStringGenerationContext theContext)
     
    generate(org.hibernate.engine.spi.SharedSessionContractImplementor theSession, Object theObject)
     
    org.hibernate.id.enhanced.Optimizer
     
    void
    initialize(org.hibernate.boot.model.relational.SqlStringGenerationContext context)
     
    void
    registerExportables(org.hibernate.boot.model.relational.Database database)
     
    boolean
     
    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.BeforeExecutionGenerator

    generatedOnExecution

    Methods inherited from interface org.hibernate.generator.Generator

    generatedOnExecution, generatesOnInsert, generatesOnUpdate, generatesSometimes

    Methods inherited from interface org.hibernate.id.IdentifierGenerator

    generate, getEventTypes
  • Field Details

  • Constructor Details

  • Method Details

    • supportsBulkInsertionIdentifierGeneration

      Specified by:
      supportsBulkInsertionIdentifierGeneration in interface org.hibernate.id.BulkInsertionCapableIdentifierGenerator
    • determineBulkInsertionIdentifierGenerationSelectFragment

      public String determineBulkInsertionIdentifierGenerationSelectFragment(org.hibernate.boot.model.relational.SqlStringGenerationContext theContext)
      Specified by:
      determineBulkInsertionIdentifierGenerationSelectFragment in interface org.hibernate.id.BulkInsertionCapableIdentifierGenerator
    • generate

      public Serializable generate(org.hibernate.engine.spi.SharedSessionContractImplementor theSession, Object theObject) throws org.hibernate.HibernateException
      Specified by:
      generate in interface org.hibernate.id.IdentifierGenerator
      Throws:
      org.hibernate.HibernateException
    • configure

      public void configure(org.hibernate.type.Type theType, Properties theParams, org.hibernate.service.ServiceRegistry theServiceRegistry) throws org.hibernate.MappingException
      Specified by:
      configure in interface org.hibernate.id.Configurable
      Specified by:
      configure in interface org.hibernate.id.IdentifierGenerator
      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.IdentifierGenerator
    • supportsJdbcBatchInserts

      public boolean supportsJdbcBatchInserts()
      Specified by:
      supportsJdbcBatchInserts in interface org.hibernate.id.IdentifierGenerator
    • getOptimizer

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