O'Reilly logo

Spring Persistence with Hibernate by Ahmad Seddighi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Paging the query result

Often, a huge number of persistent objects satisfies your query restrictions. This means that many rows of the database are selected, and a large number of objects are loaded in memory when the query is executed. Two problems arise:

  • Loading a large set of data in memory affects the application's performance.
  • It may not be possible to show the entire set of data in the user interface. Even if this is possible, application users do not want to view the entire result in a single page.

In these situations, you can use a pagination technique to load and show only a subset of data, rather than all of it. The user interface that shows the data allows the user to navigate to the next and previous subsets of data.

In Hibernate, the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required