• +91 9723535972
  • info@interviewmaterial.com

Hibernate Interview Questions and Answers

Question - How can I sort / order collection elements?

Answer - There are three different approaches: 1. Use a SortedSet or SortedMap, specifying a comparator class in the sort attribute or or . This solution does a sort in memory. 2. Specify an order-by attribute of , or , naming a list of table columns to sort by. This solution works only in JDK 1.4+. 3. Use a filter session.createFilter( collection, "order by ...." ).list()  

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners