public abstract class AbstractMapping extends java.lang.Object implements IMapping
IMapping that is wrapping the runtime representation
of a persistent attribute.| Type | Property and Description |
|---|---|
boolean |
is
Determines whether this
IMapping is a property type mapping. |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMapping(IManagedType parent,
java.lang.reflect.Member member)
Creates a new
AbstractMapping. |
| Modifier and Type | Method and Description |
|---|---|
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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithasAnnotationIMapping is a property type mapping.isProperty in interface IMappingtrue if this IMapping is a property mapping; false
otherwiseprotected 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
attributeprotected 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 memberpersistence.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 IMappingIMappingType when the provider only
supports generic JPApublic java.lang.reflect.Member getMember()
Member wrapped by this mapping, which represents a persistent attribute.Memberprotected abstract java.lang.annotation.Annotation[] getMemberAnnotations()
protected abstract java.lang.reflect.Type getMemberGenericType()
protected abstract java.lang.Class<?> getMemberType()
public java.lang.String getName()
public IManagedType getParent()
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.
public ITypeDeclaration getTypeDeclaration()
@OneToMany
private Collection<Employee> employees;
"Collection<Employee>" is the type declaration.
getTypeDeclaration in interface IMappingprotected 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 IMappingtrue if this IMapping is a collection mapping;
false otherwisepublic boolean isProperty()
IMapping is a property type mapping.isProperty in interface IMappingtrue if this IMapping is a property mapping; false
otherwisepublic boolean isRelationship()
IMapping is a relationship type mapping.isRelationship in interface IMappingtrue if this IMapping is a relationship mapping;
false otherwisepublic boolean isTransient()
IMapping is a transient mapping.isTransient in interface IMappingtrue if this IMapping is a transient mapping;
false otherwisepublic java.lang.String toString()
toString in class java.lang.Object