public class PageRangeBean extends Object implements Serializable
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected int |
_allPageCount |
protected List<Integer> |
_cachedPageNumberList |
protected int |
_currentPageNumber |
protected PageRangeOption |
_pageRangeOption |
| コンストラクタと説明 |
|---|
PageRangeBean() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
assertPageRangeValid() |
<LINK extends PageNumberLink> |
buildPageNumberLinkList(PageNumberLinkSetupper<LINK> manyArgLambda)
Build the list of page number link.
|
protected int[] |
convertListToIntArray(List<Integer> ls) |
List<Integer> |
createPageNumberList()
Create the list of page number.
|
boolean |
existsNextRange()
Does the next range exist?
|
boolean |
existsPreviousRange()
Does the previous range exist?
|
int |
getNextRangeNearestPageNumber()
Get the value of nextRangeNearestPageNumber that is calculated.
|
PageRangeOption |
getPageRangeOption() |
int |
getPreRangeNearestPageNumber()
非推奨です。
use getPreviousRangeNearestPageNumber()
|
int |
getPreviousRangeNearestPageNumber()
Get the value of previousRangeNearestPageNumber that is calculated.
|
boolean |
isExistNextPageRange()
非推奨です。
use existsNextRange()
|
boolean |
isExistPrePageRange()
非推奨です。
use existsPreviousRange()
|
void |
setAllPageCount(int allPageCount) |
void |
setCurrentPageNumber(int currentPageNumber) |
void |
setPageRangeOption(PageRangeOption pageRangeOption) |
String |
toString() |
protected int _currentPageNumber
protected int _allPageCount
protected PageRangeOption _pageRangeOption
public <LINK extends PageNumberLink> List<LINK> buildPageNumberLinkList(PageNumberLinkSetupper<LINK> manyArgLambda)
List<PageNumberLink> linkList = page.pageRange(op -> {
op.rangeSize(5);
}).buildPageNumberLinkList((pageNumberElement, current) -> {
String href = buildPagingHref(pageNumberElement); // for paging navigation links
return new PageNumberLink().initialize(pageNumberElement, current, href);
});
LINK - The type of link.manyArgLambda - The setup interface of Page number link. (NotNull, Required LINK)public List<Integer> createPageNumberList()
e.g. range-size=5, current-page=8
List<Integer> numberList = page.pageRange(op -> {
op.rangeSize(5);
}).createPageNumberList();
// 8 / 23 pages (453 records)
// previous 3 4 5 6 7 8 9 10 11 12 13 next
public boolean existsPreviousRange()
e.g. range-size=5, current-page=8 8 / 23 pages (453 records) previous 3 4 5 6 7 8 9 10 11 12 13 next // this method returns existence of 2
public boolean existsNextRange()
e.g. range-size=5, current-page=8 8 / 23 pages (453 records) previous 3 4 5 6 7 8 9 10 11 12 13 next // this method returns existence of 14
public boolean isExistPrePageRange()
e.g. range-size=5, current-page=8 8 / 23 pages (453 records) previous 3 4 5 6 7 8 9 10 11 12 13 next // this method returns existence of 2
public boolean isExistNextPageRange()
e.g. range-size=5, current-page=8 8 / 23 pages (453 records) previous 3 4 5 6 7 8 9 10 11 12 13 next // this method returns existence of 14
protected void assertPageRangeValid()
public String toString()
public void setCurrentPageNumber(int currentPageNumber)
public void setAllPageCount(int allPageCount)
public PageRangeOption getPageRangeOption()
public void setPageRangeOption(PageRangeOption pageRangeOption)
public int getPreviousRangeNearestPageNumber()
e.g. range-size=5, current-page=8 8 / 23 pages (453 records) previous 3 4 5 6 7 8 9 10 11 12 13 next // this method returns 2
public int getNextRangeNearestPageNumber()
e.g. range-size=5, current-page=8 8 / 23 pages (453 records) previous 3 4 5 6 7 8 9 10 11 12 13 next // this method returns 14
public int getPreRangeNearestPageNumber()
e.g. range-size=5, current-page=8 8 / 23 pages (453 records) previous 3 4 5 6 7 8 9 10 11 12 13 next // this method returns 2
Copyright © 2014–2015 The DBFlute Project. All rights reserved.