org.datanucleus.query.evaluator
Class JavaQueryEvaluator

java.lang.Object
  extended by org.datanucleus.query.evaluator.JavaQueryEvaluator
Direct Known Subclasses:
JDOQLEvaluator, JPQLEvaluator

public abstract class JavaQueryEvaluator
extends java.lang.Object

Class to evaluate a Java "string-based" query in whole or part. Takes in a list of instances and applies the required restrictions to the input giving a final result. Typically extended for JDOQL, JPQL, SQL specifics.


Field Summary
protected  java.lang.String candidateAlias
           
protected  ClassLoaderResolver clr
           
protected  InMemoryExpressionEvaluator evaluator
           
protected  Expression filter
           
protected  Expression[] grouping
           
protected  Expression having
           
protected  java.lang.String language
           
protected static Localiser LOCALISER
          Localisation utility for output messages
protected  Expression[] ordering
           
protected  java.util.Map parameterValues
           
protected  Query query
          Underlying "string-based" query.
protected  Expression[] result
           
protected  java.util.List sourceObjects
          List of input objects.
protected  SymbolTable symtbl
           
 
Constructor Summary
JavaQueryEvaluator(java.lang.String language)
          Constructor for the evaluator of a query in the specified language.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER

protected static final Localiser LOCALISER
Localisation utility for output messages


language

protected final java.lang.String language

candidateAlias

protected java.lang.String candidateAlias

filter

protected Expression filter

result

protected Expression[] result

ordering

protected Expression[] ordering

grouping

protected Expression[] grouping

having

protected Expression having

symtbl

protected SymbolTable symtbl

evaluator

protected InMemoryExpressionEvaluator evaluator

parameterValues

protected java.util.Map parameterValues

sourceObjects

protected java.util.List sourceObjects
List of input objects.


query

protected Query query
Underlying "string-based" query.


clr

protected ClassLoaderResolver clr
Constructor Detail

JavaQueryEvaluator

public JavaQueryEvaluator(java.lang.String language)
Constructor for the evaluator of a query in the specified language.

Parameters:
language - Name of the language
Method Detail

execute

public 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.

Parameters:
applyFilter - Whether to apply any filter constraints on the results
applyOrdering - Whether to apply any order constraints on the results
applyResult - Whether to apply any result/grouping/having on the results
applyResultClass - Whether to apply any resultClass constraint on the results
applyRange - Whether to apply any range constraint on the results
Returns:
The results after evaluation.


Copyright © 2009. All Rights Reserved.