throw new EISException("Query too complex for Mongo translation, relation [" + expression + "] not supported in query: " + query);
}
row.put(left, nested);
}
} else if (expression.isLogicalExpression()) {
LogicalExpression logic = (LogicalExpression)expression;
DatabaseRecord first = new DatabaseRecord();
DatabaseRecord second = new DatabaseRecord();
appendExpressionToQueryRow(logic.getFirstChild(), first, query);
appendExpressionToQueryRow(logic.getSecondChild(), second, query);
List nested = new Vector();
nested.add(first);
nested.add(second);
if (logic.getOperator().getSelector() == ExpressionOperator.And) {
row.put("$and", nested);
} else if (logic.getOperator().getSelector() == ExpressionOperator.Or) {
row.put("$or", nested);
} else {
throw new EISException("Query too complex for Mongo translation, logic [" + expression + "] not supported in query: " + query);
}
} else if (expression.isFunctionExpression()) {