org.odata4j.producer
Class ExpressionEvaluator

java.lang.Object
  extended by org.odata4j.producer.ExpressionEvaluator

public class ExpressionEvaluator
extends Object

Evaluate an $filter expression. The VariableResolver you attach to the evaluator determines the context for evaluation. The VariableResolver must supply actual values for all EntitySimpleProperties referenced in the $filter.

Note: this used to be class InMemoryEvaluation, I just factored out/de-coupled the VariableResolver to make it reusable.


Nested Class Summary
static interface ExpressionEvaluator.VariableResolver
          Resolves variables during expression evaluation.
 
Constructor Summary
ExpressionEvaluator(ExpressionEvaluator.VariableResolver resolver)
           
 
Method Summary
static Object cast(Object obj, Class<?> targetType)
           
 boolean evaluate(BoolCommonExpression expression)
           
 Object evaluate(CommonExpression expression)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionEvaluator

public ExpressionEvaluator(ExpressionEvaluator.VariableResolver resolver)
Method Detail

cast

public static Object cast(Object obj,
                          Class<?> targetType)

evaluate

public boolean evaluate(BoolCommonExpression expression)

evaluate

public Object evaluate(CommonExpression expression)


http://odata4j.org