Package org.fastnate.hibernate
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 entityT- 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
ConstructorsConstructorDescriptionAnyEntityProperty(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 newAnyEntityPropertyaccording to the given attribute. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.fastnate.generator.context.EntityProperty.MappingInformationfindEntityMappingInformation(org.fastnate.generator.context.AttributeAccessor attribute) getPredicate(E entity) protected voidwriteColumnExpression(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, isTableColumnMethods inherited from class org.fastnate.generator.context.Property
createPostInsertStatements, createPreInsertStatements, failIfRequired, getAttribute, getName, getType, getValue, isComposition, setValue, toString
-
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 newAnyEntityPropertyaccording to the given attribute.- Parameters:
context- the generator context.containerTable- the table that contains our columnsattribute- the accessor of the attributeassociationOverride- optionalAssociationOverrideconfigurationattributeOverride- optionalAttributeOverrideconfiguration
-
-
Method Details
-
findEntityMappingInformation
protected org.fastnate.generator.context.EntityProperty.MappingInformation findEntityMappingInformation(org.fastnate.generator.context.AttributeAccessor attribute) -
getPredicate
-
writeColumnExpression
protected void writeColumnExpression(org.fastnate.generator.statements.TableStatement statement, T value, org.fastnate.generator.statements.ColumnExpression expression)
-