public class DefaultJPQLQueryContext extends JPQLQueryContext
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);
JPQLQueryContext.InputParameterVisitor, JPQLQueryContext.QueryExpressionVisitor
currentContext, parent
Modifier | Constructor and Description |
---|---|
|
DefaultJPQLQueryContext(JPQLGrammar jpqlGrammar)
Creates a new
DefaultJPQLQueryContext . |
protected |
DefaultJPQLQueryContext(JPQLQueryContext parent,
Expression currentQuery)
Creates a new sub-
DefaultJPQLQueryContext . |
Modifier and Type | Method and Description |
---|---|
protected JPQLQueryContext |
buildJPQLQueryContext(JPQLQueryContext currentContext,
Expression currentQuery) |
protected DefaultLiteralVisitor |
buildLiteralVisitor() |
protected DefaultParameterTypeVisitor |
buildParameterTypeVisitor() |
protected DefaultResolverBuilder |
buildResolverBuilder() |
DefaultJPQLQueryContext |
getParent()
Returns the parent context if the current context is not the root context.
|
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
public DefaultJPQLQueryContext(JPQLGrammar jpqlGrammar)
DefaultJPQLQueryContext
.protected DefaultJPQLQueryContext(JPQLQueryContext parent, Expression currentQuery)
DefaultJPQLQueryContext
.parent
- The parent contextcurrentQuery
- The parsed tree representation of the subqueryprotected JPQLQueryContext buildJPQLQueryContext(JPQLQueryContext currentContext, Expression currentQuery)
buildJPQLQueryContext
in class JPQLQueryContext
protected DefaultLiteralVisitor buildLiteralVisitor()
buildLiteralVisitor
in class JPQLQueryContext
protected DefaultParameterTypeVisitor buildParameterTypeVisitor()
buildParameterTypeVisitor
in class JPQLQueryContext
protected DefaultResolverBuilder buildResolverBuilder()
buildResolverBuilder
in class JPQLQueryContext
public DefaultJPQLQueryContext getParent()
getParent
in class JPQLQueryContext
null
if the current context is the root