I find the
Hibernate Criteria API makes this very easy to do:
These two lines of code help to limit your results. Just use a counter, and you can easily allow clients to page through your results.
criteria.setFirstResult(0);
criteria.setMaxResults(5);
Tutorial on Using the Criteria API from Hibernate -Cameron McKenzie