|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.jpa.jpql.spi.java.AbstractMapping
public abstract class AbstractMapping
The abstract implementation of IMapping
that is wrapping the runtime representation
of a persistent attribute.
Constructor Summary | |
---|---|
protected |
AbstractMapping(IManagedType parent,
java.lang.reflect.Member member)
Creates a new AbstractMapping . |
Method Summary | |
---|---|
protected ITypeDeclaration |
buildTypeDeclaration()
|
protected int |
calculateMappingType()
Calculates the type of the persistent attribute represented by this external form. |
protected int |
calculateMappingType(java.lang.annotation.Annotation[] annotations)
Calculates the type of the mapping represented by this external form. |
int |
compareTo(IMapping mapping)
|
int |
getMappingType()
Returns the type of this mapping. |
java.lang.reflect.Member |
getMember()
Returns the Java Member wrapped by this mapping, which represents a persistent attribute. |
protected abstract java.lang.annotation.Annotation[] |
getMemberAnnotations()
|
protected abstract java.lang.reflect.Type |
getMemberGenericType()
|
protected abstract java.lang.Class<?> |
getMemberType()
|
java.lang.String |
getName()
Returns the name of the persistence property represented by this mapping. |
IManagedType |
getParent()
Returns the parent managed type owning this mapping. |
IType |
getType()
Returns the type of this mapping. |
ITypeDeclaration |
getTypeDeclaration()
Returns the declaration of the Java class, which gives the information about type parameters, dimensionality, etc. |
protected ITypeRepository |
getTypeRepository()
|
protected boolean |
hasAnnotation(java.lang.annotation.Annotation[] annotations,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
|
protected boolean |
hasAnnotation(java.lang.annotation.Annotation[] annotations,
java.lang.String annotationType)
|
boolean |
isCollection()
Determines whether this IMapping is a collection type mapping. |
boolean |
isProperty()
Determines whether this IMapping is a property type mapping. |
boolean |
isRelationship()
Determines whether this IMapping is a relationship type mapping. |
boolean |
isTransient()
Determines whether this IMapping is a transient mapping. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.persistence.jpa.jpql.spi.IMapping |
---|
hasAnnotation |
Constructor Detail |
---|
protected AbstractMapping(IManagedType parent, java.lang.reflect.Member member)
AbstractMapping
.
parent
- The parent of this mappingmember
- The Java Member
wrapped by this mapping, which represents a persistent
attributeMethod Detail |
---|
protected ITypeDeclaration buildTypeDeclaration()
protected int calculateMappingType()
persistence.jpa.jpql.spi.IMappingType IMappingType
when the provider is generic JPAprotected int calculateMappingType(java.lang.annotation.Annotation[] annotations)
annotations
- The Annotations
that are present on the member
persistence.jpa.jpql.spi.IMappingType IMappingType
when the provider is generic JPApublic int compareTo(IMapping mapping)
compareTo
in interface java.lang.Comparable<IMapping>
public int getMappingType()
getMappingType
in interface IMapping
IMappingType
when the provider only
supports generic JPApublic java.lang.reflect.Member getMember()
Member
wrapped by this mapping, which represents a persistent attribute.
Member
protected abstract java.lang.annotation.Annotation[] getMemberAnnotations()
protected abstract java.lang.reflect.Type getMemberGenericType()
protected abstract java.lang.Class<?> getMemberType()
public java.lang.String getName()
getName
in interface IMapping
public IManagedType getParent()
getParent
in interface IMapping
public IType getType()
@OneToMany
private Collection<Employee> employees;
"Employee" is the type. To retrieve Collection
, IMapping.getTypeDeclaration()
needs to be used, its type will be Collection
and it's generic type will be
Employee
.
getType
in interface IMapping
public ITypeDeclaration getTypeDeclaration()
@OneToMany
private Collection<Employee> employees;
"Collection<Employee>" is the type declaration.
getTypeDeclaration
in interface IMapping
protected ITypeRepository getTypeRepository()
protected boolean hasAnnotation(java.lang.annotation.Annotation[] annotations, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
protected boolean hasAnnotation(java.lang.annotation.Annotation[] annotations, java.lang.String annotationType)
public boolean isCollection()
IMapping
is a collection type mapping.
isCollection
in interface IMapping
true
if this IMapping
is a collection mapping;
false
otherwisepublic boolean isProperty()
IMapping
is a property type mapping.
isProperty
in interface IMapping
true
if this IMapping
is a property mapping; false
otherwisepublic boolean isRelationship()
IMapping
is a relationship type mapping.
isRelationship
in interface IMapping
true
if this IMapping
is a relationship mapping;
false
otherwisepublic boolean isTransient()
IMapping
is a transient mapping.
isTransient
in interface IMapping
true
if this IMapping
is a transient mapping;
false
otherwisepublic java.lang.String toString()
toString
in class java.lang.Object
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |