if (constraint instanceof Comparison) {
Comparison comparison = (Comparison)constraint;
// Create the correct dynamic operation ...
DynamicOperation dynamicOperation = createDynamicOperation(types, schemata, columns, comparison.getOperand1());
Operator operator = comparison.getOperator();
StaticOperand staticOperand = comparison.getOperand2();
return createChecker(types, schemata, columns, dynamicOperation, operator, staticOperand);
}
if (constraint instanceof SetCriteria) {
SetCriteria setCriteria = (SetCriteria)constraint;
DynamicOperation dynamicOperation = createDynamicOperation(types, schemata, columns, setCriteria.getLeftOperand());
Operator operator = Operator.EQUAL_TO;
final List<ConstraintChecker> checkers = new LinkedList<ConstraintChecker>();
for (StaticOperand setValue : setCriteria.getRightOperands()) {
ConstraintChecker rightChecker = createChecker(types, schemata, columns, dynamicOperation, operator, setValue);
assert rightChecker != null;
checkers.add(rightChecker);