|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.grouper.internal.dao.QueryPaging
public class QueryPaging
Constructor Summary | |
---|---|
QueryPaging()
|
|
QueryPaging(int pageSize1,
int pageNumber1,
boolean doTotalCount1)
constructor. |
Method Summary | |
---|---|
void |
assertInitted()
throw exception if this bean is not initted |
void |
calculateIndexes()
Based on the pageNumber, pageSize, and totalRecordCount, figure out the rest. |
java.util.List<java.lang.Integer> |
getAllPages()
This can be used to provide a drop down box of possible pages to skip to. |
int |
getFirstIndexOnPage()
return the first index on page (0 indexed), from 0 to the number of results |
int |
getLastIndexOnPage()
return the last index on page (0 indexed) |
int |
getNumberOfPages()
getter for numberOfPages: number of pages total |
int |
getNumberOfResultsOnPage()
Get the number of results on the current page |
int |
getPageEndIndex()
getter for pageEndIndex: index (1 indexed) of the last record on the page |
int |
getPageNumber()
getter for pageNumber: page number indexed by 1 (friendly) |
int |
getPageSize()
getter for pageSize: the number of records per page |
int |
getPageStartIndex()
getter for pageStartIndex: index of the first record on the first page, this was documented as 1 indexed, but it seems to be 0 indexed |
int |
getTotalOnLastPage()
calculate the total record count on last page |
int |
getTotalRecordCount()
getter for totalRecordCount: total number of records in the set (you must set this before the tag is called) |
boolean |
initted()
see if this bean has been calculated |
boolean |
isCacheTotalCount()
if we should cache the total count and not run again if already run |
boolean |
isDoTotalCount()
if we should do the total count when we do that actual query (note, this might not always be possible in all cases, will throw an exception if not possible) |
boolean |
isFirstPage()
see if the paging is on first page |
boolean |
isLastPage()
see if the paging is on last page |
int |
nextPageNeeded(int currentPageNumber)
based on a paging bean, and a current page, return the next page needed to display (ellipses, button, or label) |
static QueryPaging |
page(int pageSize,
int pageNumber,
boolean doTotalCount)
factory for query paging |
void |
setCacheTotalCount(boolean cacheTotalCount1)
if we should cache the total count and not run again if already run |
void |
setDoTotalCount(boolean doTotalCount1)
if we should do the total count when we do that actual query (note, this might not always be possible in all cases, will throw an exception if not possible) |
void |
setFirstIndexOnPage(int startIndex)
set the first index on the page, 0 indexed 0 -> 1, pageSize -> 2, 2*pageSize -> 3 |
void |
setNumberOfPages(int _numberOfPages)
setter for numberOfPages: number of pages total |
void |
setPageEndIndex(int _pageEndIndex)
setter for pageEndIndex: index (1 indexed) of the last record on the page |
void |
setPageNumber(int _pageNumber)
pageNumber: page number indexed by 1 (friendly) |
void |
setPageSize(int _pageSize)
setter for pageSize: the number of records per page |
void |
setPageStartIndex(int _pageStartIndex)
setter for pageStartIndex: index of the first record on the first page, this was documented as 1 indexed, but it seems to be 0 indexed |
void |
setPageStartIndexQueryByIndex(int startIndex)
set the first index on the page, 0 indexed, dont use pages to query... |
void |
setTotalRecordCount(int _totalRecordCount)
setter for totalRecordCount: total number of records in the set (you must set this before the tag is called) |
boolean |
shouldPage()
if we should page |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QueryPaging()
public QueryPaging(int pageSize1, int pageNumber1, boolean doTotalCount1)
pageSize1
- number of records per pagepageNumber1
- 1 indexed page number to showdoTotalCount1
- if hibernate session should do a total count and
calculate indexes when doing the queryMethod Detail |
---|
public int getNumberOfPages()
public int getPageEndIndex()
public int getPageNumber()
public int getPageSize()
public int getPageStartIndex()
public int getTotalRecordCount()
public void setNumberOfPages(int _numberOfPages)
_numberOfPages
- is the data to setpublic void setPageEndIndex(int _pageEndIndex)
_pageEndIndex
- is the data to setpublic void setPageSize(int _pageSize)
_pageSize
- is the data to setpublic void setPageStartIndex(int _pageStartIndex)
_pageStartIndex
- is the data to setpublic void setPageStartIndexQueryByIndex(int startIndex)
set the first index on the page, 0 indexed, dont use pages to query...
startIndex
- public void setTotalRecordCount(int _totalRecordCount)
_totalRecordCount
- is the data to setpublic void assertInitted()
public void calculateIndexes()
public java.util.List<java.lang.Integer> getAllPages()
public int getFirstIndexOnPage()
public void setFirstIndexOnPage(int startIndex)
set the first index on the page, 0 indexed 0 -> 1, pageSize -> 2, 2*pageSize -> 3
startIndex
- public int getLastIndexOnPage()
public int getNumberOfResultsOnPage()
public int getTotalOnLastPage()
public boolean initted()
public boolean isFirstPage()
public boolean isLastPage()
public int nextPageNeeded(int currentPageNumber)
currentPageNumber
-
public void setPageNumber(int _pageNumber)
_pageNumber
- public boolean shouldPage()
public static QueryPaging page(int pageSize, int pageNumber, boolean doTotalCount)
pageSize
- pageNumber
- 1 indexed page numberdoTotalCount
- true to do total count, false to not
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean isDoTotalCount()
public void setDoTotalCount(boolean doTotalCount1)
doTotalCount1
- public boolean isCacheTotalCount()
public void setCacheTotalCount(boolean cacheTotalCount1)
cacheTotalCount1
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |