On Sep 25, 2009, at 5:27 PM, Michael Gentry wrote:
I've started looking into this. How about calling the sorting
direction enum Direction or SortOrder instead of Order? (I can see
people using an ORM having an Order class already, which might be a
bit confusing ... sorting your Orders by an Order ...) With the
change, you'd end up with a constructor something like:
public Ordering(String sortPathSpec, Direction/SortOrder
sortingDirection) {...}
I guess any of the above can potentially be an entity name, but I am
fine with either of the 3.
I think we should fix the case sensitive flag while we are at it.
Thoughts on the name for that one? Here is the constructor ...
public Ordering(String sortPathSpec, Direction/SortOrder
sortingDirection, boolean caseInsensitive) {...}
One option is to make the Direction/SortOrder enum look something
like:
public enum Direction/SortOrder {
ASCENDING, ASCENDING_INSENSITIVE, DESCENDING,
DESCENDING_INSENSITIVE
}
Then you don't need the third parameter.
Good idea.
Andrus