com.abubusoft.kripton.android.PageRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kripton-android-core Show documentation
Show all versions of kripton-android-core Show documentation
Kripton Persistence Library for Android platform - core module for android modules
package com.abubusoft.kripton.android;
/**
*
* The paged version of KriptonLiveData. A paged live data allows to move in the
* dataset with three parameters:
*
*
* - page: current page.
* - pageSize: is the number of elements retrieved from
* datasource. It is also used to define iteraction with
* - offset: it is an alternative to page as navigation
* system. It rapresents the distance from the first row. If you mix
*
offset
and nextPage
, the behaviour will be strange
* (but not wrong). Just remember that nextPage
and
* previousPage
work with pages and not with
* offset
.
*
*
* @author xcesco
*
*/
public interface PageRequest {
public static PageRequest build(int pageNumber, int pageSize) {
return new PageRequestImpl(pageNumber, pageSize);
}
/**
* Set the current offset from start of dataset.
*
* @return
*/
int getOffset();
/**
* Current page
*
* @return Current page
*/
int getPageNumber();
/**
* Page size used to navigate
*
* @return Page size used to navigate
*/
int getPageSize();
}