Package org.compiere.util
Class Evaluator
- java.lang.Object
-
- org.compiere.util.Evaluator
-
public class Evaluator extends Object
Expression Evaluator- Version:
- $Id: Evaluator.java,v 1.3 2006/07/30 00:54:36 jjanke Exp $
- Author:
- Jorg Janke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Evaluator.SQLLogicResult
-
Constructor Summary
Constructors Constructor Description Evaluator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
evaluateLogic(Evaluatee source, String logic)
Evaluate Logic.static boolean
isAllVariablesDefined(Evaluatee source, String logic)
Check if All Variables are Definedstatic void
parseDepends(ArrayList<String> list, String parseString)
Parse String and add variables with @ to the list.static boolean
parseSQLLogic(String sqlLogic, Properties ctx, int windowNo, int tabNo, String targetObjectName)
evaluator a expression logic base on sql
-
-
-
Method Detail
-
isAllVariablesDefined
public static boolean isAllVariablesDefined(Evaluatee source, String logic)
Check if All Variables are Defined- Parameters:
source
- sourcelogic
- logic info- Returns:
- true if fully defined
-
evaluateLogic
public static boolean evaluateLogic(Evaluatee source, String logic)
Evaluate Logic.- Parameters:
source
- class implementing get_ValueAsString(variable)logic
- logic string- Returns:
- logic result
- See Also:
LogicEvaluator.evaluateLogic(Evaluatee, String)
-
parseDepends
public static void parseDepends(ArrayList<String> list, String parseString)
Parse String and add variables with @ to the list.- Parameters:
list
- list to be added toparseString
- string to parse for variables
-
parseSQLLogic
public static boolean parseSQLLogic(String sqlLogic, Properties ctx, int windowNo, int tabNo, String targetObjectName)
evaluator a expression logic base on sql- Parameters:
sqlLogic
-ctx
-windowNo
-tabNo
-targetObjectName
- expression logic is evaluated for, that target object (purpose for logging) can be field name, toolbar button name,..- Returns:
-
-