Cumulus4j API
(1.0.0)

org.cumulus4j.store.query.eval
Class ExpressionHelper

java.lang.Object
  extended by org.cumulus4j.store.query.eval.ExpressionHelper

public class ExpressionHelper
extends Object

Series of helper methods for processing expressions.


Nested Class Summary
static class ExpressionHelper.ContainsConstantResolver
          Resolve Collection.contains(Object) with the argument being a concrete value (a 'constant').
static class ExpressionHelper.ContainsVariableResolver
          Resolve Collection.contains(Object) with the argument being a query variable.
 
Constructor Summary
ExpressionHelper()
           
 
Method Summary
static Object getEvaluatedInvokeArgument(QueryEvaluator queryEval, InvokeExpression expr)
          Method to evaluate the argument for passing in to a method invocation.
static Object[] getEvaluatedInvokeArguments(QueryEvaluator queryEval, InvokeExpression expr)
          Method to evaluate the arguments for passing in to a method invocation.
static MethodEvaluator getMethodEvaluatorForMethodOfClass(StoreManager storeMgr, ClassLoaderResolver clr, String clsName, String method)
          Accessor for the evaluator object for use of method xxx(...) of class Yyy in queries.
static String getOperatorAsJDOQLSymbol(Expression.Operator operator, boolean negate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionHelper

public ExpressionHelper()
Method Detail

getMethodEvaluatorForMethodOfClass

public static MethodEvaluator getMethodEvaluatorForMethodOfClass(StoreManager storeMgr,
                                                                 ClassLoaderResolver clr,
                                                                 String clsName,
                                                                 String method)
Accessor for the evaluator object for use of method xxx(...) of class Yyy in queries.

Parameters:
storeMgr - Store Manager
clr - ClassLoader resolver
clsName - The class on which to invoke the method
method - The method to call on the class
Returns:
The MethodEvaluator

getEvaluatedInvokeArguments

public static Object[] getEvaluatedInvokeArguments(QueryEvaluator queryEval,
                                                   InvokeExpression expr)
Method to evaluate the arguments for passing in to a method invocation.

Parameters:
queryEval - The QueryEvaluator
expr - The invoke expression
Returns:
The argument(s)

getEvaluatedInvokeArgument

public static Object getEvaluatedInvokeArgument(QueryEvaluator queryEval,
                                                InvokeExpression expr)
Method to evaluate the argument for passing in to a method invocation.

Parameters:
queryEval - The QueryEvaluator
expr - The invoke expression
Returns:
The argument

getOperatorAsJDOQLSymbol

public static String getOperatorAsJDOQLSymbol(Expression.Operator operator,
                                              boolean negate)

Cumulus4j API
(1.0.0)

Copyright © 2012 NightLabs Consulting GmbH. All Rights Reserved.