Class MapAttributeImpl<X,​K,​V>

  • Type Parameters:
    X - The type the represented Map belongs to
    K - The type of the key of the represented Map
    V - The type of the value of the represented Map
    All Implemented Interfaces:
    jakarta.persistence.metamodel.Attribute<X,​Map<K,​V>>, jakarta.persistence.metamodel.Bindable<V>, jakarta.persistence.metamodel.MapAttribute<X,​K,​V>, jakarta.persistence.metamodel.PluralAttribute<X,​Map<K,​V>,​V>, Serializable

    public class MapAttributeImpl<X,​K,​V>
    extends PluralAttributeImpl<X,​Map<K,​V>,​V>
    implements jakarta.persistence.metamodel.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:
    MapAttribute, Serialized Form
    • Constructor Detail

      • 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 policy
        validationEnabled - - report errors in the metamodel
    • Method Detail

      • getCollectionType

        public jakarta.persistence.metamodel.PluralAttribute.CollectionType getCollectionType()
        Return the collection type.
        Specified by:
        getCollectionType in interface jakarta.persistence.metamodel.PluralAttribute<X,​K,​V>
        Specified by:
        getCollectionType in class PluralAttributeImpl<X,​Map<K,​V>,​V>
        Returns:
        collection type
      • getJavaType

        public Class getJavaType()
        Return the Java type of the represented attribute.
        Specified by:
        getJavaType in interface jakarta.persistence.metamodel.Attribute<X,​K>
        Specified by:
        getJavaType in class AttributeImpl<X,​Map<K,​V>>
        Returns:
        Java type
      • getKeyJavaType

        public Class<K> getKeyJavaType()
        Return the Java type of the map key.
        Specified by:
        getKeyJavaType in interface jakarta.persistence.metamodel.MapAttribute<X,​K,​V>
        Returns:
        Java key type
        See Also:
        MapAttribute
      • getKeyType

        public jakarta.persistence.metamodel.Type<K> getKeyType()
        Return the type representing the key type of the map.
        Specified by:
        getKeyType in interface jakarta.persistence.metamodel.MapAttribute<X,​K,​V>
        Returns:
        type representing key type
        See Also:
        MapAttribute