javax.persistence.metamodel.MapAttribute - JPA interface
javax.persistence.metamodel
Interface MapAttribute<X,K,V>
- Superinterfaces:
- Attribute<X,Map<K,V>>, Bindable<V>, PluralAttribute<X,Map<K,V>,V>
Instances of the type
MapAttribute
represent persistent java.util.Map
-valued attributes. - Since:
- JPA 2.0
Class<T> getBindableJavaType()
Return the Java type of the represented object. If the bindable type of the object is
PLURAL_ATTRIBUTE
, the Java element type is returned. If the bindable type is SINGULAR_ATTRIBUTE
or ENTITY_TYPE
, the Java type of the represented entity or attribute is returned. - Returns:
- Java type
- Since:
- JPA 2.0
Return the bindable type of the represented object.
- Returns:
- bindable type
- Since:
- JPA 2.0
Return the collection type.
- Returns:
- collection type
- Since:
- JPA 2.0
Return the managed type representing the type in which the attribute was declared.
- Returns:
- declaring type
- Since:
- JPA 2.0
Return the type representing the element type of the collection.
- Returns:
- element type
- Since:
- JPA 2.0
Member getJavaMember()
Return the
java.lang.reflect.Member
for the represented attribute. - Returns:
- corresponding
java.lang.reflect.Member
- Since:
- JPA 2.0
Class<Y> getJavaType()
Return the Java type of the represented attribute.
- Returns:
- Java type
- Since:
- JPA 2.0
Class<K> getKeyJavaType()
Return the Java type of the map key.
- Returns:
- Java key type
- Since:
- JPA 2.0
Return the type representing the key type of the map.
- Returns:
- type representing key type
- Since:
- JPA 2.0
String getName()
Return the name of the attribute.
- Returns:
- name
- Since:
- JPA 2.0
Return the persistent attribute type for the attribute.
- Returns:
- persistent attribute type
- Since:
- JPA 2.0
boolean isAssociation()
Is the attribute an association.
- Returns:
- boolean indicating whether the attribute corresponds to an association
- Since:
- JPA 2.0
boolean isCollection()
Is the attribute collection-valued (represents a Collection, Set, List, or Map).
- Returns:
- boolean indicating whether the attribute is collection-valued
- Since:
- JPA 2.0