use of org.teiid.language.SubqueryComparison.Quantifier in project teiid by teiid.
the class LanguageBridgeFactory method translate.
SubqueryComparison translate(SubqueryCompareCriteria criteria) {
Quantifier quantifier = Quantifier.ALL;
switch(criteria.getPredicateQuantifier()) {
case SubqueryCompareCriteria.ALL:
quantifier = Quantifier.ALL;
break;
case SubqueryCompareCriteria.ANY:
quantifier = Quantifier.SOME;
break;
case SubqueryCompareCriteria.SOME:
quantifier = Quantifier.SOME;
break;
}
Operator operator = Operator.EQ;
switch(criteria.getOperator()) {
case SubqueryCompareCriteria.EQ:
operator = Operator.EQ;
break;
case SubqueryCompareCriteria.NE:
operator = Operator.NE;
break;
case SubqueryCompareCriteria.LT:
operator = Operator.LT;
break;
case SubqueryCompareCriteria.LE:
operator = Operator.LE;
break;
case SubqueryCompareCriteria.GT:
operator = Operator.GT;
break;
case SubqueryCompareCriteria.GE:
operator = Operator.GE;
break;
}
return new SubqueryComparison(translate(criteria.getLeftExpression()), operator, quantifier, translate(criteria.getCommand()));
}
Aggregations