Class ConstraintUtil
java.lang.Object
org.drools.compiler.rule.builder.util.ConstraintUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringinverseExpression(RelationalExprDescr relDescr, String expression, String leftValue, String rightValue, String operator, Pattern pattern) Swap left and right operands in a constraint when a fact property is located on the right side.
-
Field Details
-
DROOLS_NORMALIZE_CONSTRAINT
- See Also:
-
-
Method Details
-
inverseExpression
public static String inverseExpression(RelationalExprDescr relDescr, String expression, String leftValue, String rightValue, String operator, 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
-