posted 15 years ago
I have a bean class
This class is being retrieved to my by hibernate in form of list. I need to implementing sorting on it. I just read that i need to Comparable interface on it and then i can do the rest.
I have one question
What if i need to sort the List of this bean on different columns i.e at one place may be i need sorting at field1 and at some place may be i need at date and on the other place i'll be looking to sort the list on id.
What could be the best possible way of doing this?
The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.