Top Description Inners Fields Constructors Methods
org.eclipse.persistence.jpa.jpql.tools.resolver

public Class FromSubqueryResolver

extends Resolver
Class Inheritance
Static Imports
org.eclipse.persistence.jpa.jpql.LiteralType.PATH_EXPRESSION_LAST_PATH, .LiteralType.RESULT_VARIABLE

This Resolver wraps a subquery that is used as the "root" object in a query's declaration.

Example:

   SELECT e.firstName
FROM Employee e, (SELECT count(e2), e2.firstName FROM Employee e2) e3
WHERE e.firstName = e3.firstName
Author
Pascal Filion
Since
2.4
Version
2.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum
protected class
FromSubqueryResolver.VirtualManagedType

This IManagedType represents a virtual managed type where its content will be derived from the subquery.

protected static class
FromSubqueryResolver.VirtualMapping

This virtual IMapping wraps one of the select items.

protected class
FromSubqueryResolver.VirtualMappingBuilder

This visitor will traverse the SELECT clause and create virtual mappings for the state field path expressions and any expression aliased with a result variable.

Field Summary

Modifier and TypeField and Description
private IManagedType
managedType

The virtual IManagedType representing the subquery.

private JPQLQueryContext
queryContext

The JPQLQueryContext is used to query information about the application metadata and cached information.

private SimpleSelectStatement
subquery

The subquery being defined as a "root" object.

Constructor Summary

AccessConstructor and Description
public
FromSubqueryResolver(Resolver
The parent of this resolver, which is never null
parent
,
JPQLQueryContext
The context used to query information about the application metadata and cached information
queryContext
,
SimpleSelectStatement subquery)

Creates a new FromSubqueryResolver.

Method Summary

Modifier and TypeMethod and Description
protected IType
buildType()

Overrides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.buildType.

Resolves the IType of the property handled by this Resolver.
protected ITypeDeclaration
public IManagedType
getManagedType()

Overrides org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver.getManagedType.

Returns the IManagedType associated with the field handled by this Resolver.
Inherited from org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver:
addChildcheckParentgetChildgetMappinggetParentgetParentManagedTypegetParentMappinggetParentTypegetParentTypeDeclarationgetProvidergetQuerygetTypegetTypegetTypegetTypeDeclarationgetTypeHelpergetTypeRepositoryisNullAllowedsetNullAllowed