Class PagingParam
java.lang.Object
com.emc.documentum.rest.http.parameter.PagingParam
A typed parameter group for the common pagination parameters used on the controller.
It contains below parameters:
- page
- items-per-page
- include-total
@ResponseBody
public ResponseEntity<GroupObject> getRepositories(
@TypedParam final PagingParam pagingParam,
@RequestUri final UriInfo uriInfo) {
}
-
Constructor Summary
ConstructorDescriptionDefault constructorPagingParam
(boolean includeTotal) ConstructorPagingParam
(int page, int itemsPerPage) ConstructorPagingParam
(int page, int itemsPerPage, boolean includeTotal) Constructor -
Method Summary
Modifier and TypeMethodDescriptionint
Get items number for each pageint
getPage()
Get page numberboolean
Check if total number is includedvoid
setIncludeTotal
(boolean includeTotal) Set include totalvoid
setItemsPerPage
(int itemsPerPage) Set items page for each pagevoid
setMaxPageSize
(int maxPageSize) Set max page size for this instancevoid
setPage
(int page) Set page number
-
Constructor Details
-
PagingParam
public PagingParam()Default constructor -
PagingParam
public PagingParam(int page, int itemsPerPage, boolean includeTotal) Constructor- Parameters:
page
- page numberitemsPerPage
- items number for each pageincludeTotal
- include total or not
-
PagingParam
public PagingParam(int page, int itemsPerPage) Constructor- Parameters:
page
- page numberitemsPerPage
- items number for each page
-
PagingParam
public PagingParam(boolean includeTotal) Constructor- Parameters:
includeTotal
- include total or not
-
-
Method Details
-
getPage
public int getPage()Get page number- Returns:
- page number
-
setPage
public void setPage(int page) Set page number- Parameters:
page
- page number
-
getItemsPerPage
public int getItemsPerPage()Get items number for each page- Returns:
- items number per page
-
setItemsPerPage
public void setItemsPerPage(int itemsPerPage) Set items page for each page- Parameters:
itemsPerPage
- items number for each page
-
isIncludeTotal
public boolean isIncludeTotal()Check if total number is included- Returns:
true
if include total
-
setIncludeTotal
public void setIncludeTotal(boolean includeTotal) Set include total- Parameters:
includeTotal
- include total or not
-
setMaxPageSize
public void setMaxPageSize(int maxPageSize) Set max page size for this instance- Parameters:
maxPageSize
- the max size of a page
-