parse page info from rest api and add it to remotedata objects

This commit is contained in:
Art Lowel
2017-06-09 17:43:26 +02:00
parent 2c7f646b71
commit bdf6d006e7
6 changed files with 68 additions and 3 deletions

View File

@@ -0,0 +1,30 @@
import { autoserialize, autoserializeAs } from "cerialize";
/**
* Represents the state of a paginated response
*/
export class PageInfo {
/**
* The number of elements on a page
*/
@autoserializeAs(Number, 'size')
elementsPerPage: number;
/**
* The total number of elements in the entire set
*/
@autoserialize
totalElements: number;
/**
* The total number of pages
*/
@autoserialize
totalPages: number;
/**
* The number of the current page, zero-based
*/
@autoserializeAs(Number, 'number')
currentPage: number;
}