E - The type of the container entityK - The type of the key of the mapT - The type of the entity inside of the collectionpublic class MapProperty<E,K,T> extends PluralProperty<E,Map<K,T>,T>
EntityClass that is a Map.| Constructor and Description |
|---|
MapProperty(EntityClass<?> sourceClass,
AttributeAccessor attribute,
javax.persistence.AssociationOverride override)
Creates a new map 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.
|
Class<K> |
getKeyClass()
The class of the key of the map.
|
GeneratorColumn |
getKeyColumn()
The name of the column that contains the key.
|
ValueConverter<K> |
getKeyConverter()
The converter for the target value,
null if not a primitive value. |
EntityClass<K> |
getKeyEntityClass()
The description of the key class,
null if not an entity. |
Map<K,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 MapProperty(EntityClass<?> sourceClass, AttributeAccessor attribute, javax.persistence.AssociationOverride override)
sourceClass - the description of the current inspected class that contains this propertyattribute - the accessor of the represented attributeoverride - the configured assocation overridepublic void createPostInsertStatements(StatementsWriter writer, E entity) throws IOException
PropertycreatePostInsertStatements in class Property<E,Map<K,T>>writer - the target of the created statementsentity - the inspected entityIOException - if the writer throws onepublic Collection<?> findReferencedEntities(E entity)
Propertypublic Map<K,T> getValue(E entity)
Property@Generated(value="lombok") public Class<K> getKeyClass()
@Generated(value="lombok") public EntityClass<K> getKeyEntityClass()
null if not an entity.@Generated(value="lombok") public ValueConverter<K> getKeyConverter()
null if not a primitive value.@Generated(value="lombok") public GeneratorColumn getKeyColumn()
getKeyColumn in class PluralProperty<E,Map<K,T>,T>Copyright © 2020 fastnate.org. All rights reserved.