Class ConstraintUtil
- java.lang.Object
-
- org.drools.modelcompiler.builder.generator.ConstraintUtil
-
public class ConstraintUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringGREATER_OR_EQUAL_PREFIXstatic StringGREATER_THAN_PREFIXstatic StringLESS_OR_EQUAL_PREFIXstatic StringLESS_THAN_PREFIX
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DrlxParseResultnormalizeConstraint(DrlxParseResult drlxParseResult)Swap left and right operands in a constraint when a fact property is located on the right side.
-
-
-
Field Detail
-
GREATER_THAN_PREFIX
public static final String GREATER_THAN_PREFIX
- See Also:
- Constant Field Values
-
GREATER_OR_EQUAL_PREFIX
public static final String GREATER_OR_EQUAL_PREFIX
- See Also:
- Constant Field Values
-
LESS_THAN_PREFIX
public static final String LESS_THAN_PREFIX
- See Also:
- Constant Field Values
-
LESS_OR_EQUAL_PREFIX
public static final String LESS_OR_EQUAL_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
normalizeConstraint
public static DrlxParseResult normalizeConstraint(DrlxParseResult drlxParseResult)
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:
drlxParseResult-- Returns:
- Normalized
DrlxParseResult
-
-