Class AttributeImpl<X,T>
- java.lang.Object
-
- org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl<X,T>
-
- Type Parameters:
X- The represented type that contains the attributeT- The type of the represented attribute
- All Implemented Interfaces:
java.io.Serializable,javax.persistence.metamodel.Attribute<X,T>
- Direct Known Subclasses:
PluralAttributeImpl,SingularAttributeImpl
public abstract class AttributeImpl<X,T> extends java.lang.Object implements javax.persistence.metamodel.Attribute<X,T>, java.io.SerializablePurpose: Provides the implementation for the Attribute interface of the JPA 2.0 Metamodel API (part of the JSR-317 EJB 3.1 Criteria API)
Description: An attribute of a Java type
- Since:
- EclipseLink 1.2 - JPA 2.0
- See Also:
Attribute, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttributeImpl(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.DatabaseMapping mapping)INTERNAL:
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description javax.persistence.metamodel.ManagedType<X>getDeclaringType()Return the managed type representing the type in which the attribute was declared.protected org.eclipse.persistence.descriptors.ClassDescriptorgetDescriptor()INTERNAL: Return the Descriptor associated with this attributejava.lang.reflect.MembergetJavaMember()Return the java.lang.reflect.Member for the represented attribute.abstract java.lang.Class<T>getJavaType()Return the Java type of the represented attribute.ManagedTypeImpl<X>getManagedTypeImpl()INTERNAL: Return the managed type representing the type in which the member was declared.org.eclipse.persistence.mappings.DatabaseMappinggetMapping()INTERNAL: Return the databaseMapping that represents the typeprotected MetamodelImplgetMetamodel()INTERNAL: Return the concrete metamodel that this attribute is associated with.java.lang.StringgetName()Return the name of the attribute.javax.persistence.metamodel.Attribute.PersistentAttributeTypegetPersistentAttributeType()Return the persistent attribute type for the attribute.booleanisAssociation()Is the attribute an association.booleanisCollection()Is the attribute collection-valued.abstract booleanisPlural()INTERNAL: Return whether the attribute is plural or singular
-
-
-
Constructor Detail
-
AttributeImpl
protected AttributeImpl(ManagedTypeImpl<X> managedType, org.eclipse.persistence.mappings.DatabaseMapping mapping)
INTERNAL:- Parameters:
managedType-mapping-
-
-
Method Detail
-
getDeclaringType
public javax.persistence.metamodel.ManagedType<X> getDeclaringType()
Return the managed type representing the type in which the attribute was declared.
-
getDescriptor
protected org.eclipse.persistence.descriptors.ClassDescriptor getDescriptor()
INTERNAL: Return the Descriptor associated with this attribute- Returns:
-
getJavaMember
public java.lang.reflect.Member getJavaMember()
Return the java.lang.reflect.Member for the represented attribute. In the case of property access the get method will be returned
-
getJavaType
public abstract java.lang.Class<T> getJavaType()
Return the Java type of the represented attribute.
-
getManagedTypeImpl
public ManagedTypeImpl<X> getManagedTypeImpl()
INTERNAL: Return the managed type representing the type in which the member was declared.- Returns:
-
getMapping
public org.eclipse.persistence.mappings.DatabaseMapping getMapping()
INTERNAL: Return the databaseMapping that represents the type- Returns:
-
getMetamodel
protected MetamodelImpl getMetamodel()
INTERNAL: Return the concrete metamodel that this attribute is associated with.- Returns:
- MetamodelImpl
-
getName
public java.lang.String getName()
Return the name of the attribute.
-
getPersistentAttributeType
public javax.persistence.metamodel.Attribute.PersistentAttributeType getPersistentAttributeType()
Return the persistent attribute type for the attribute.
-
isAssociation
public boolean isAssociation()
Is the attribute an association.
-
isCollection
public boolean isCollection()
Is the attribute collection-valued.- Specified by:
isCollectionin interfacejavax.persistence.metamodel.Attribute<X,T>- Returns:
- boolean indicating whether attribute is
collection-valued.
This will be true for the mappings CollectionMapping, AbstractCompositeCollectionMapping, AbstractCompositeDirectCollectionMapping and their subclasses
-
isPlural
public abstract boolean isPlural()
INTERNAL: Return whether the attribute is plural or singular- Returns:
-
-