What is Pageable and how I can use it?

Added by Ilya Skorik 7 months ago

IDEA says that it is the abstract interface.

I should realise it independently?
You have a ready example how to use Pageable?
Whether It is possible to combine Pageable and Sortable?


Replies

RE: What is Pageable and how I can use it? - Added by Oliver Gierke 7 months ago

Simply instantiate a PageRequest (http://hades.synyx.org/static/site/org.synyx.hades/apidocs/org/synyx/hades/domain/PageRequest.html) and hand that to the DAO. Chapter 2.5.6 of the reference documentation (http://redmine.synyx.org/attachments/54/hades-reference.pdf) explains the usage of Pageable in query methods. To apply sorting to pagination simply equip the PageRequest instance with the required sort parameters.

Regards,
Ollie