java.lang.Object | |
↳ | bucket.core.actions.PaginationSupport |
![]() |
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. Hence please use this bean in one of two ways (a) set _items_ on this bean and have the bean slice and dice up the uber collection for you and serve it to you with getPage() OR (b) set the total on this bean _only_ and leave the items _alone_. this is recommended for really large collections where its not ideal to load them all up.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEFAULT_COUNT_ON_EACH_PAGE | |||||||||||
DEFAULT_PAGE_SIZE |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
since 3.0 (at least). Please use
getPageSize()
| |||||||||||
This method is deprecated.
since 3.0 (at least). Please use
getNiceEndIndex()
| |||||||||||
This method is deprecated.
since 3.0 (at least). Please use
getNextStartIndex()
| |||||||||||
Returns the next start index.
| |||||||||||
Returns a subset of the list of items passed in, based on startIndex and the page size
| |||||||||||
This method is deprecated.
since 3.0 (at least). Please use
getPreviousStartIndex()
| |||||||||||
Returns the previous start index.
| |||||||||||
Returns the start index.
| |||||||||||
Always return the start index value, regardless of whether the pagination has any total.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
This method is deprecated.
since 3.0 (at least). Please use getNiceEndIndex()
This implementation always returned the nice end index. The correct end index would have been one less. Deprecating this and introduce a new method that has a more accurate name.
Returns the next start index. Returns -1 if we are on the last page (there is no next page).
Returns a subset of the list of items passed in, based on startIndex and the page size
Returns the previous start index. Returns -1 if we are on the first page (there is no previous page).
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.
Always return the start index value, regardless of whether the pagination has any total.