On 27/01/12 4:15 AM, Michael Gentry wrote:
Any thoughts on updating SelectQuery.java to handle Orderings as:
SelectQuery(Class, Expression, Ordering) or
SelectQuery(Class, Expression, List<Ordering>) or
SelectQuery(Class, Expression, Ordering...) or
public SelectQuery addOrdering(Ordering ordering) and
public SelectQuery addOrderings(List<Ordering> orderings) ...
I'm personally thinking the last, so it is chainable.
Purely from a naming point of view, both of these:
public SelectQuery order(Ordering ordering)
public SelectQuery order(List<Ordering> orderings)
This is then chainable, and will read very nicely, particularly when combined with similar
functions for "limit", "join/prefetch", etc.
Ari
--
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A