j2ee

Java – The Ordered Set

After doing a bit of Hibernate Development with GWT applications I have come across the same problem a few times when using and executing Hibernate queries."Placing persistent objects, found through a Hibernate query, into a Set to avoid duplicates then in nature that set loses any ordering you specified in your query"Suppose the following query: We can call this like so: List countries = (List)getHibernateTemplate().findByNamedQuery("myquery"); That list will unfortunately have...
Test link....