public interface PaginatorInterface

Class that implement this interface help you manage paginated data can data that’s split across several pages.

ListPaginator this is used to resolve data that is not alot, i.e. data that can be held inthe memory with little to no cost on the app, this is usually data held in a List.

With large data that is usally stored in the database the SqlPaginator comes in handy, this paginator does not hold any data within it.

It only fetches the data and provides this data to you, its upto you to know how to store or display this data in an efficient manner.



void fetchNextPageData()

This does the actual loading of data. The loading should be done asynchronously.


int getPageCount()

The total number of pages.


int getTotalRecords()

The total number of records.


void setPageSize(int pageSize)

The number of records to display per page.

  • pageSize