Package bucket.core.actions
Class PagerPaginationSupport
java.lang.Object
bucket.core.actions.PagerPaginationSupport
- All Implemented Interfaces:
- PaginationSupport
Deprecated.
This class stores its items using a 
Pager - which cannot report the total
 size of the result. The Pager.getCurrentPage() returns
 a list of objects currently loaded in memory, which can return a List.size().
 This number is imprecise, however, and is used as functional approximation. For various reasons explained
 in the {#link Pager} javadoc, the only way to gain an accurate total size from a {#link Pager} is by using
 its iterator and keeping count of each object.
 
 If you have a regular, average sized list of items then use PaginationSupport.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intDeprecated.int[]Deprecated.Deprecated.Deprecated.int[]Deprecated.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintDeprecated.intDeprecated.com.atlassian.user.search.page.PagergetItems()Deprecated.intDeprecated.intDeprecated.Returns the next start index.int[]Deprecated.Returns an array of start indexes for pages that appear after the current page If there are no further pages, null is returnedintDeprecated.Returns an end index for use in the UI.intDeprecated.Returns a start index for use in the UI.getPage()Deprecated.returns a subset of the list of items passed in, based on startIndex and the max result per pageintDeprecated.Returns the number of items available on the current page.intDeprecated.intDeprecated.Returns the previous start index.int[]Deprecated.Returns an array of start indexes for pages that appear before the current page If there are no preceding pages, null is returnedintDeprecated.Returns the start index.intDeprecated.Always return the start index value, regardless of whether the pagination has any total.intgetTotal()Deprecated.Returns the total number of items in the listbooleanDeprecated.voidsetItems(com.atlassian.user.search.page.Pager items) Deprecated.voidsetStartIndex(int startIndex) Deprecated.voidsetTryNext(boolean tryNext) Deprecated.voidskipTo(int indexPosition) Deprecated.
- 
Field Details- 
DEFAULT_COUNT_ON_EACH_PAGEpublic static final int DEFAULT_COUNT_ON_EACH_PAGEDeprecated.- See Also:
 
- 
pageDeprecated.
- 
pagerSizeDeprecated.
- 
nextStartIndexespublic int[] nextStartIndexesDeprecated.
- 
previousStartIndexespublic int[] previousStartIndexesDeprecated.
 
- 
- 
Constructor Details- 
PagerPaginationSupportpublic PagerPaginationSupport()Deprecated.
- 
PagerPaginationSupportpublic PagerPaginationSupport(int countOnEachPage) Deprecated.
 
- 
- 
Method Details- 
getCountOnEachPagepublic int getCountOnEachPage()Deprecated.
- 
getItemspublic com.atlassian.user.search.page.Pager getItems()Deprecated.
- 
setItemspublic void setItems(com.atlassian.user.search.page.Pager items) Deprecated.
- 
setStartIndexpublic void setStartIndex(int startIndex) Deprecated.
- 
getNiceEndIndexpublic int getNiceEndIndex()Deprecated.Description copied from interface:PaginationSupportReturns an end index for use in the UI. It returns the end index - 1- Specified by:
- getNiceEndIndexin interface- PaginationSupport
- Returns:
- a nice end index
 
- 
getEndIndexpublic int getEndIndex()Deprecated.
- 
getStartIndexpublic int getStartIndex()Deprecated.Description copied from interface:PaginationSupportReturns the start index. If the start index exceeds the index of the last element, the index of the last element is returned. If the start index is less than 0, 0 is returned.- Specified by:
- getStartIndexin interface- PaginationSupport
- Returns:
- the start index.
 
- 
getStartIndexValuepublic int getStartIndexValue()Deprecated.Always return the start index value, regardless of whether the pagination has any total.- Specified by:
- getStartIndexValuein interface- PaginationSupport
- Returns:
- the start index value, regardless of whether the pagination has any total.
 
- 
getNextIndexpublic int getNextIndex()Deprecated.
- 
getNextStartIndexpublic int getNextStartIndex()Deprecated.Description copied from interface:PaginationSupportReturns the next start index. Returns -1 if we are on the last page (there is no next page).- Specified by:
- getNextStartIndexin interface- PaginationSupport
- Returns:
- the next start index. Returns -1 if we are on the last page (there is no next page).
 
- 
getPreviousIndexpublic int getPreviousIndex()Deprecated.
- 
getPreviousStartIndexpublic int getPreviousStartIndex()Deprecated.Description copied from interface:PaginationSupportReturns the previous start index. Returns -1 if we are on the first page (there is no previous page).- Specified by:
- getPreviousStartIndexin interface- PaginationSupport
- Returns:
- the previous start index. Returns -1 if we are on the first page (there is no previous page).
 
- 
getNextStartIndexespublic int[] getNextStartIndexes()Deprecated.Description copied from interface:PaginationSupportReturns an array of start indexes for pages that appear after the current page If there are no further pages, null is returned- Specified by:
- getNextStartIndexesin interface- PaginationSupport
- Returns:
- an array of start indexes for pages that appear after the current page
 
- 
getPreviousStartIndexespublic int[] getPreviousStartIndexes()Deprecated.Description copied from interface:PaginationSupportReturns an array of start indexes for pages that appear before the current page If there are no preceding pages, null is returned- Specified by:
- getPreviousStartIndexesin interface- PaginationSupport
- Returns:
- an array of start indexes for pages that appear before the current page
 
- 
getNiceStartIndexpublic int getNiceStartIndex()Deprecated.Description copied from interface:PaginationSupportReturns a start index for use in the UI. It returns the start index + 1- Specified by:
- getNiceStartIndexin interface- PaginationSupport
- Returns:
- a nice start index
 
- 
getPageDeprecated.returns a subset of the list of items passed in, based on startIndex and the max result per page- Specified by:
- getPagein interface- PaginationSupport
- Returns:
- a page of results
 
- 
getTotalpublic int getTotal()Deprecated.Description copied from interface:PaginationSupportReturns the total number of items in the list- Specified by:
- getTotalin interface- PaginationSupport
- Returns:
- total number of items in the list
 
- 
skipTopublic void skipTo(int indexPosition) Deprecated.
- 
isTryNextpublic boolean isTryNext()Deprecated.
- 
setTryNextpublic void setTryNext(boolean tryNext) Deprecated.
- 
getPageSizepublic int getPageSize()Deprecated.Description copied from interface:PaginationSupportReturns the number of items available on the current page.- Specified by:
- getPageSizein interface- PaginationSupport
- Returns:
- the number of items available on the current page.
 
 
- 
PaginationServiceinstead.