Programming Tutorials

Comment on Tutorial - Paging Through the Result Set in Hibernate By Sumit Pal



Comment Added by : Roshan

Comment Added at : 2011-05-02 12:06:27

Comment on Tutorial : Paging Through the Result Set in Hibernate By Sumit Pal
Hi Along with your provided code below, if we are looking for total number of rows (only count) then what we need to do?:

Query query = session.createQuery("from Product");
query.setFirstResult(1);
query.setMaxResults(2);
List results = query.list();
displayProductsList(results);

Thanks in advance,
Regards,
Roshan


View Tutorial