# java - jpa

# JPQL

# pagination

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

JPA request

List<Country> results =
      query.setFirstResult(page * items-per-page)
           .setMaxResults(items-per-page)
           .getResultList();
1
2
3
4