Constraint newRight = rewrite(context, right);
if (newLeft != left || newRight != right) {
return new Or(newLeft, newRight);
}
} else if (constraint instanceof Not) {
Not not = (Not)constraint;
Constraint oldInner = not.getConstraint();
Constraint newInner = rewrite(context, oldInner);
if (oldInner != newInner) {
return new Not(newInner);
}
} else if (constraint instanceof Between) {
Between between = (Between)constraint;
DynamicOperand operand = between.getOperand();
DynamicOperand newOperand = rewrite(context, operand);