Package org.compiere.util
Class Evaluator
java.lang.Object
org.compiere.util.Evaluator
Expression Evaluator
- Version:
- $Id: Evaluator.java,v 1.3 2006/07/30 00:54:36 jjanke Exp $
- Author:
- Jorg Janke
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classValue object for SQL logic result -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanevaluateLogic(Evaluatee source, String logic) Evaluate logic expressionstatic booleanisAllVariablesDefined(Evaluatee source, String logic) Check if All Variables are Definedstatic voidparseDepends(ArrayList<String> list, String parseString) Parse expression and add variables with @ to the list.static booleanparseSQLLogic(String sqlLogic, Properties ctx, int windowNo, int tabNo, String targetObjectName) Evaluate a SQL logic expression (with @SQL= prefix)
-
Field Details
-
VARIABLE_PO_PROPERTY_OPERATOR
- See Also:
-
VARIABLE_FORMATTING_OPERATOR_START
- See Also:
-
VARIABLE_FORMATTING_OPERATOR_END
- See Also:
-
VARIABLE_DEFAULT_VALUE_OPERATOR
- See Also:
-
VARIABLE_START_END_MARKER
- See Also:
-
VARIABLE_SELF_TAB_OPERATOR
- See Also:
-
VARIABLE_REFERENCE_OPERATOR
- See Also:
-
VARIABLE_TAB_NO_SEPARATOR
- See Also:
-
ID_COLUMN_SUFFIX
- See Also:
-
-
Constructor Details
-
Evaluator
public Evaluator()
-
-
Method Details
-
isAllVariablesDefined
Check if All Variables are Defined- Parameters:
source- sourcelogic- logic info- Returns:
- true if fully defined
-
evaluateLogic
Evaluate logic expression- Parameters:
source- class implementing get_ValueAsString(variable)logic- logic expression- Returns:
- logic result
- See Also:
-
parseDepends
Parse expression and add variables with @ to the list.- Parameters:
list- list to be added toparseString- expression to parse for variables
-
parseSQLLogic
public static boolean parseSQLLogic(String sqlLogic, Properties ctx, int windowNo, int tabNo, String targetObjectName) Evaluate a SQL logic expression (with @SQL= prefix)- Parameters:
sqlLogic-ctx-windowNo-tabNo-targetObjectName- expression logic is evaluated for, that target object (for logging purpose) can be field name, toolbar button name,..- Returns:
- result of logic expression
-