Class AbstractFieldGeneration<T extends Annotation>

java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.pojo.generator.AbstractFieldGeneration<T>
All Implemented Interfaces:
Serializable, org.hibernate.generator.AnnotationBasedGenerator<T>, org.hibernate.generator.BeforeExecutionGenerator, org.hibernate.generator.Generator
Direct Known Subclasses:
AlwaysFieldGeneration, InsertFieldGeneration

public abstract class AbstractFieldGeneration<T extends Annotation> extends Object implements org.hibernate.generator.BeforeExecutionGenerator, org.hibernate.generator.AnnotationBasedGenerator<T>
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)
     
    protected abstract String
    getFieldName(T annotation)
     
    protected abstract String
    getFieldType(T annotation)
     
    void
    initialize(T annotation, Member member, org.hibernate.generator.GeneratorCreationContext generatorCreationContext)
     

    Methods inherited from class 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, getEventTypes
  • Constructor Details

    • AbstractFieldGeneration

      public AbstractFieldGeneration()
  • Method Details

    • initialize

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

      protected abstract String getFieldName(T annotation)
    • getFieldType

      protected abstract String getFieldType(T annotation)
    • 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