org.apache.openjpa.persistence.meta
Class Members.Member<X,Y>

java.lang.Object
  extended by org.apache.openjpa.persistence.meta.Members.Member<X,Y>
Type Parameters:
X - The type that contains this attribute
Y - The type of this attribute
All Implemented Interfaces:
Comparable<Members.Member<X,Y>>, Attribute<X,Y>
Direct Known Subclasses:
Members.PluralAttributeImpl, Members.SingularAttributeImpl
Enclosing class:
Members

public abstract static class Members.Member<X,Y>
extends Object
implements Attribute<X,Y>, Comparable<Members.Member<X,Y>>

An attribute of a Java type. A persistent attribute is realized as a field and getter/setter method of a Java class. This implementation adapts kernel's FieldMetaData construct to meet the JPA API contract.


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.persistence.metamodel.Attribute
Attribute.PersistentAttributeType
 
Field Summary
 FieldMetaData fmd
           
 AbstractManagedType<X> owner
           
 
Constructor Summary
protected Members.Member(AbstractManagedType<X> owner, FieldMetaData fmd)
          Supply immutable parts.
 
Method Summary
 int compareTo(Members.Member<X,Y> o)
           
 ManagedType<X> getDeclaringType()
          Returns the managed type which declared this attribute.
 Member getJavaMember()
          Returns the java.lang.reflect.Member for this attribute.
 Class<Y> getJavaType()
          Gets the Java type of this attribute.
 String getName()
          Gets the name of this attribute.
 Attribute.PersistentAttributeType getPersistentAttributeType()
          Returns the persistent category for the attribute.
 Type<Y> getType()
          Returns the type that represents the type of this attribute.
 boolean isAssociation()
          Affirms if this attribute is an association.
 boolean isCollection()
          Affirms if this attribute is a collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

public final AbstractManagedType<X> owner

fmd

public final FieldMetaData fmd
Constructor Detail

Members.Member

protected Members.Member(AbstractManagedType<X> owner,
                         FieldMetaData fmd)
Supply immutable parts.

Parameters:
owner - the persistent type that contains this attribute
fmd - the kernel's concrete representation of this attribute
Method Detail

getDeclaringType

public final ManagedType<X> getDeclaringType()
Returns the managed type which declared this attribute.

Specified by:
getDeclaringType in interface Attribute<X,Y>

getJavaMember

public final Member getJavaMember()
Returns the java.lang.reflect.Member for this attribute.

Specified by:
getJavaMember in interface Attribute<X,Y>

getJavaType

public final Class<Y> getJavaType()
Gets the Java type of this attribute.

Specified by:
getJavaType in interface Attribute<X,Y>

getName

public final String getName()
Gets the name of this attribute.

Specified by:
getName in interface Attribute<X,Y>

getType

public final Type<Y> getType()
Returns the type that represents the type of this attribute.


isAssociation

public final boolean isAssociation()
Affirms if this attribute is an association.

Specified by:
isAssociation in interface Attribute<X,Y>

isCollection

public final boolean isCollection()
Affirms if this attribute is a collection.

Specified by:
isCollection in interface Attribute<X,Y>

getPersistentAttributeType

public Attribute.PersistentAttributeType getPersistentAttributeType()
Returns the persistent category for the attribute.

Specified by:
getPersistentAttributeType in interface Attribute<X,Y>

compareTo

public int compareTo(Members.Member<X,Y> o)
Specified by:
compareTo in interface Comparable<Members.Member<X,Y>>


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.