Class AnyEntityProperty<E,T>

java.lang.Object
org.fastnate.generator.context.Property<E,T>
org.fastnate.generator.context.SingularProperty<E,T>
org.fastnate.generator.context.EntityProperty<E,T>
org.fastnate.hibernate.AnyEntityProperty<E,T>
Type Parameters:
E - The type of the container entity
T - The base type of the target entity

public final class AnyEntityProperty<E,T> extends org.fastnate.generator.context.EntityProperty<E,T>
Describes a property of an EntityClass that references an entity according to a Any mapping.
Author:
Tobias Liefke
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.fastnate.generator.context.EntityProperty

    org.fastnate.generator.context.EntityProperty.MappingInformation
  • Constructor Summary

    Constructors
    Constructor
    Description
    AnyEntityProperty(org.fastnate.generator.context.GeneratorContext context, org.fastnate.generator.context.GeneratorTable containerTable, org.fastnate.generator.context.AttributeAccessor attribute, jakarta.persistence.AssociationOverride associationOverride, jakarta.persistence.AttributeOverride attributeOverride)
    Builds a new AnyEntityProperty according to the given attribute.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.fastnate.generator.context.EntityProperty.MappingInformation
    findEntityMappingInformation(org.fastnate.generator.context.AttributeAccessor attribute)
     
    getPredicate(E entity)
     
    protected void
    writeColumnExpression(org.fastnate.generator.statements.TableStatement statement, T value, org.fastnate.generator.statements.ColumnExpression expression)
     

    Methods inherited from class org.fastnate.generator.context.EntityProperty

    addInsertExpression, findReferencedEntities, generatePendingStatements, getColumn, getContext, getExpression, getIdField, getInverseProperty, getMappedBy, getTargetClass, isComposition, isEntityProperty, isRequired, isTableColumn

    Methods inherited from class org.fastnate.generator.context.Property

    createPostInsertStatements, createPreInsertStatements, failIfRequired, getAttribute, getName, getType, getValue, isComposition, setValue, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AnyEntityProperty

      public AnyEntityProperty(org.fastnate.generator.context.GeneratorContext context, org.fastnate.generator.context.GeneratorTable containerTable, org.fastnate.generator.context.AttributeAccessor attribute, jakarta.persistence.AssociationOverride associationOverride, jakarta.persistence.AttributeOverride attributeOverride)
      Builds a new AnyEntityProperty according to the given attribute.
      Parameters:
      context - the generator context.
      containerTable - the table that contains our columns
      attribute - the accessor of the attribute
      associationOverride - optional AssociationOverride configuration
      attributeOverride - optional AttributeOverride configuration
  • Method Details

    • findEntityMappingInformation

      protected org.fastnate.generator.context.EntityProperty.MappingInformation findEntityMappingInformation(org.fastnate.generator.context.AttributeAccessor attribute)
      Overrides:
      findEntityMappingInformation in class org.fastnate.generator.context.EntityProperty<E,T>
    • getPredicate

      public String getPredicate(E entity)
      Overrides:
      getPredicate in class org.fastnate.generator.context.EntityProperty<E,T>
    • writeColumnExpression

      protected void writeColumnExpression(org.fastnate.generator.statements.TableStatement statement, T value, org.fastnate.generator.statements.ColumnExpression expression)
      Overrides:
      writeColumnExpression in class org.fastnate.generator.context.EntityProperty<E,T>