Skip to main content

Eugen Paraschiv: JPA Pagination

[article]1. Overview. This article illustrates how to implement pagination in the Java Persistence API. It explains how to do paging with basic JQL and with the more type-safe Criteria-based API’s, discussing the advantages and known issues of each implementation. 2. Pagination with JQL and the setFirstResult(), setMaxResults() API. The simplest way to implement pagination is to use the Java Query Language – create a query and configure it via setMaxResults and setFirstResult...