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 virtual IMapping wraps one of the select items.
  • Constructor Details

    • VirtualMapping

      protected VirtualMapping(IManagedType parent, String name, Resolver resolver, org.eclipse.persistence.jpa.jpql.tools.resolver.FromSubqueryResolver.MappingType mappingType)
  • Method Details

    • compareTo

      public int compareTo(IMapping mapping)
      Specified by:
      compareTo in interface Comparable<IMapping>
    • getMappingType

      public int getMappingType()
      Description copied from interface: IMapping
      Returns the type of this mapping.
      Specified by:
      getMappingType in interface IMapping
      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 String getName()
      Description copied from interface: IMapping
      Returns the name of the persistence property represented by this mapping.
      Specified by:
      getName in interface IMapping
      Returns:
      The name of this mapping
    • getParent

      public IManagedType getParent()
      Description copied from interface: IMapping
      Returns the parent managed type owning this mapping.
      Specified by:
      getParent in interface IMapping
      Returns:
      The parent of this mapping
    • getType

      public IType getType()
      Description copied from interface: IMapping
      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 be Collection and it's generic type will be Employee.

      Specified by:
      getType in interface IMapping
      Returns:
      The external form representing the type of this mapping
    • getTypeDeclaration

      public ITypeDeclaration getTypeDeclaration()
      Description copied from interface: IMapping
      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 interface IMapping
      Returns:
      The external form of the class' type declaration
    • hasAnnotation

      public boolean hasAnnotation(Class<? extends Annotation> annotationType)
      Description copied from interface: IMapping
      Determines whether the given annotation is present on this type.
      Specified by:
      hasAnnotation in interface IMapping
      Parameters:
      annotationType - The class of the annotation
      Returns:
      true if the annotation is defined on this type; false otherwise
    • isCollection

      public boolean isCollection()
      Description copied from interface: IMapping
      Determines whether this IMapping is a collection type mapping.
      Specified by:
      isCollection in interface IMapping
      Returns:
      true if this IMapping is a collection mapping; false otherwise
    • isEmbeddable

      public boolean isEmbeddable()
      Description copied from interface: IMapping
      Determines whether this IMapping is an embeddable type mapping.
      Specified by:
      isEmbeddable in interface IMapping
      Returns:
      true if this IMapping is an embeddable mapping; false otherwise
    • isProperty

      public boolean isProperty()
      Description copied from interface: IMapping
      Determines whether this IMapping is a property type mapping.
      Specified by:
      isProperty in interface IMapping
      Returns:
      true if this IMapping is a property mapping; false otherwise
    • isRelationship

      public boolean isRelationship()
      Description copied from interface: IMapping
      Determines whether this IMapping is a relationship type mapping.
      Specified by:
      isRelationship in interface IMapping
      Returns:
      true if this IMapping is a relationship mapping; false otherwise
    • isTransient

      public boolean isTransient()
      Description copied from interface: IMapping
      Determines whether this IMapping is a transient mapping.
      Specified by:
      isTransient in interface IMapping
      Returns:
      true if this IMapping is a transient mapping; false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object