Class ConstraintUtil
- java.lang.Object
-
- org.drools.compiler.rule.builder.util.ConstraintUtil
-
public class ConstraintUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
DROOLS_NORMALIZE_CONSTRAINT
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
inverseExpression(RelationalExprDescr relDescr, String expression, String leftValue, String rightValue, String operator, org.drools.core.rule.Pattern pattern)
Swap left and right operands in a constraint when a fact property is located on the right side.
-
-
-
Field Detail
-
DROOLS_NORMALIZE_CONSTRAINT
public static final String DROOLS_NORMALIZE_CONSTRAINT
- See Also:
- Constant Field Values
-
-
Method Detail
-
inverseExpression
public static String inverseExpression(RelationalExprDescr relDescr, String expression, String leftValue, String rightValue, String operator, org.drools.core.rule.Pattern pattern)
Swap left and right operands in a constraint when a fact property is located on the right side. e.g. Person(20 < age) should be normalized to Person(age > 20)- Parameters:
expression
-operator
-rightValue
-leftValue
-- Returns:
- Normalized
expression
-
-