use of io.requery.query.element.LogicalOperator in project requery by requery.
the class DefaultOutput method appendConditional.
@Override
public void appendConditional(LogicalElement element) {
LogicalOperator op = element.getOperator();
if (op != null) {
switch(op) {
case AND:
qb.keyword(AND);
break;
case OR:
qb.keyword(OR);
break;
}
}
Condition condition = element.getCondition();
boolean nested = condition.getRightOperand() instanceof Condition;
if (nested) {
qb.openParenthesis();
}
appendOperation(condition, 0);
if (nested) {
qb.closeParenthesis().space();
}
}
Aggregations