public class PagerParameters
extends java.lang.Object
Pager
the
pageNumber
property of this class also follows this principle.
TODO consider merging this class with PagerUtils
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
DEFAULT_PAGESIZE |
Constructor and Description |
---|
PagerParameters(java.lang.Integer pageSize,
java.lang.Integer pageIndex) |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getPageIndex()
NOTE: As the indices for objects and pages are 0-based
|
java.lang.Integer |
getPageSize() |
PagerParameters |
normalizeAndValidate(javax.servlet.http.HttpServletResponse response)
Normalizes this
PagerParameters according to the following
rules and responds with an HTTP error in case of invalid parameters. |
void |
setPageIndex(java.lang.Integer pageIndex)
NOTE: As the indices for objects and pages are 0-based
|
void |
setPageSize(java.lang.Integer pageSize) |
public PagerParameters(java.lang.Integer pageSize, java.lang.Integer pageIndex)
public void setPageSize(java.lang.Integer pageSize)
public java.lang.Integer getPageSize()
public void setPageIndex(java.lang.Integer pageIndex)
pageIndex
- public java.lang.Integer getPageIndex()
public PagerParameters normalizeAndValidate(javax.servlet.http.HttpServletResponse response) throws java.io.IOException
PagerParameters
according to the following
rules and responds with an HTTP error in case of invalid parameters.
NULL
.DEFAULT_PAGESIZE
if set to NULL
.HTTP_BAD_REQUEST
if pageIndex
or pageSize
are smaller than 0.
response
- java.io.IOException
Copyright © 2007-2020 EDIT. All Rights Reserved.