| bucket.core.PaginationSupport<T> |
Known Indirect Subclasses
| ListBuilderPaginationSupport<T> |
Calculates pagination indexes using a com.atlassian.confluence.core.ListBuilder. |
| ManualTotalPaginationSupport<T> |
This class allows us to set the total number of items without
reading the size of the items list. |
| PagerPaginationSupport |
This class stores its items using a Pager - which cannot report the total
size of the result. |
| PaginationSupport<T> |
Where there are a _very_ large number of items to paginate (in othe order of 10,000's), loading them all up in memory from the db and then
handing them out to the user in a .subList fashion is not very efficient
In this scenario we only want to use this bean to compute our next and previous indexes. |
| UsernameToUserTranslatingPaginationSupport |
A special pagination support class to translate results of membership search to user objects. |
|
Class Overview
Calculates the page values and indexes for a list of items
Summary
| Public Methods |
|
abstract
int
|
getNextStartIndex()
Returns the next start index.
|
|
abstract
int[]
|
getNextStartIndexes()
Returns an array of start indexes for pages that appear after the current page
If there are no further pages, null is returned
|
|
abstract
int
|
getNiceEndIndex()
Returns an end index for use in the UI.
|
|
abstract
int
|
getNiceStartIndex()
Returns a start index for use in the UI.
|
|
abstract
List<T>
|
getPage()
Returns a sub-list of items that are shown on the page.
|
|
abstract
int
|
getPageSize()
Returns the number of items available on the current page.
|
|
abstract
int
|
getPreviousStartIndex()
Returns the previous start index.
|
|
abstract
int[]
|
getPreviousStartIndexes()
Returns an array of start indexes for pages that appear before the current page
If there are no preceding pages, null is returned
|
|
abstract
int
|
getStartIndex()
Returns the start index.
|
|
abstract
int
|
getStartIndexValue()
Always return the start index value, regardless of whether the pagination has any total.
|
|
abstract
int
|
getTotal()
Returns the total number of items in the list
|
Public Methods
public
abstract
int
getNextStartIndex
()
Returns the next start index. Returns -1 if we are on the last page (there is no next page).
Returns
- the next start index. Returns -1 if we are on the last page (there is no next page).
public
abstract
int[]
getNextStartIndexes
()
Returns an array of start indexes for pages that appear after the current page
If there are no further pages, null is returned
Returns
- an array of start indexes for pages that appear after the current page
public
abstract
int
getNiceEndIndex
()
Returns an end index for use in the UI. It returns the end index - 1
public
abstract
int
getNiceStartIndex
()
Returns a start index for use in the UI. It returns the start index + 1
public
abstract
List<T>
getPage
()
Returns a sub-list of items that are shown on the page.
Returns
- a sub-list of items that are available on the page.
public
abstract
int
getPageSize
()
Returns the number of items available on the current page.
Returns
- the number of items available on the current page.
public
abstract
int
getPreviousStartIndex
()
Returns the previous start index. Returns -1 if we are on the first page (there is no previous page).
Returns
- the previous start index. Returns -1 if we are on the first page (there is no previous page).
public
abstract
int[]
getPreviousStartIndexes
()
Returns an array of start indexes for pages that appear before the current page
If there are no preceding pages, null is returned
Returns
- an array of start indexes for pages that appear before the current page
public
abstract
int
getStartIndex
()
Returns 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.
public
abstract
int
getStartIndexValue
()
Always return the start index value, regardless of whether the pagination has any total.
Returns
- the start index value, regardless of whether the pagination has any total.
public
abstract
int
getTotal
()
Returns the total number of items in the list
Returns
- total number of items in the list