you have two choices here:
either you make hibernate order the result using the orderBy in the hql query or the the criteria whatever you are using.
or you can extract the result then put it in an orderedSet using a comparator.
but the first solution is best either for performance and for application quality. Since you delegate to db what it is doing best.
Joined: Mar 29, 2011
thanks a lot.
That problem is resolved. I used @OrderBy anotation.