DatabaseQuery when traversing the
parsed representation of a JPQL query.
| Modifier and Type | Field and Description |
|---|---|
| private JPQLQueryContext | currentContext
The current |
| private Expression | currentQuery
The parsed |
| private DeclarationResolver | declarationResolver
The resolver of the current query's declaration. |
| private static final Class | EMPTY_TYPE
An empty array used when the type of an
|
| private ExpressionBuilderVisitor | expressionBuilder
The builder that can convert a |
| private Map | expressions
The cached |
| pack-priv Map | inputParameters
The input parameter name mapped to its type. |
| private JPQLExpression | jpqlExpression
The parsed representation of the JPQL query. |
| private JPQLGrammar | jpqlGrammar
The JPQL grammar that defines how to parse a JPQL query. |
| private CharSequence | jpqlQuery
The JPQL query to convert into an EclipseLink |
| private EclipseLinkLiteralVisitor | literalVisitor
This visitor is used to retrieve a variable name from various type of
|
| private ParameterTypeVisitor | parameterTypeVisitor
This visitor is responsible to calculate the closest type of any input parameter. |
| private JPQLQueryContext | parent
When this context is a sub-context used for a subquery, then this is the context for the parent query. |
| private DatabaseQuery | query
The |
| private AbstractSession | session
The EclipseLink |
| private TypeResolver | typeResolver
This resolver is used to calculate the type of any
|
| private Map | types
The types that have been cached for faster access. |
| private Set | usedIdentificationVariables
The identification variables that were used in the current query. |
| Access | Constructor and Description |
|---|---|
| pack-priv | JPQLQueryContext(DatabaseQuery
The query, JPQLGrammar DatabaseQuery from which information will be queriesThe JPQL grammar that defines how the JPQL query was parsed jpqlGrammar)Creates a new |
| pack-priv | JPQLQueryContext(JPQLGrammar
The JPQL grammar that defines how the JPQL query was parsed jpqlGrammar)Creates a new |
| private | JPQLQueryContext(JPQLQueryContext
The parent of this context, which is never parent, Expression nullThe parsed tree representation of the subquery currentQuery, ReportQuery The query)ReportQuery that will be populated by visiting the parsed tree
representation of the subqueryCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | addInputParameter(InputParameter
The input parameter inputParameter, Expression The queryExpression)Expression that can be reused rather than being recreatedCaches the given input parameter name with its calculated type. |
| pack-priv void | addQueryExpression(String
The identification variable name that is the key to store the given
variableName, Expression ExpressionThe expression)Expression that can be reused rather than being recreatedCaches the given query |
| pack-priv void | addQueryExpressionImp(String
The identification variable name that is the key to store the given
variableName, Expression ExpressionThe expression)Expression that can be reused rather than being recreatedCaches the given query |
| pack-priv void | addRangeVariableDeclaration(String
The name of the entity to be accessible with the given variable name entityName, String The identification variable used to navigate to the entity variableName)Adds a virtual range variable declaration that will be used when a JPQL fragment is parsed. |
| pack-priv void | addUsedIdentificationVariable(String
The identification variable that is used within a clause variableName)Adds the given identification variable, which is done when it's used in a clause, except in the declaration portion of the query. |
| pack-priv void | addUsedIdentificationVariableImp(String
The identification variable that is used within a clause variableName)Adds the given identification variable, which is done when it's used in a clause, except in the declaration portion of the query. |
| private <T> Class | Returns: The Java type if it could be retrieved;null otherwiseThe fully qualified type name typeName)Retrieves the Java type for the given type name, which has to be the fully qualified type name. |
| pack-priv Expression | Returns: TheExpression representing the given parsed expressionThe expression)JPQL Expression
to visit and to convert into an ExpressionConverts the given |
| pack-priv Expression | Returns: TheExpression representing the given parsed expressionThe expression, Class<?>[] JPQL Expression
to visit and to convert into an ExpressionThe given array will be used to store the type of the given expression type)Converts the given |
| pack-priv Expression | Returns: The EclipseLinkExpression representation of that path expressionThe expression)CollectionValuedPathExpression to convert into an EclipseLink
ExpressionCreates a new EclipseLink |
| pack-priv Expression | Returns: The EclipseLinkExpression representation of that path expressionThe expression)StateFieldPathExpression to convert into an EclipseLink ExpressionCreates a new EclipseLink |
| pack-priv ReportQuery | Returns: A fully initializedReportQueryThe expression)SimpleSelectStatement to convert into a ReportQueryCreates a new |
| pack-priv void | cache(AbstractSession
The EclipseLink session, DatabaseQuery AbstractSession this context will useThe query, JPQLExpression DatabaseQuery that may already exist and it will be populated with
the information contained in the JPQL query or null if the query will need to be createdThe parsed tree representation of the JPQL query jpqlExpression, CharSequence The JPQL query jpqlQuery)Sets the given named query and string representation of the JPQL query. |
| pack-priv Class | Returns: The persistent field typeThe mapping)DatabaseMapping to retrieve its persistent field typeReturns the type of the given |
| pack-priv Class | Returns: The persistent field typeThe queryKey)QueryKey to retrieve its persistent field typeReturns the type of the given |
| pack-priv void | disposeSubqueryContext()
Disposes this context, which is the current context being used by a subquery. |
| private ExpressionBuilderVisitor | |
| pack-priv Declaration | Returns: TheDeclaration containing the information about the identification variable declarationThe name of the identification variable that is used to navigate a "root" object variableName)Retrieves the |
| pack-priv Declaration | |
| pack-priv Expression | findQueryExpression(String
The variable name for which its associated variableName)Expression is requestedRetrieves the cached |
| pack-priv Expression | |
| pack-priv JPQLQueryContext | Returns: The parent context ornull if the current context is the rootReturns the parent context if the current context is not the root context. |
| pack-priv Expression | Returns: The rootExpression of the query or subqueryReturns the root |
| private ClassLoader | Returns: The application'sClassLoaderReturns the |
| pack-priv <T> Constructor | getConstructor(Class<T>
The Java type for which its constructor should be retrieved type, Class<?>[] The types of the constructor's parameters parameterTypes)Returns the |
| pack-priv JPQLQueryContext | Returns: The active contextReturns the current |
| pack-priv Expression | Returns: Either the top-level query or a subqueryReturns the current |
| pack-priv <T extends DatabaseQuery> T | Returns: TheDatabaseQuery being populated, which can be the top-level query or a
subquery depending on which query is been visitedReturns the current |
| pack-priv Declaration | Returns: TheDeclaration containing the information about the identification variable declarationThe name of the identification variable that is used to navigate a "root" object variableName)Retrieves the |
| pack-priv DeclarationResolver | Returns: TheDeclarationResolver for the current query being visitedReturns the |
| pack-priv DeclarationResolver | Returns: TheDeclarationResolver for the current query being visitedReturns the |
| pack-priv List | Returns: TheDeclarations of the current query that was parsedReturns the ordered list of |
| pack-priv ClassDescriptor | Returns: The EclipseLinkdescriptor representing the managed typeThe type associated with the descriptor type)Retrieves the descriptor associated with the given type. |
| pack-priv ClassDescriptor | Returns: The EclipseLinkdescriptor representing the managed typeThe managed type name associated with the managed type abstractSchemaName)Retrieves the descriptor associated with the given abstract schema name, which is the descriptor's alias. |
| pack-priv Class | Returns: The external form for the given Enum type ornull if none existsThe fully qualified enum type with the constant enumTypeName)Returns the |
| pack-priv Declaration | Returns: The firstDeclaration objectReturns the first |
| pack-priv Declaration | Returns: The firstDeclaration objectReturns the first |
| pack-priv JPQLGrammar | Returns: TheJPQLGrammar that was used to parse the JPQL queryReturns the |
| pack-priv Collection | Returns: The JOIN FETCH expressions used in the same declaration or an empty collection if none was definedThe name of the identification variable that should be used to define an
abstract schema name variableName)Returns the parsed representation of a JOIN FETCH that were defined in the same declaration than the given range identification variable name. |
| pack-priv JPQLExpression | Returns: The parsed tree representation of the JPQL queryReturns the parsed tree representation of the JPQL query. |
| pack-priv CharSequence | Returns: The string representation of the JPQL queryReturns the string representation of the JPQL query. |
| pack-priv Class | Returns: Either the closest type of the input parameter ornull if the type could
not be determinedThe inputParameter)InputParameter to retrieve its typeRetrieves, if it can be determined, the type of the given |
| pack-priv JPQLQueryContext | Returns: The parent context ornull if the current context is the rootReturns the parent context if the current context is not the root context. |
| pack-priv Expression | getQueryExpression(String
The variable name for which its associated variableName)Expression is requestedRetrieves the cached |
| pack-priv Expression | getQueryExpressionImp(String
The variable name for which its associated variableName)Expression is requestedRetrieves the cached |
| pack-priv AbstractSession | Returns: The current EclipseLink sessionReturns the EclipseLink |
| pack-priv Class | Returns: Either the Java class that was resolved or thenull if it could not be resolvedThe expression)Expression for which its type will be calculatedReturns the Java class of the given |
| pack-priv Class | |
| private Map | |
| pack-priv Set | Returns: The identification variables that were used throughout the current query at the exception of their declarationReturns the identification variables that was used in the current query. |
| pack-priv Set | Returns: The identification variables that were used throughout the current query at the exception of their declarationReturns the identification variables that are registered in this context. |
| pack-priv boolean | Returns: true if the given identification variable maps a collection-valued field
defined in a JOIN or IN expression; false if it's not
defined or it's mapping an abstract schema nameThe identification variable to check for what it maps variableName)Determines whether the given identification variable is defining a join or a collection member declaration expressions. |
| pack-priv boolean | Returns: true if the identification is used in a clause, at the exception of where
it was defined; false otherwiseThe identification variable to check if it was used in a clause variableName)Determines whether the given identification variable is used, at the exception of where it was defined. |
| private boolean | |
| pack-priv boolean | Returns: true if the variable name is mapping an abstract schema name; false
if it's defined in a collection member declarationThe name of the variable to verify if it's defined in a range variable
declaration in the current query or any parent query variableName)Determines whether the given variable name is an identification variable name used to define an abstract schema name. |
| pack-priv boolean | Returns: true if the given variable is defined as a result variable;
false otherwiseThe variable to check if it's a result variable variableName)Determines if the given variable is a result variable. |
| pack-priv String | Returns: A value from the givenExpression or an empty string if the given Expression and the LiteralType do not matchThe expression, LiteralType Expression to visitThe type)LiteralType helps to determine what to retrieve from the visited
ExpressionRetrieves the "literal" from the given |
| private LiteralVisitor | |
| private Class | |
| private Class | |
| pack-priv <T> T | Returns: A new instance ornull if a problem was encountered during instantiationThe Java type for which a new instance will be created type, Class<?> The type of the constructor's single parameter parameterType, Object The object to pass during instantiation parameter)Creates a new instance from the given Java type. |
| pack-priv <T> T | Returns: A new instance of the given type ornull if a problem was encountered
during instantiationThe Java type for which a new instance will be created type, Class<?>[] The types of the constructor's parameters parameterTypes, Object[] The objects to pass during instantiation parameters)Creates a new instance from the given Java type. |
| pack-priv <T> T | Returns: A new instance ornull if a problem was encountered during instantiationThe constructor used to create the new instance constructor, Object[] The objects to pass during instantiation parameters)Creates a new instance by using the given constructor. |
| pack-priv void | newSubQueryContext(Expression
The parsed tree representation of the subquery that will become the
current currentQuery, ReportQuery DatabaseQueryThe query)ReportQuery for the subqueryChanges the state of this context to use the given subquery. |
| private ParameterTypeVisitor | |
| private JPQLExpression | |
| pack-priv ClassDescriptor | resolveDescriptor(Expression
The expression)ExpressionResolves the given |
| pack-priv DatabaseMapping | Returns: TheDatabaseMapping that is representing the last path or null if
the path expression could not be resolvedThe expression)Expression to
resolve by traversing its path expressionResolves the given |
| pack-priv Object | Returns: Either theDatabaseMapping or the QueryKey that is representing the
last path or null if the path expression could not be resolvedThe expression)Expression to
resolve by traversing its path expressionResolves the given |
| pack-priv void | setDatabasQuery(DatabaseQuery
The query)DatabaseQuery that was created before populating itSets the query to populate. |
| pack-priv TypeResolver |