E
- the typepublic abstract class AbstractPaginator<E> extends Object implements IPaginator<E>
Modifier and Type | Field and Description |
---|---|
static String |
LABEL_FIRST |
static String |
LABEL_LAST |
static String |
LABEL_NEXT |
static String |
LABEL_PREVIOUS |
static String |
PARAMETER_ITEMS_PER_PAGE
Default value for Items Per Page Parameter
|
static String |
PARAMETER_PAGE_INDEX
Default value for Page Index Parameter
|
Constructor and Description |
---|
AbstractPaginator() |
Modifier and Type | Method and Description |
---|---|
String |
getFirstPageLink()
Returns the previous page link
|
int |
getItemsCount()
Returns the number of items in the collection
|
int |
getItemsPerPage()
Gets the items count per page.
|
static int |
getItemsPerPage(javax.servlet.http.HttpServletRequest request,
String strParameter,
int nCurrent,
int nDefault)
Gets the number of items per page from a request parameter
|
String |
getItemsPerPageParameterName()
Get the parameter name of the
items_per_page |
String |
getLabelFirst()
Get First label
|
String |
getLabelItemCount()
Get Item Count label
|
String |
getLabelItemCountPerPage()
Get Item Count per page label
|
String |
getLabelLast()
Get First label
|
String |
getLabelNext()
Get Next label
|
String |
getLabelPrevious()
Get Previous label
|
String |
getLastPageLink()
Returns the previous page link
|
String |
getNextPageLink()
Returns the previous page link
|
int |
getPageCurrent()
Returns the current page index
|
static String |
getPageIndex(javax.servlet.http.HttpServletRequest request,
String strParameter,
String strCurrentPageIndex)
Gets the new page index from a request parameter
|
int |
getPagesCount()
Gets the number of pages
|
List<PaginatorPage> |
getPagesLinks()
Returns Pages Links
|
String |
getPreviousPageLink()
Returns the previous page link
|
int |
getRangeMax()
Returns the index of the last item of the current page range
|
int |
getRangeMin()
Returns the index of the first item of the current page range
|
void |
setItemsPerPageParameterName(String strItemsPerPageParameterName)
Set the parameter name of the
items_per_page |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPageItems
public static final String PARAMETER_PAGE_INDEX
public static final String PARAMETER_ITEMS_PER_PAGE
public static final String LABEL_FIRST
public static final String LABEL_PREVIOUS
public static final String LABEL_NEXT
public static final String LABEL_LAST
public int getPageCurrent()
getPageCurrent
in interface IPaginator<E>
public String getFirstPageLink()
getFirstPageLink
in interface IPaginator<E>
public String getPreviousPageLink()
getPreviousPageLink
in interface IPaginator<E>
public String getLastPageLink()
getLastPageLink
in interface IPaginator<E>
public int getItemsPerPage()
getItemsPerPage
in interface IPaginator<E>
public String getNextPageLink()
getNextPageLink
in interface IPaginator<E>
public List<PaginatorPage> getPagesLinks()
getPagesLinks
in interface IPaginator<E>
public String getLabelFirst()
getLabelFirst
in interface IPaginator<E>
public String getLabelPrevious()
getLabelPrevious
in interface IPaginator<E>
public String getLabelNext()
getLabelNext
in interface IPaginator<E>
public String getLabelLast()
getLabelLast
in interface IPaginator<E>
public String getLabelItemCount()
getLabelItemCount
in interface IPaginator<E>
public String getLabelItemCountPerPage()
getLabelItemCountPerPage
in interface IPaginator<E>
public String getItemsPerPageParameterName()
items_per_page
getItemsPerPageParameterName
in interface IPaginator<E>
public void setItemsPerPageParameterName(String strItemsPerPageParameterName)
items_per_page
setItemsPerPageParameterName
in interface IPaginator<E>
strItemsPerPageParameterName
- the parameter namepublic int getPagesCount()
getPagesCount
in interface IPaginator<E>
public int getRangeMin()
getRangeMin
in interface IPaginator<E>
public int getRangeMax()
getRangeMax
in interface IPaginator<E>
public int getItemsCount()
getItemsCount
in interface IPaginator<E>
public static int getItemsPerPage(javax.servlet.http.HttpServletRequest request, String strParameter, int nCurrent, int nDefault)
request
- The HTTP requeststrParameter
- The request parameter namenCurrent
- The current number of itemsnDefault
- The default number of itemspublic static String getPageIndex(javax.servlet.http.HttpServletRequest request, String strParameter, String strCurrentPageIndex)
request
- The HTTP requeststrParameter
- The request parameter namestrCurrentPageIndex
- The current page indexCopyright © 2020 City of Paris. All rights reserved.