HQL Order By Example
Order by clause is used to retrieve the data from database in the sorted order by any property of returned class or components. HQL supports Order By Clause. In our example we will retrieve the data sorted on the insurance type. Here is the java example code: package roseindia.tutorial.hibernate; import org.hibernate.Session; import org.hibernate.*; import org.hibernate.cfg.*; import java.util.*; /** * @author Deepak Kumar * * http://www.roseindia.net HQL Order by Clause Example * */ public class HQLOrderByExample { public static void main(String[] args) { Session session = null ; try { // This step will read hibernate. cfg.xml and prepare...