BooleanExpr firstChild = children.get(0).getQuery();
if (children.size() == 1) {
return firstChild;
}
OrExpr orExpr = new OrExpr(firstChild);
for (int i = 1; i < children.size(); i++) {
BooleanExpr child = children.get(i).getQuery();
orExpr.getChildren().add(child);
}
return orExpr;
}