Quantcast
Viewing latest article 1
Browse Latest Browse All 19

Difference between sorted and ordered collection in hibernate

Below are the differences between Sorted collection and Ordered collection in Hibernate.

sorted collection 

order collection 

A sorted collection is sorting a collection by utilizing the sorting features provided by the Java collections framework. The sorting occurs in the memory of JVM which running Hibernate, after the data being read from database using java comparator. Order collection is sorting a collection by specifying the order-by clause for sorting this collection when retrieval.
If your collection is not large, it will be more efficient way to sort it. If your collection is very large, it will be more efficient way to sort it .

 

Other Useful Links:

Caching in Hibernate

Hibernate Interview Questions

Advantages of Hibernate over jdbc


Filed under: Hibernate Tagged: Hibernate, interview questions, Java, java collections framework Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing latest article 1
Browse Latest Browse All 19

Trending Articles