PagerBeanUtilpublic class PagerUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PagerUtil.PagerBean
Deprecated.
Pager bean containing all internal states of a pager.
|
| Constructor and Description |
|---|
PagerUtil()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
computeRecordIndexesAndPagesNumber(PagerUtil.PagerBean bean)
Deprecated.
Given a pagerBean, compute his
PagerUtil.PagerBean.recordStartIndex,
PagerUtil.PagerBean.recordEndIndex and PagerUtil.PagerBean.pagesNumber. |
static <E> List<E> |
getPage(List<E> elements,
int page,
int pageSize)
Deprecated.
Get the elements of the lists using the pager datas:
elements:all elements of the pager
pageSize: number of elements in a page
page: the requested page number starting at 1
|
static org.apache.commons.lang3.tuple.Pair<Integer,Integer> |
getPageBound(int totalCount,
int page,
int pageSize)
Deprecated.
Compute the pager bound given his datas:
totalCount: count of all elements of the pager
pageSize: number of elements in a page
page: the requested page number starting at 1
|
static int |
getTotalPage(int totalCount,
int pageSize)
Deprecated.
Given a total count of elements and a page size, compute the number of
pages available.
|
static PagerUtil.PagerBean |
newPagerBean()
Deprecated.
|
public static int getTotalPage(int totalCount,
int pageSize)
totalCount - total count of elements in the pagerpageSize - size of a pagepublic static org.apache.commons.lang3.tuple.Pair<Integer,Integer> getPageBound(int totalCount, int page, int pageSize)
totalCount: count of all elements of the pagerpageSize: number of elements in a pagepage: the requested page number starting at 1totalCount - total count of elements in the pagerpage - pager page number (starting at 1)pageSize - number of elements in a pagepublic static <E> List<E> getPage(List<E> elements, int page, int pageSize)
elements:all elements of the pagerpageSize: number of elements in a pagepage: the requested page number starting at 1E - n'importe quel typeelements - all pager elementspage - pager page number (starting at 1)pageSize - number of elements in a pagepublic static void computeRecordIndexesAndPagesNumber(PagerUtil.PagerBean bean)
PagerUtil.PagerBean.recordStartIndex,
PagerUtil.PagerBean.recordEndIndex and PagerUtil.PagerBean.pagesNumber.bean - the pagerBean to fillpublic static PagerUtil.PagerBean newPagerBean()
Copyright © 2004-2012 CodeLutin. All Rights Reserved.