# java - jpa
# JPQL
# pagination
- criteria - www.objectdb.com
- Querying - en.wikibooks.org
- stackoverflow - jpa-paging-with-numbers-and-next-previous
REST request args
GET http://api.example.com/resources?offset=0&limit=25
OR
GET /api/v1/tickets?per_page=15&page=2
1
2
3
2
3
JPA request
List<Country> results =
query.setFirstResult(page * items-per-page)
.setMaxResults(items-per-page)
.getResultList();
1
2
3
4
2
3
4