- java.lang.Object
-
- org.datanucleus.store.query.inmemory.JavaQueryInMemoryEvaluator
-
- org.datanucleus.store.query.inmemory.JPQLInMemoryEvaluator
-
public class JPQLInMemoryEvaluator extends JavaQueryInMemoryEvaluator
Class to evaluate a JPQL query in whole or part.
-
-
Field Summary
-
Fields inherited from class org.datanucleus.store.query.inmemory.JavaQueryInMemoryEvaluator
candidateAlias, candidates, clr, compilation, evaluator, language, parameterValues, query, RESULTS_SET, state
-
-
Constructor Summary
Constructors Constructor Description JPQLInMemoryEvaluator(Query query, Collection candidates, QueryCompilation compilation, Map parameterValues, ClassLoaderResolver clr)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection
evaluateSubquery(Query query, QueryCompilation compilation, Collection candidates, Object outerCandidate)
Method to evaluate a subquery of the query being evaluated.Collection
execute(boolean applyFilter, boolean applyOrdering, boolean applyResult, boolean applyResultClass, boolean applyRange)
Method to perform the evaluation, applying the query restrictions that are required.
-
-
-
Constructor Detail
-
JPQLInMemoryEvaluator
public JPQLInMemoryEvaluator(Query query, Collection candidates, QueryCompilation compilation, Map parameterValues, ClassLoaderResolver clr)
Constructor.- Parameters:
query
- The underlying JPQL querycandidates
- List of objects as input to the evaluation processcompilation
- Compiled queryparameterValues
- Input parameter valuesclr
- ClassLoader resolver
-
-
Method Detail
-
evaluateSubquery
protected Collection evaluateSubquery(Query query, QueryCompilation compilation, Collection candidates, Object outerCandidate)
Method to evaluate a subquery of the query being evaluated.- Specified by:
evaluateSubquery
in classJavaQueryInMemoryEvaluator
- Parameters:
query
- The subquerycompilation
- The subquery compilationcandidates
- The candidates for the subqueryouterCandidate
- Current candidate in the outer query (for use when linking back)- Returns:
- The result
-
execute
public Collection execute(boolean applyFilter, boolean applyOrdering, boolean applyResult, boolean applyResultClass, boolean applyRange)
Description copied from class:JavaQueryInMemoryEvaluator
Method to perform the evaluation, applying the query restrictions that are required.- Overrides:
execute
in classJavaQueryInMemoryEvaluator
- Parameters:
applyFilter
- Whether to apply any filter constraints on the resultsapplyOrdering
- Whether to apply any order constraints on the resultsapplyResult
- Whether to apply any result/grouping/having on the resultsapplyResultClass
- Whether to apply any resultClass constraint on the resultsapplyRange
- Whether to apply any range constraint on the results- Returns:
- The results after evaluation.
-
-