Class DefaultJPQLQueryContext
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext
-
- org.eclipse.persistence.jpa.jpql.tools.DefaultJPQLQueryContext
-
public class DefaultJPQLQueryContext extends JPQLQueryContext
This context is used to store information related to the JPQL query.
If the JPQL query is already parsed, then the context can use it and it needs to be set before setting theIQueryexternalQuery = ...; JPQLQueryContext context = new JPQLQueryContext(DefaultJPQLGrammar.instance()); context.setQuery(query);IQuery:JPQLExpressionjpqlExpression = ...; JPQLQueryContext context = new JPQLQueryContext(DefaultJPQLGrammar.instance()); context.setJPQLExpression(jpqlExpression); context.setQuery(query);- Version:
- 2.4
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext
JPQLQueryContext.InputParameterVisitor, JPQLQueryContext.QueryExpressionVisitor
-
-
Field Summary
-
Fields inherited from class org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext
currentContext, parent
-
-
Constructor Summary
Constructors Modifier Constructor Description DefaultJPQLQueryContext(JPQLGrammar jpqlGrammar)Creates a newDefaultJPQLQueryContext.protectedDefaultJPQLQueryContext(JPQLQueryContext parent, Expression currentQuery)Creates a new sub-DefaultJPQLQueryContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected JPQLQueryContextbuildJPQLQueryContext(JPQLQueryContext currentContext, Expression currentQuery)protected DefaultLiteralVisitorbuildLiteralVisitor()protected DefaultParameterTypeVisitorbuildParameterTypeVisitor()protected DefaultResolverBuilderbuildResolverBuilder()DefaultJPQLQueryContextgetParent()Returns the parent context if the current context is not the root context.-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.JPQLQueryContext
buildDeclarationResolver, buildDeclarationResolver, buildInputParameter, buildQueryExpressionVisitor, convertUnqualifiedDeclaration, dispose, disposeSubqueryContext, findInputParameters, getActualCurrentQuery, getActualDeclarationResolver, getCurrentContext, getCurrentQuery, getDeclaration, getDeclarationResolver, getDeclarationResolver, getDeclarationResolverImp, getDeclarations, getEnumType, getExpressionRegistry, getGrammar, getInputParameterVisitor, getJPAVersion, getJPQLExpression, getJPQLQuery, getLiteralVisitor, getMapping, getParameterType, getParameterTypeVisitor, getProvider, getProviderVersion, getQuery, getQueryExpression, getQueryExpressionVisitor, getResolver, getResolver, getResolverBuilder, getResultVariables, getType, getType, getType, getTypeDeclaration, getTypeHelper, getTypeRepository, hasJoins, initialize, initializeRoot, isCollectionIdentificationVariable, isRangeIdentificationVariable, isResultVariable, isSubquery, isTolerant, literal, newSubqueryContext, setJPQLExpression, setQuery, setTolerant, store, toString
-
-
-
-
Constructor Detail
-
DefaultJPQLQueryContext
public DefaultJPQLQueryContext(JPQLGrammar jpqlGrammar)
Creates a newDefaultJPQLQueryContext.
-
DefaultJPQLQueryContext
protected DefaultJPQLQueryContext(JPQLQueryContext parent, Expression currentQuery)
Creates a new sub-DefaultJPQLQueryContext.- Parameters:
parent- The parent contextcurrentQuery- The parsed tree representation of the subquery
-
-
Method Detail
-
buildJPQLQueryContext
protected JPQLQueryContext buildJPQLQueryContext(JPQLQueryContext currentContext, Expression currentQuery)
- Specified by:
buildJPQLQueryContextin classJPQLQueryContext
-
buildLiteralVisitor
protected DefaultLiteralVisitor buildLiteralVisitor()
- Specified by:
buildLiteralVisitorin classJPQLQueryContext
-
buildParameterTypeVisitor
protected DefaultParameterTypeVisitor buildParameterTypeVisitor()
- Specified by:
buildParameterTypeVisitorin classJPQLQueryContext
-
buildResolverBuilder
protected DefaultResolverBuilder buildResolverBuilder()
- Specified by:
buildResolverBuilderin classJPQLQueryContext
-
getParent
public DefaultJPQLQueryContext getParent()
Returns the parent context if the current context is not the root context.- Overrides:
getParentin classJPQLQueryContext- Returns:
- The parent context or
nullif the current context is the root
-
-