Package bucket.core.actions
Class PagerPaginationSupport
- java.lang.Object
-
- bucket.core.actions.PagerPaginationSupport
-
- All Implemented Interfaces:
PaginationSupport
@Deprecated public class PagerPaginationSupport extends Object implements PaginationSupport
Deprecated.since 6.10.0. UsePaginationService
instead.This class stores its items using aPager
- which cannot report the total size of the result. ThePager.getCurrentPage()
returns a list of objects currently loaded in memory, which can return aList.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 Summary
Fields Modifier and Type Field Description static int
DEFAULT_COUNT_ON_EACH_PAGE
Deprecated.int[]
nextStartIndexes
Deprecated.List
page
Deprecated.Integer
pagerSize
Deprecated.int[]
previousStartIndexes
Deprecated.
-
Constructor Summary
Constructors Constructor Description PagerPaginationSupport()
Deprecated.PagerPaginationSupport(int countOnEachPage)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
getCountOnEachPage()
Deprecated.int
getEndIndex()
Deprecated.com.atlassian.user.search.page.Pager
getItems()
Deprecated.int
getNextIndex()
Deprecated.int
getNextStartIndex()
Deprecated.Returns the next start index.int[]
getNextStartIndexes()
Deprecated.Returns an array of start indexes for pages that appear after the current page If there are no further pages, null is returnedint
getNiceEndIndex()
Deprecated.Returns an end index for use in the UI.int
getNiceStartIndex()
Deprecated.Returns a start index for use in the UI.List
getPage()
Deprecated.returns a subset of the list of items passed in, based on startIndex and the max result per pageint
getPageSize()
Deprecated.Returns the number of items available on the current page.int
getPreviousIndex()
Deprecated.int
getPreviousStartIndex()
Deprecated.Returns the previous start index.int[]
getPreviousStartIndexes()
Deprecated.Returns an array of start indexes for pages that appear before the current page If there are no preceding pages, null is returnedint
getStartIndex()
Deprecated.Returns the start index.int
getStartIndexValue()
Deprecated.Always return the start index value, regardless of whether the pagination has any total.int
getTotal()
Deprecated.Returns the total number of items in the listboolean
isTryNext()
Deprecated.void
setItems(com.atlassian.user.search.page.Pager items)
Deprecated.void
setStartIndex(int startIndex)
Deprecated.void
setTryNext(boolean tryNext)
Deprecated.void
skipTo(int indexPosition)
Deprecated.
-
-
-
Field Detail
-
DEFAULT_COUNT_ON_EACH_PAGE
public static final int DEFAULT_COUNT_ON_EACH_PAGE
Deprecated.- See Also:
- Constant Field Values
-
page
public List page
Deprecated.
-
pagerSize
public Integer pagerSize
Deprecated.
-
nextStartIndexes
public int[] nextStartIndexes
Deprecated.
-
previousStartIndexes
public int[] previousStartIndexes
Deprecated.
-
-
Method Detail
-
getCountOnEachPage
public int getCountOnEachPage()
Deprecated.
-
getItems
public com.atlassian.user.search.page.Pager getItems()
Deprecated.
-
setItems
public void setItems(com.atlassian.user.search.page.Pager items)
Deprecated.
-
setStartIndex
public void setStartIndex(int startIndex)
Deprecated.
-
getNiceEndIndex
public int getNiceEndIndex()
Deprecated.Description copied from interface:PaginationSupport
Returns an end index for use in the UI. It returns the end index - 1- Specified by:
getNiceEndIndex
in interfacePaginationSupport
- Returns:
- a nice end index
-
getEndIndex
public int getEndIndex()
Deprecated.
-
getStartIndex
public int getStartIndex()
Deprecated.Description copied from interface:PaginationSupport
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.- Specified by:
getStartIndex
in interfacePaginationSupport
- Returns:
- the start index.
-
getStartIndexValue
public int getStartIndexValue()
Deprecated.Always return the start index value, regardless of whether the pagination has any total.- Specified by:
getStartIndexValue
in interfacePaginationSupport
- Returns:
- the start index value, regardless of whether the pagination has any total.
-
getNextIndex
public int getNextIndex()
Deprecated.
-
getNextStartIndex
public int getNextStartIndex()
Deprecated.Description copied from interface:PaginationSupport
Returns the next start index. Returns -1 if we are on the last page (there is no next page).- Specified by:
getNextStartIndex
in interfacePaginationSupport
- Returns:
- the next start index. Returns -1 if we are on the last page (there is no next page).
-
getPreviousIndex
public int getPreviousIndex()
Deprecated.
-
getPreviousStartIndex
public int getPreviousStartIndex()
Deprecated.Description copied from interface:PaginationSupport
Returns the previous start index. Returns -1 if we are on the first page (there is no previous page).- Specified by:
getPreviousStartIndex
in interfacePaginationSupport
- Returns:
- the previous start index. Returns -1 if we are on the first page (there is no previous page).
-
getNextStartIndexes
public int[] getNextStartIndexes()
Deprecated.Description copied from interface:PaginationSupport
Returns an array of start indexes for pages that appear after the current page If there are no further pages, null is returned- Specified by:
getNextStartIndexes
in interfacePaginationSupport
- Returns:
- an array of start indexes for pages that appear after the current page
-
getPreviousStartIndexes
public int[] getPreviousStartIndexes()
Deprecated.Description copied from interface:PaginationSupport
Returns an array of start indexes for pages that appear before the current page If there are no preceding pages, null is returned- Specified by:
getPreviousStartIndexes
in interfacePaginationSupport
- Returns:
- an array of start indexes for pages that appear before the current page
-
getNiceStartIndex
public int getNiceStartIndex()
Deprecated.Description copied from interface:PaginationSupport
Returns a start index for use in the UI. It returns the start index + 1- Specified by:
getNiceStartIndex
in interfacePaginationSupport
- Returns:
- a nice start index
-
getPage
public List getPage()
Deprecated.returns a subset of the list of items passed in, based on startIndex and the max result per page- Specified by:
getPage
in interfacePaginationSupport
- Returns:
- a page of results
-
getTotal
public int getTotal()
Deprecated.Description copied from interface:PaginationSupport
Returns the total number of items in the list- Specified by:
getTotal
in interfacePaginationSupport
- Returns:
- total number of items in the list
-
skipTo
public void skipTo(int indexPosition)
Deprecated.
-
isTryNext
public boolean isTryNext()
Deprecated.
-
setTryNext
public void setTryNext(boolean tryNext)
Deprecated.
-
getPageSize
public int getPageSize()
Deprecated.Description copied from interface:PaginationSupport
Returns the number of items available on the current page.- Specified by:
getPageSize
in interfacePaginationSupport
- Returns:
- the number of items available on the current page.
-
-