Class FromSubqueryResolver.VirtualMapping
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.resolver.FromSubqueryResolver.VirtualMapping
-
- Enclosing class:
- FromSubqueryResolver
protected static class FromSubqueryResolver.VirtualMapping extends java.lang.Object implements IMapping
This virtualIMapping
wraps one of the select items.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
VirtualMapping(IManagedType parent, java.lang.String name, Resolver resolver, org.eclipse.persistence.jpa.jpql.tools.resolver.FromSubqueryResolver.MappingType mappingType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(IMapping mapping)
int
getMappingType()
Returns the type of this mapping.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.boolean
hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Determines whether the given annotation is present on this type.boolean
isCollection()
Determines whether thisIMapping
is a collection type mapping.boolean
isEmbeddable()
Determines whether thisIMapping
is an embeddable type mapping.boolean
isProperty()
Determines whether thisIMapping
is a property type mapping.boolean
isRelationship()
Determines whether thisIMapping
is a relationship type mapping.boolean
isTransient()
Determines whether thisIMapping
is a transient mapping.java.lang.String
toString()
-
-
-
Constructor Detail
-
VirtualMapping
protected VirtualMapping(IManagedType parent, java.lang.String name, Resolver resolver, org.eclipse.persistence.jpa.jpql.tools.resolver.FromSubqueryResolver.MappingType mappingType)
-
-
Method Detail
-
compareTo
public int compareTo(IMapping mapping)
- Specified by:
compareTo
in interfacejava.lang.Comparable<IMapping>
-
getMappingType
public int getMappingType()
Returns the type of this mapping.- Specified by:
getMappingType
in interfaceIMapping
- Returns:
- One of the supported mapping type, which is one of the constants defined in
IMappingType
when the provider only supports generic JPA
-
getName
public java.lang.String getName()
Returns the name of the persistence property represented by this mapping.
-
getParent
public IManagedType getParent()
Returns the parent managed type owning this mapping.
-
getType
public IType getType()
Returns the type of this mapping. If this mapping is a relationship mapping, the parameter type of the collection is returned.@OneToMany
private Collection<Employee> employees;"Employee" is the type. To retrieve
Collection
,IMapping.getTypeDeclaration()
needs to be used, its type will beCollection
and it's generic type will beEmployee
.
-
getTypeDeclaration
public ITypeDeclaration getTypeDeclaration()
Returns the declaration of the Java class, which gives the information about type parameters, dimensionality, etc.@OneToMany
private Collection<Employee> employees;"Collection<Employee>" is the type declaration.
- Specified by:
getTypeDeclaration
in interfaceIMapping
- Returns:
- The external form of the class' type declaration
-
hasAnnotation
public boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Determines whether the given annotation is present on this type.- Specified by:
hasAnnotation
in interfaceIMapping
- Parameters:
annotationType
- The class of the annotation- Returns:
true
if the annotation is defined on this type;false
otherwise
-
isCollection
public boolean isCollection()
Determines whether thisIMapping
is a collection type mapping.- Specified by:
isCollection
in interfaceIMapping
- Returns:
true
if thisIMapping
is a collection mapping;false
otherwise
-
isEmbeddable
public boolean isEmbeddable()
Description copied from interface:IMapping
Determines whether thisIMapping
is an embeddable type mapping.- Specified by:
isEmbeddable
in interfaceIMapping
- Returns:
true
if thisIMapping
is an embeddable mapping;false
otherwise
-
isProperty
public boolean isProperty()
Determines whether thisIMapping
is a property type mapping.- Specified by:
isProperty
in interfaceIMapping
- Returns:
true
if thisIMapping
is a property mapping;false
otherwise
-
isRelationship
public boolean isRelationship()
Determines whether thisIMapping
is a relationship type mapping.- Specified by:
isRelationship
in interfaceIMapping
- Returns:
true
if thisIMapping
is a relationship mapping;false
otherwise
-
isTransient
public boolean isTransient()
Determines whether thisIMapping
is a transient mapping.- Specified by:
isTransient
in interfaceIMapping
- Returns:
true
if thisIMapping
is a transient mapping;false
otherwise
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-