Module org.eclipse.persistence.jpa
Class MapAttributeImpl<X,K,V>
java.lang.Object
org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl<X,Map<K,V>>
org.eclipse.persistence.internal.jpa.metamodel.PluralAttributeImpl<X,Map<K,V>,V>
org.eclipse.persistence.internal.jpa.metamodel.MapAttributeImpl<X,K,V>
- Type Parameters:
X
- The type the represented Map belongs toK
- The type of the key of the represented MapV
- The type of the value of the represented Map
- All Implemented Interfaces:
Attribute<X,
,Map<K, V>> Bindable<V>
,MapAttribute<X,
,K, V> PluralAttribute<X,
,Map<K, V>, V> Serializable
public class MapAttributeImpl<X,K,V>
extends PluralAttributeImpl<X,Map<K,V>,V>
implements MapAttribute<X,K,V>
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.
- Since:
- EclipseLink 1.2 - JPA 2.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Attribute
Attribute.PersistentAttributeType
Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Bindable
Bindable.BindableType
Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.PluralAttribute
PluralAttribute.CollectionType
-
Constructor Summary
ModifierConstructorDescriptionprotected
MapAttributeImpl
(ManagedTypeImpl<X> managedType, CollectionMapping mapping) INTERNAL:protected
MapAttributeImpl
(ManagedTypeImpl<X> managedType, CollectionMapping mapping, boolean validationEnabled) INTERNAL: Create a new MapAttribute instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn the collection type.Return the Java type of the represented attribute.Return the Java type of the map key.Return the type representing the key type of the map.Methods inherited from class org.eclipse.persistence.internal.jpa.metamodel.PluralAttributeImpl
getBindableJavaType, getBindableType, getCollectionMapping, getElementType, isPlural, toString
Methods inherited from class org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl
getDeclaringType, getDescriptor, getJavaMember, getManagedTypeImpl, getMapping, getMetamodel, getName, getPersistentAttributeType, isAssociation, isCollection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface jakarta.persistence.metamodel.Attribute
getDeclaringType, getJavaMember, getName, getPersistentAttributeType, isAssociation, isCollection
Methods inherited from interface jakarta.persistence.metamodel.Bindable
getBindableJavaType, getBindableType
Methods inherited from interface jakarta.persistence.metamodel.PluralAttribute
getElementType
-
Constructor Details
-
MapAttributeImpl
INTERNAL: -
MapAttributeImpl
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- Parameters:
managedType
- - the owning type (EmbeddableTypes do not support mappings)mapping
- - contains the mapping policyvalidationEnabled
- - report errors in the metamodel
-
-
Method Details
-
getCollectionType
Return the collection type.- Specified by:
getCollectionType
in interfacePluralAttribute<X,
K, V> - Specified by:
getCollectionType
in classPluralAttributeImpl<X,
Map<K, V>, V> - Returns:
- collection type
-
getJavaType
Return the Java type of the represented attribute.- Specified by:
getJavaType
in interfaceAttribute<X,
K> - Specified by:
getJavaType
in classAttributeImpl<X,
Map<K, V>> - Returns:
- Java type
-
getKeyJavaType
Return the Java type of the map key.- Specified by:
getKeyJavaType
in interfaceMapAttribute<X,
K, V> - Returns:
- Java key type
- See Also:
-
getKeyType
Return the type representing the key type of the map.- Specified by:
getKeyType
in interfaceMapAttribute<X,
K, V> - Returns:
- type representing key type
- See Also:
-