public abstract class JavaQueryEvaluator extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
candidateAlias |
protected Collection |
candidates
Candidates objects to evaluate.
|
protected ClassLoaderResolver |
clr |
protected QueryCompilation |
compilation
Compilation of the underlying query, that we are evaluating.
|
protected InMemoryExpressionEvaluator |
evaluator
The evaluator.
|
protected String |
language |
protected Map |
parameterValues
Map of input parameter values, keyed by the parameter name.
|
protected Query |
query
Underlying "string-based" query.
|
static String |
RESULTS_SET
Name under which any set of results are stored in the state map.
|
protected Map<String,Object> |
state
Map of state symbols for the query evaluation.
|
Constructor and Description |
---|
JavaQueryEvaluator(String language,
Query query,
QueryCompilation compilation,
Map parameterValues,
ClassLoaderResolver clr,
Collection candidates)
Constructor for the evaluator of a query in the specified language.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Collection |
evaluateSubquery(Query subquery,
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.
|
public static final String RESULTS_SET
protected final String language
protected String candidateAlias
protected Collection candidates
protected Query query
protected QueryCompilation compilation
protected Map parameterValues
protected InMemoryExpressionEvaluator evaluator
protected ClassLoaderResolver clr
public JavaQueryEvaluator(String language, Query query, QueryCompilation compilation, Map parameterValues, ClassLoaderResolver clr, Collection candidates)
language
- Name of the languagequery
- The underlying querycompilation
- Query compilationparameterValues
- Input parameter valuesclr
- ClassLoader resolvercandidates
- Candidate objectsprotected abstract Collection evaluateSubquery(Query subquery, QueryCompilation compilation, Collection candidates, Object outerCandidate)
subquery
- The subquerycompilation
- The subquery compilationcandidates
- The candidates for the subqueryouterCandidate
- The current outer candidate (for use when linking back to outer query)public Collection execute(boolean applyFilter, boolean applyOrdering, boolean applyResult, boolean applyResultClass, boolean applyRange)
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 resultsCopyright © 2017. All rights reserved.