/** * Add an ordering on the given property. If there is already an ordering * on this query then add this ordering with a lower priority. * * @param property the property to sort on * @param sortOrder the direction of the ordering * @return this object */ public ObjectSelect<T> orderBy(String property, SortOrder sortOrder) { return orderBy(new Ordering(property, sortOrder)); }
/** * Add an ascending ordering on the given property. If there is already an ordering * on this query then add this ordering with a lower priority. * * @param property the property to sort on * @return this object */ public ObjectSelect<T> orderBy(String property) { return orderBy(new Ordering(property)); }
/** * Creates a ObjectSelect that selects objects of a given persistent class * and uses provided expression for its qualifier. */ public static <T> ObjectSelect<T> query(Class<T> entityType, Expression expression, List<Ordering> orderings) { return new ObjectSelect<T>().entityType(entityType).where(expression).orderBy(orderings); }