Class ConstraintUtil

java.lang.Object
org.drools.compiler.rule.builder.util.ConstraintUtil

public class ConstraintUtil extends Object
  • Field Details

  • 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