Paginated Response

The PaginatedResponse class is formatter for the responses of pagination requests providing easy access to page data and items data retrieved

Since

1.0.5

Author

N7ghtm4r3 - Tecknobit

Constructors

Link copied to clipboard
constructor(data: List<T>, page: Int, pageSize: Int, repository: CrudRepository<*, *>)

Constructor to init the PaginatedResponse

constructor(data: List<T>, page: Int, pageSize: Int, totalDataCount: Long)

Constructor to init the PaginatedResponse

constructor(data: List<T>, page: Int, pageSize: Int, isLastPage: Boolean)

Constructor to init the PaginatedResponse

constructor(hPage: JsonHelper, supplier: (JSONObject) -> T)

Constructor to init the PaginatedResponse

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val data: List<T>

data -> the data retrieved by the request

Link copied to clipboard

dataSize -> the size of the data retrieved for the current page

Link copied to clipboard

isLastPage -> whether the current page is the last one available

Link copied to clipboard

nextPage -> the number of the next page

Link copied to clipboard
val page: Int

page -> the number of the page requested

Link copied to clipboard

pageSize -> the size of the maximum items for page

Link copied to clipboard

previousPage -> the number of the previous page