Class CounterGeneration

java.lang.Object
ch.tocco.nice2.businessunit.impl.counter.CounterGeneration
All Implemented Interfaces:
Serializable, org.hibernate.generator.AnnotationBasedGenerator<Counter>, org.hibernate.generator.BeforeExecutionGenerator, org.hibernate.generator.Generator

public class CounterGeneration extends Object implements org.hibernate.generator.BeforeExecutionGenerator, org.hibernate.generator.AnnotationBasedGenerator<Counter>
Creates counters based on 'Counter' table for fields of type 'counter'.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    generate(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner, Object currentValue, org.hibernate.generator.EventType eventType)
     
    EnumSet<org.hibernate.generator.EventType>
     
    void
    initialize(Counter annotation, Member member, org.hibernate.generator.GeneratorCreationContext generatorCreationContext)
     

    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

    allowAssignedIdentifiers, allowMutation, generatedBeforeExecution, generatedOnExecution, generatesOnForceIncrement, generatesOnInsert, generatesOnUpdate, generatesSometimes
  • Constructor Details

    • CounterGeneration

      public CounterGeneration()
  • Method Details

    • initialize

      public void initialize(Counter annotation, Member member, org.hibernate.generator.GeneratorCreationContext generatorCreationContext)
      Specified by:
      initialize in interface org.hibernate.generator.AnnotationBasedGenerator<Counter>
    • getEventTypes

      public EnumSet<org.hibernate.generator.EventType> getEventTypes()
      Specified by:
      getEventTypes in interface org.hibernate.generator.Generator
    • 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