/** * Sort the results in ascending ('ASC') order by the given expression */ public static Order asc(Object expression) { return new Order(expression); }
/** * Sort the results in descending ('DESC') order by the given expression */ public static Order desc(Object expression) { return new Order(expression, OrderType.DESC); }
public static Order fromExpression(String expression) { return new Order(expression, OrderType.RAW); }
/** * @return an Order term that is the reverse of this one */ public Order reverse() { if (orderType == OrderType.ASC) { return new Order(expression, OrderType.DESC); } else if (orderType == OrderType.DESC) { return new Order(expression, OrderType.ASC); } else { throw new UnsupportedOperationException("reverse() is not currently supported for order type " + orderType.toString()); } } }
/** * Sort the results in ascending ('ASC') order by the given expression */ public static Order asc(Object expression) { return new Order(expression); }
/** * Sort the results in descending ('DESC') order by the given expression */ public static Order desc(Object expression) { return new Order(expression, OrderType.DESC); }
public static Order fromExpression(String expression) { return new Order(expression, OrderType.RAW); }
/** * @return an Order term that is the reverse of this one */ public Order reverse() { if (orderType == OrderType.ASC) { return new Order(expression, OrderType.DESC); } else if (orderType == OrderType.DESC) { return new Order(expression, OrderType.ASC); } else { throw new UnsupportedOperationException("reverse() is not currently supported for order type " + orderType.toString()); } } }