use of org.apache.jackrabbit.oak.query.ast.OrderingImpl in project jackrabbit-oak by apache.
the class QueryImpl method getSortOrder.
private List<OrderEntry> getSortOrder(FilterImpl filter) {
if (orderings == null) {
return null;
}
ArrayList<OrderEntry> sortOrder = new ArrayList<OrderEntry>();
for (OrderingImpl o : orderings) {
DynamicOperandImpl op = o.getOperand();
OrderEntry e = op.getOrderEntry(filter.getSelector(), o);
if (e == null) {
continue;
}
sortOrder.add(e);
}
if (sortOrder.size() == 0) {
return null;
}
return sortOrder;
}
use of org.apache.jackrabbit.oak.query.ast.OrderingImpl in project jackrabbit-oak by apache.
the class UnionQueryImpl method toString.
@Override
public String toString() {
StringBuilder buff = new StringBuilder();
buff.append(left.toString());
buff.append(" union ");
if (unionAll) {
buff.append("all ");
}
buff.append(right.toString());
if (orderings != null) {
buff.append(" order by ");
int i = 0;
for (OrderingImpl o : orderings) {
if (i++ > 0) {
buff.append(", ");
}
buff.append(o);
}
}
return buff.toString();
}
Aggregations