Have a look at the 7.3.2 reference guide section
Quote:
If you need to specify bounds upon your result set (the maximum number of rows you want to retrieve and / or the first row you want to retrieve) you should obtain an instance of net.sf.hibernate.Query:
Code:
Query q = sess.createQuery("from DomesticCat cat");
q.setFirstResult(20);
q.setMaxResults(10);
List cats = q.list();
Beware of setting setFirstResult > 0 to use SQL LIMIT stuffs of your underlying DB.
http://forum.hibernate.org/viewtopic.php?t=924462&highlight=setfirstresult