How to create a pagination using Criteria?
To create a pagination or limit the resultset returned by the
Criteria query we can use the
setMaxResults() method. The
setFirstResult() method defines the first row to start with and the
setMaxResults() method defines the maximum number of records to read. Let's see the demo below.