Top Description Fields Constructors Methods
org.eclipse.persistence.internal.jpa.metamodel

public abstract Class AttributeImpl<X, T>

extends Object
implements Attribute<X, T>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, jakarta.persistence.metamodel.Attribute
Known Direct Subclasses
org.eclipse.persistence.internal.jpa.metamodel.PluralAttributeImpl, org.eclipse.persistence.internal.jpa.metamodel.SingularAttributeImpl
Type Parameters
<X>
The represented type that contains the attribute
<T>
The type of the represented attribute
Imports
java.io.Serializable, java.lang.reflect.Member, .Method, java.security.AccessController, .PrivilegedActionException, jakarta.persistence.metamodel.Attribute, .ManagedType, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.internal.descriptors.InstanceVariableAttributeAccessor, .MethodAttributeAccessor, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedGetDeclaredField, .PrivilegedGetDeclaredMethod, org.eclipse.persistence.logging.AbstractSessionLog, .SessionLog, org.eclipse.persistence.mappings.AttributeAccessor, .DatabaseMapping, .ManyToManyMapping

Purpose: 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
jakarta.persistence.metamodel.Attribute

Field Summary

Modifier and TypeField and Description
private ManagedTypeImpl<X>
managedType

The ManagedType associated with this attribute

private DatabaseMapping
mapping

The databaseMapping associated with this attribute

Constructor Summary

AccessConstructor and Description
protected
AttributeImpl(ManagedTypeImpl<X> managedType, DatabaseMapping mapping)

INTERNAL:

Method Summary

Modifier and TypeMethod and Description
public ManagedType<X>

Returns:

declaring type
getDeclaringType
()

Implements jakarta.persistence.metamodel.Attribute.getDeclaringType.

Return the managed type representing the type in which the attribute was declared.
protected ClassDescriptor
getDescriptor()

INTERNAL: Return the Descriptor associated with this attribute

public Member

Returns:

corresponding java.lang.reflect.Member
getJavaMember
()

Implements jakarta.persistence.metamodel.Attribute.getJavaMember.

Return the java.lang.reflect.Member for the represented attribute.
public abstract Class<T>

Returns:

Java type
getJavaType
()

Redeclares jakarta.persistence.metamodel.Attribute.getJavaType.

Return the Java type of the represented attribute.
public ManagedTypeImpl<X>
getManagedTypeImpl()

INTERNAL: Return the managed type representing the type in which the member was declared.

public DatabaseMapping
getMapping()

INTERNAL: Return the databaseMapping that represents the type

protected MetamodelImpl

Returns:

MetamodelImpl
getMetamodel
()

INTERNAL: Return the concrete metamodel that this attribute is associated with.

public String

Returns:

name
getName
()

Implements jakarta.persistence.metamodel.Attribute.getName.

Return the name of the attribute.
public Attribute.PersistentAttributeType

Returns:

persistent attribute type
getPersistentAttributeType
()

Implements jakarta.persistence.metamodel.Attribute.getPersistentAttributeType.

Return the persistent attribute type for the attribute.
public boolean

Returns:

whether boolean indicating whether attribute corresponds to an association
isAssociation
()

Implements jakarta.persistence.metamodel.Attribute.isAssociation.

Is the attribute an association.
public boolean

Returns:

boolean indicating whether attribute is collection-valued.

This will be true for the mappings CollectionMapping, AbstractCompositeCollectionMapping, AbstractCompositeDirectCollectionMapping and their subclasses

isCollection
()

Implements jakarta.persistence.metamodel.Attribute.isCollection.

Is the attribute collection-valued.
public abstract boolean
isPlural()

INTERNAL: Return whether the attribute is plural or singular

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

managedTypeback to summary
private ManagedTypeImpl<X> managedType

The ManagedType associated with this attribute

mappingback to summary
private DatabaseMapping mapping

The databaseMapping associated with this attribute

Constructor Detail

AttributeImplback to summary
protected AttributeImpl(ManagedTypeImpl<X> managedType, DatabaseMapping mapping)

INTERNAL:

Method Detail

getDeclaringTypeback to summary
public ManagedType<X> getDeclaringType()

Implements jakarta.persistence.metamodel.Attribute.getDeclaringType.

Return the managed type representing the type in which the attribute was declared.

Returns:ManagedType<X>

declaring type

Annotations
@Override
getDescriptorback to summary
protected ClassDescriptor getDescriptor()

INTERNAL: Return the Descriptor associated with this attribute

getJavaMemberback to summary
public Member getJavaMember()

Implements jakarta.persistence.metamodel.Attribute.getJavaMember.

Return the java.lang.reflect.Member for the represented attribute. In the case of property access the get method will be returned

Returns:Member

corresponding java.lang.reflect.Member

Annotations
@Override
getJavaTypeback to summary
public abstract Class<T> getJavaType()

Redeclares jakarta.persistence.metamodel.Attribute.getJavaType.

Return the Java type of the represented attribute.

Returns:Class<T>

Java type

Annotations
@Override
getManagedTypeImplback to summary
public ManagedTypeImpl<X> getManagedTypeImpl()

INTERNAL: Return the managed type representing the type in which the member was declared.

getMappingback to summary
public DatabaseMapping getMapping()

INTERNAL: Return the databaseMapping that represents the type

getMetamodelback to summary
protected MetamodelImpl getMetamodel()

INTERNAL: Return the concrete metamodel that this attribute is associated with.

Returns:MetamodelImpl

MetamodelImpl

getNameback to summary
public String getName()

Implements jakarta.persistence.metamodel.Attribute.getName.

Return the name of the attribute.

Returns:String

name

Annotations
@Override
getPersistentAttributeTypeback to summary
public Attribute.PersistentAttributeType getPersistentAttributeType()

Implements jakarta.persistence.metamodel.Attribute.getPersistentAttributeType.

Return the persistent attribute type for the attribute.

Returns:Attribute.PersistentAttributeType

persistent attribute type

Annotations
@Override
isAssociationback to summary
public boolean isAssociation()

Implements jakarta.persistence.metamodel.Attribute.isAssociation.

Is the attribute an association.

Returns:boolean

whether boolean indicating whether attribute corresponds to an association

Annotations
@Override
isCollectionback to summary
public boolean isCollection()

Implements jakarta.persistence.metamodel.Attribute.isCollection.

Is the attribute collection-valued.

Returns:boolean

boolean indicating whether attribute is collection-valued.

This will be true for the mappings CollectionMapping, AbstractCompositeCollectionMapping, AbstractCompositeDirectCollectionMapping and their subclasses

Annotations
@Override
isPluralback to summary
public abstract boolean isPlural()

INTERNAL: Return whether the attribute is plural or singular