Class JDOQLInMemoryEvaluator
- java.lang.Object
-
- org.datanucleus.store.query.inmemory.JavaQueryInMemoryEvaluator
-
- org.datanucleus.store.query.inmemory.JDOQLInMemoryEvaluator
-
public class JDOQLInMemoryEvaluator extends JavaQueryInMemoryEvaluator
Class to evaluate a JDOQL 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 JDOQLInMemoryEvaluator(Query query, java.util.Collection candidates, QueryCompilation compilation, java.util.Map parameterValues, ClassLoaderResolver clr)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection
evaluateSubquery(Query query, QueryCompilation compilation, java.util.Collection candidates, java.lang.Object outerCandidate)
Method to evaluate a subquery of the query being evaluated.java.util.Collection
execute(boolean applyFilter, boolean applyOrdering, boolean applyResult, boolean applyResultClass, boolean applyRange)
Method to perform the evaluation, applying the query restrictions that are required.(package private) java.util.Collection
mapResultClass(java.util.Collection resultSet)
Constructs ResultClassMapper and calls its map function
-
-
-
Constructor Detail
-
JDOQLInMemoryEvaluator
public JDOQLInMemoryEvaluator(Query query, java.util.Collection candidates, QueryCompilation compilation, java.util.Map parameterValues, ClassLoaderResolver clr)
Constructor.- Parameters:
query
- The underlying JDOQL querycandidates
- List of objects as input to the evaluation processcompilation
- Query compilationparameterValues
- Input parameter values keyed by the param nameclr
- ClassLoader resolver
-
-
Method Detail
-
evaluateSubquery
protected java.util.Collection evaluateSubquery(Query query, QueryCompilation compilation, java.util.Collection candidates, java.lang.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 java.util.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.
-
mapResultClass
java.util.Collection mapResultClass(java.util.Collection resultSet)
Constructs ResultClassMapper and calls its map function- Specified by:
mapResultClass
in classJavaQueryInMemoryEvaluator
- Parameters:
resultSet
- The resultSet containing the instances handled by setResult- Returns:
- The resultSet containing instances of the Class defined by setResultClass
-
-