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

public Class EclipseLinkJPQLQueryContext

extends JPQLQueryContext
Class Inheritance
Imports
org.eclipse.persistence.jpa.jpql.EclipseLinkLiteralVisitor, .LiteralVisitor, org.eclipse.persistence.jpa.jpql.parser.Expression, .JPQLGrammar, org.eclipse.persistence.jpa.jpql.tools.resolver.DeclarationResolver, .EclipseLinkDeclarationResolver, .ResolverBuilder

This context is used to store information related to the JPQL query. It supports the EclipseLink extension over the default JPQL grammar.
 IQuery externalQuery = ...;

JPQLQueryContext context = new JPQLQueryContext(DefaultJPQLGrammar.instance());
context.setQuery(query);
If the JPQL query is already parsed, then the context can use it and it needs to be set before setting the IQuery:
 JPQLExpression jpqlExpression = ...;

JPQLQueryContext context = new JPQLQueryContext(DefaultJPQLGrammar.instance());
context.setJPQLExpression(jpqlExpression);
context.setQuery(query);
Author
Pascal Filion
Since
2.4
Version
2.4

Field Summary

Inherited from org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext:
currentContextparent

Constructor Summary

AccessConstructor and Description
public
EclipseLinkJPQLQueryContext(JPQLGrammar
The grammar that defines how to parse a JPQL query
jpqlGrammar
)

Creates a new EclipseLinkJPQLQueryContext.

protected
EclipseLinkJPQLQueryContext(JPQLQueryContext
The parent context
parent
,
Expression
The parsed tree representation of the subquery
currentQuery
)

Creates a new EclipseLinkJPQLQueryContext.

Method Summary

Modifier and TypeMethod and Description
protected DeclarationResolver
protected JPQLQueryContext
protected LiteralVisitor
protected EclipseLinkParameterTypeVisitor
protected ResolverBuilder
public EclipseLinkJPQLQueryContext
getParent()

Overrides org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext.getParent.

Returns the parent context if the current context is not the root context.
Inherited from org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext:
buildDeclarationResolverbuildInputParameterbuildQueryExpressionVisitorconvertUnqualifiedDeclarationdisposedisposeSubqueryContextfindInputParametersgetActualCurrentQuerygetActualDeclarationResolvergetCurrentContextgetCurrentQuerygetDeclarationgetDeclarationResolvergetDeclarationResolvergetDeclarationResolverImpgetDeclarationsgetEnumTypegetExpressionRegistrygetGrammargetInputParameterVisitorgetJPAVersiongetJPQLExpressiongetJPQLQuerygetLiteralVisitorgetMappinggetParameterTypegetParameterTypeVisitorgetProvidergetProviderVersiongetQuerygetQueryExpressiongetQueryExpressionVisitorgetResolvergetResolvergetResolverBuildergetResultVariablesgetTypegetTypegetTypegetTypeDeclarationgetTypeHelpergetTypeRepositoryhasJoinsinitializeinitializeRootisCollectionIdentificationVariableisRangeIdentificationVariableisResultVariableisSubqueryisTolerantliteralnewSubqueryContextsetJPQLExpressionsetQuerysetTolerantstoretoString

Constructor Detail

EclipseLinkJPQLQueryContextback to summary
public EclipseLinkJPQLQueryContext(JPQLGrammar jpqlGrammar)

Creates a new EclipseLinkJPQLQueryContext.

Parameters
jpqlGrammar:JPQLGrammar

The grammar that defines how to parse a JPQL query

EclipseLinkJPQLQueryContextback to summary
protected EclipseLinkJPQLQueryContext(JPQLQueryContext parent, Expression currentQuery)

Creates a new EclipseLinkJPQLQueryContext.

Parameters
parent:JPQLQueryContext

The parent context

currentQuery:Expression

The parsed tree representation of the subquery

Method Detail

buildDeclarationResolverback to summary
protected DeclarationResolver buildDeclarationResolver(DeclarationResolver parent)

Overrides org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext.buildDeclarationResolver.

Annotations
@Override
buildJPQLQueryContextback to summary
protected JPQLQueryContext buildJPQLQueryContext(JPQLQueryContext currentContext, Expression currentQuery)

Implements abstract org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext.buildJPQLQueryContext.

Annotations
@Override
buildLiteralVisitorback to summary
protected LiteralVisitor buildLiteralVisitor()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext.buildLiteralVisitor.

Annotations
@Override
buildParameterTypeVisitorback to summary
protected EclipseLinkParameterTypeVisitor buildParameterTypeVisitor()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext.buildParameterTypeVisitor.

Annotations
@Override
buildResolverBuilderback to summary
protected ResolverBuilder buildResolverBuilder()

Implements abstract org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext.buildResolverBuilder.

Annotations
@Override
getParentback to summary
public EclipseLinkJPQLQueryContext getParent()

Overrides org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext.getParent.

Doc from org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext.getParent.

Returns the parent context if the current context is not the root context.

Returns:EclipseLinkJPQLQueryContext

The parent context or null if the current context is the root

Annotations
@Override