Class FromSubqueryResolver.VirtualMapping
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.resolver.FromSubqueryResolver.VirtualMapping
-
- All Implemented Interfaces:
Comparable<IMapping>,IMapping
- Enclosing class:
- FromSubqueryResolver
protected static class FromSubqueryResolver.VirtualMapping extends Object implements IMapping
This virtualIMappingwraps one of the select items.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedVirtualMapping(IManagedType parent, 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 intcompareTo(IMapping mapping)intgetMappingType()Returns the type of this mapping.StringgetName()Returns the name of the persistence property represented by this mapping.IManagedTypegetParent()Returns the parent managed type owning this mapping.ITypegetType()Returns the type of this mapping.ITypeDeclarationgetTypeDeclaration()Returns the declaration of the Java class, which gives the information about type parameters, dimensionality, etc.booleanhasAnnotation(Class<? extends Annotation> annotationType)Determines whether the given annotation is present on this type.booleanisCollection()Determines whether thisIMappingis a collection type mapping.booleanisEmbeddable()Determines whether thisIMappingis an embeddable type mapping.booleanisProperty()Determines whether thisIMappingis a property type mapping.booleanisRelationship()Determines whether thisIMappingis a relationship type mapping.booleanisTransient()Determines whether thisIMappingis a transient mapping.StringtoString()
-
-
-
Constructor Detail
-
VirtualMapping
protected VirtualMapping(IManagedType parent, String name, Resolver resolver, org.eclipse.persistence.jpa.jpql.tools.resolver.FromSubqueryResolver.MappingType mappingType)
-
-
Method Detail
-
compareTo
public int compareTo(IMapping mapping)
- Specified by:
compareToin interfaceComparable<IMapping>
-
getMappingType
public int getMappingType()
Description copied from interface:IMappingReturns the type of this mapping.- Specified by:
getMappingTypein interfaceIMapping- Returns:
- One of the supported mapping type, which is one of the constants defined in
IMappingTypewhen the provider only supports generic JPA
-
getName
public String getName()
Description copied from interface:IMappingReturns the name of the persistence property represented by this mapping.
-
getParent
public IManagedType getParent()
Description copied from interface:IMappingReturns the parent managed type owning this mapping.
-
getType
public IType getType()
Description copied from interface:IMappingReturns 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 beCollectionand it's generic type will beEmployee.
-
getTypeDeclaration
public ITypeDeclaration getTypeDeclaration()
Description copied from interface:IMappingReturns 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:
getTypeDeclarationin interfaceIMapping- Returns:
- The external form of the class' type declaration
-
hasAnnotation
public boolean hasAnnotation(Class<? extends Annotation> annotationType)
Description copied from interface:IMappingDetermines whether the given annotation is present on this type.- Specified by:
hasAnnotationin interfaceIMapping- Parameters:
annotationType- The class of the annotation- Returns:
trueif the annotation is defined on this type;falseotherwise
-
isCollection
public boolean isCollection()
Description copied from interface:IMappingDetermines whether thisIMappingis a collection type mapping.- Specified by:
isCollectionin interfaceIMapping- Returns:
trueif thisIMappingis a collection mapping;falseotherwise
-
isEmbeddable
public boolean isEmbeddable()
Description copied from interface:IMappingDetermines whether thisIMappingis an embeddable type mapping.- Specified by:
isEmbeddablein interfaceIMapping- Returns:
trueif thisIMappingis an embeddable mapping;falseotherwise
-
isProperty
public boolean isProperty()
Description copied from interface:IMappingDetermines whether thisIMappingis a property type mapping.- Specified by:
isPropertyin interfaceIMapping- Returns:
trueif thisIMappingis a property mapping;falseotherwise
-
isRelationship
public boolean isRelationship()
Description copied from interface:IMappingDetermines whether thisIMappingis a relationship type mapping.- Specified by:
isRelationshipin interfaceIMapping- Returns:
trueif thisIMappingis a relationship mapping;falseotherwise
-
isTransient
public boolean isTransient()
Description copied from interface:IMappingDetermines whether thisIMappingis a transient mapping.- Specified by:
isTransientin interfaceIMapping- Returns:
trueif thisIMappingis a transient mapping;falseotherwise
-
-