E - The type of the container entityT - The type of the entity inside of the collectionpublic class CollectionProperty<E,T> extends PluralProperty<E,Collection<T>,T>
EntityClass that contains more than one value.| Constructor and Description |
|---|
CollectionProperty(EntityClass<?> sourceClass,
AttributeAccessor attribute,
javax.persistence.AssociationOverride override)
Creates a new collection property.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createPostInsertStatements(StatementsWriter writer,
E entity)
Creates additional SQL statements that are necessary after this property is written (e.g. for mapping tables).
|
Collection<?> |
findReferencedEntities(E entity)
Finds all entities in the current property, that are referenced.
|
protected GeneratorColumn |
getKeyColumn()
An optional column that contains the index / key of the values.
|
GeneratorColumn |
getOrderColumn()
The name of the column that saves the order of the entries in the collection.
|
Collection<T> |
getValue(E entity)
Resolves the current value for this property on the given entity.
|
addInsertExpression, buildEmbeddedProperties, buildIdColumn, buildValueColumn, createDirectValueStatement, createValueExpression, createValueStatement, generatePendingStatements, getAnyMapping, getContext, getDialect, getEmbeddedProperties, getEmbeddedPropertiesByName, getIdColumn, getInverseProperty, getMappedBy, getMappedId, getPropertyArgument, getRequiredEmbeddedProperties, getTable, getValueClass, getValueColumn, getValueConstructor, getValueConverter, getValueEntityClass, hasPluralAnnotation, isComposition, isEmbedded, isEntityReference, isRequired, isTableColumn, isUseTargetTable, newElementcreatePreInsertStatements, failIfRequired, getAttribute, getExpression, getName, getPredicate, getType, isComposition, setValue, toStringpublic CollectionProperty(EntityClass<?> sourceClass, AttributeAccessor attribute, javax.persistence.AssociationOverride override)
sourceClass - the description of the current inspected class that contains this propertyattribute - accessor to the represented attributeoverride - the configured assocation overridepublic void createPostInsertStatements(StatementsWriter writer, E entity) throws IOException
PropertycreatePostInsertStatements in class Property<E,Collection<T>>writer - the target of the created statementsentity - the inspected entityIOException - if the writer throws onepublic Collection<?> findReferencedEntities(E entity)
PropertyfindReferencedEntities in class Property<E,Collection<T>>entity - the inspected entityprotected GeneratorColumn getKeyColumn()
PluralPropertygetKeyColumn in class PluralProperty<E,Collection<T>,T>public Collection<T> getValue(E entity)
PropertygetValue in class Property<E,Collection<T>>entity - the entity to inspectnull if entity is null@Generated(value="lombok") public GeneratorColumn getOrderColumn()
Copyright © 2020 fastnate.org. All rights reserved.