Class ConstraintUtil


  • public class ConstraintUtil
    extends Object
    • 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