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 |
|---|---|
List<EntityStatement> |
createPostInsertStatements(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.
|
List<EntityStatement> |
generatePendingStatements(E entity,
Object writtenEntity,
Object... arguments)
Generates the update statements for an entity that are required after another entity was generated.
|
Collection<T> |
getValue(E entity)
Resolves the current value for this property on the given entity.
|
addInsertExpression, buildEmbeddedProperties, buildIdColumn, buildIdColumn, buildTableName, buildTableName, buildValueColumn, getIdColumn, getPropertyArgument, getTable, getValueColumn, isEmbedded, isRequired, isTableColumncreatePreInsertStatements, failIfRequired, getExpression, getName, getPredicate, setValue, toStringpublic CollectionProperty(EntityClass<?> sourceClass, AttributeAccessor attribute, javax.persistence.AssociationOverride override)
sourceClass - the description of the current inspected class of the accessorattribute - accessor to the represented attributeoverride - the configured assocation overridepublic List<EntityStatement> createPostInsertStatements(E entity)
PropertycreatePostInsertStatements in class Property<E,Collection<T>>entity - the inspected entitypublic Collection<?> findReferencedEntities(E entity)
PropertyfindReferencedEntities in class Property<E,Collection<T>>entity - the inspected entitypublic List<EntityStatement> generatePendingStatements(E entity, Object writtenEntity, Object... arguments)
PropertyEntityClass.markPendingUpdates(E, V, org.fastnate.generator.context.Property<V, ?>, java.lang.Object...) was called before for writtenEntitygeneratePendingStatements in class Property<E,Collection<T>>entity - the entity that needs to be updatedwrittenEntity - the entity that exists now in the databasearguments - additional arguments that where given to markPendingUpdatespublic Collection<T> getValue(E entity)
PropertygetValue in class Property<E,Collection<T>>entity - the entity to inspectnull if entity is nullCopyright © 2016 fastnate.org. All rights reserved.