Purpose: Provides the implementation for the MapAttribute interface of the JPA 2.0 Metamodel API (part of the JSR-317 EJB 3.1 Criteria API)
Description: Instances of the type MapAttribute represent persistent Map-valued attributes.
jakarta.persistence.metamodel.MapAttribute
| Modifier and Type | Field and Description |
|---|---|
| private Type | keyType
The key type that this Map type is based on |
| private static final long | serialVersionUID
Item 54: DI 89: explicit UID will avoid performance hit runtime generation of one |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | MapAttributeImpl(ManagedTypeImpl<X>
- the owning type (EmbeddableTypes do not support mappings) managedType, CollectionMapping - contains the mapping policy mapping, boolean - report errors in the metamodel validationEnabled)INTERNAL: Create a new MapAttribute instance. |
| Modifier and Type | Method and Description |
|---|---|
| public PluralAttribute. | Returns: collection typeImplements abstract org. Implements jakarta. |
| public Class | Returns: Java typeImplements abstract org. Implements jakarta. |
| public Class | Returns: Java key typeImplements jakarta. |
| public Type | Returns: type representing key typeImplements jakarta. |
| private Class | getOwningPKTypeWhenMapKeyAnnotationMissingOrDefaulted(MappedKeyMapContainerPolicy policy)
INTERNAL: Default to the PK of the owning descriptor when no MapKey or MapKey:name attribute is specified. |
| keyType | back to summary |
|---|---|
| private Type<K> keyType The key type that this Map type is based on | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Item 54: DI 89: explicit UID will avoid performance hit runtime generation of one | |
| MapAttributeImpl | back to summary |
|---|---|
| protected MapAttributeImpl(ManagedTypeImpl<X> managedType, CollectionMapping mapping) INTERNAL: | |
| MapAttributeImpl | back to summary |
|---|---|
| protected MapAttributeImpl(ManagedTypeImpl<X> managedType, CollectionMapping mapping, boolean validationEnabled) INTERNAL: Create a new MapAttribute instance. The elementType field is instantiated in the superclass. The keyType field is instantiated in this constructor by using one of the following A) MapContainerPolicy by consulting the keyField or PK class B) MappedKeyMapContainerPolicy by using the mapKeyTargetType on the keyMapping or the attributeClassification on the attributeAccessor
| |
| getCollectionType | back to summary |
|---|---|
| public PluralAttribute. Implements abstract org. Implements jakarta. Return the collection type.
| |
| getJavaType | back to summary |
|---|---|
| public Class Implements abstract org. Implements jakarta. Return the Java type of the represented attribute.
| |
| getKeyJavaType | back to summary |
|---|---|
| public Class Implements jakarta. Return the Java type of the map key.
| |
| getKeyType | back to summary |
|---|---|
| public Type Implements jakarta. Return the type representing the key type of the map.
| |
| getOwningPKTypeWhenMapKeyAnnotationMissingOrDefaulted | back to summary |
|---|---|
| private Class INTERNAL: Default to the PK of the owning descriptor when no MapKey or MapKey:name attribute is specified. Prerequisites: policy on the mapping is of type MappedKeyMapPolicy | |