Class MapAttributeImpl<X,K,V>
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl<X,C>
-
- org.eclipse.persistence.internal.jpa.metamodel.PluralAttributeImpl<X,java.util.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:
java.io.Serializable,javax.persistence.metamodel.Attribute<X,java.util.Map<K,V>>,javax.persistence.metamodel.Bindable<V>,javax.persistence.metamodel.MapAttribute<X,K,V>,javax.persistence.metamodel.PluralAttribute<X,java.util.Map<K,V>,V>
public class MapAttributeImpl<X,K,V> extends PluralAttributeImpl<X,java.util.Map<K,V>,V> implements javax.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.persistence.metamodel.Attribute
javax.persistence.metamodel.Attribute.PersistentAttributeType
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMapAttributeImpl(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.CollectionMapping mapping)INTERNAL:protectedMapAttributeImpl(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.CollectionMapping mapping, boolean validationEnabled)INTERNAL: Create a new MapAttribute instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.persistence.metamodel.PluralAttribute.CollectionTypegetCollectionType()Return the collection type.java.lang.ClassgetJavaType()Return the Java type of the represented attribute.java.lang.Class<K>getKeyJavaType()Return the Java type of the map key.javax.persistence.metamodel.Type<K>getKeyType()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 javax.persistence.metamodel.Attribute
getDeclaringType, getJavaMember, getName, getPersistentAttributeType, isAssociation, isCollection
-
-
-
-
Constructor Detail
-
MapAttributeImpl
protected MapAttributeImpl(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.CollectionMapping mapping)
INTERNAL:- Parameters:
managedType-mapping-
-
MapAttributeImpl
protected MapAttributeImpl(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.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 Detail
-
getCollectionType
public javax.persistence.metamodel.PluralAttribute.CollectionType getCollectionType()
Return the collection type.- Specified by:
getCollectionTypein interfacejavax.persistence.metamodel.PluralAttribute<X,K,V>- Specified by:
getCollectionTypein classPluralAttributeImpl<X,java.util.Map<K,V>,V>- Returns:
- collection type
-
getJavaType
public java.lang.Class getJavaType()
Return the Java type of the represented attribute.- Specified by:
getJavaTypein interfacejavax.persistence.metamodel.Attribute<X,K>- Specified by:
getJavaTypein classAttributeImpl<X,java.util.Map<K,V>>- Returns:
- Java type
-
getKeyJavaType
public java.lang.Class<K> getKeyJavaType()
Return the Java type of the map key.
-
-