return new FullTextSearch(replacement, search.getPropertyName(), search.getFullTextSearchExpression());
}
if (constraint instanceof Between) {
Between between = (Between)constraint;
DynamicOperand lhs = between.getOperand();
StaticOperand lower = between.getLowerBound(); // Current only a literal; therefore, no reference to selector
StaticOperand upper = between.getUpperBound(); // Current only a literal; therefore, no reference to selector
DynamicOperand newLhs = replaceReferencesToRemovedSource(context, lhs, rewrittenSelectors);
if (lhs == newLhs) return between;
return new Between(newLhs, lower, upper, between.isLowerBoundIncluded(), between.isUpperBoundIncluded());
}
if (constraint instanceof Comparison) {
Comparison comparison = (Comparison)constraint;
DynamicOperand lhs = comparison.getOperand1();
StaticOperand rhs = comparison.getOperand2(); // Current only a literal; therefore, no reference to selector
DynamicOperand newLhs = replaceReferencesToRemovedSource(context, lhs, rewrittenSelectors);
if (lhs == newLhs) return comparison;
return new Comparison(newLhs, comparison.getOperator(), rhs);
}
return constraint;