/** * {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof OrderElement) { OrderElement oe = (OrderElement) o; return orderPath.equals(oe.orderPath) && direction.equals(oe.direction); } return false; }
/** * {@inheritDoc} */ @Override public int hashCode() { return orderPath.hashCode() + direction.hashCode(); }
sb.append("$query->add_sort_order("); sb.append(q(decapitate(oe.getOrderPath())) + ", " + q(oe.getDirection().toString())); sb.append(");" + endl);
sb.append("$query->add_sort_order("); sb.append(q(decapitate(oe.getOrderPath())) + ", " + q(oe.getDirection().toString())); sb.append(");" + endl);
/** * {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof OrderElement) { OrderElement oe = (OrderElement) o; return orderPath.equals(oe.orderPath) && direction.equals(oe.direction); } return false; }
/** * {@inheritDoc} */ @Override public int hashCode() { return orderPath.hashCode() + direction.hashCode(); }
sort.append(oe.getOrderPath() + (oe.getDirection().equals(OrderDirection .ASC) ? " asc" : " desc"));
sort.append(oe.getOrderPath() + (oe.getDirection().equals(OrderDirection .ASC) ? " asc" : " desc"));
if (order.getDirection().equals(OrderDirection.DESC)) { qu.addToOrderBy(new OrderDescending(qf)); } else {
if (order.getDirection().equals(OrderDirection.DESC)) { qu.addToOrderBy(new OrderDescending(qf)); } else {