It creates and configure a pager that allows the user to manage a query in a collection as pages. The query is defined in a filter that, together with the size of the page, are constructor parameters. Once the pager is configured, public and private methods of broker.cloudPersistence.* are used to obtain the resulting pages.
PageFetcher(filter: Filter, pageSize: Integer)
It configures the instance to be created with the collection of the query of the filter and the size of the page we want.
|filter||Filter: filter that will be obtained by the collection.|
|pageSize||Integer: page size.|
It returns the total number of objects that were obtained in the query using the configured filter.
|Integer||Number of elements.|
It returns the number of pages. They are calculated by dividing the size of the collection that was obtained in the query using the filter configured by the size of the page at the moment of creating the instance of the pager.
|Integer||Number of pages.|