-
Notifications
You must be signed in to change notification settings - Fork 62
Paging
Martin Caslavsky edited this page Jul 20, 2017
·
4 revisions
Multiple GoodData REST resources return results in the form of pages. Each page contains limited number of records and a URL link to next page (except the last page).
GoodData Java SDK encapsulates this resources as listItem(Page page) methods:
- paging can be controlled by the
Pageargument - eg.listItem(new PageRequest(10))list 10 items per page - the return type is
PagedList<Item>which represents the page returned from REST resource -
PagedListclass has methodsboolean hasNextPage()andPage getNextPage()which can be used iterate thru all pages - whole paging flow can be simplified using
PagedList's iterator which transparently load subsequent pages