public class PaginableWithDelegate<T> extends ArrayList<T> implements Paginable<T>
modCount
Constructor and Description |
---|
PaginableWithDelegate(Paginable<T> delegate) |
Modifier and Type | Method and Description |
---|---|
List<QuickFilter> |
getActiveQuickFilters() |
Map<String,Aggregate<? extends Bucket>> |
getAggregates() |
List<QuickFilter> |
getAvailableQuickFilters() |
long |
getCurrentPageIndex()
Returns the current page index as a zero-based integer.
|
long |
getCurrentPageOffset()
Returns the offset (starting from 0) of the first element in the current page or
UNKNOWN_SIZE . |
long |
getCurrentPageSize()
Returns the number of elements in current page.
|
String |
getErrorMessage() |
long |
getMaxPageSize()
Returns the max number of results per page.
|
long |
getNumberOfPages()
Returns the total number of pages or 0 if number of pages is unknown.
|
long |
getPageSize()
Returns the number of results per page.
|
long |
getResultsCount()
Returns the number of result elements if available or a negative value if it is unknown:
UNKNOWN_SIZE if it is unknown as query was not done, and since 5.5,
UNKNOWN_SIZE_AFTER_QUERY if it is still unknown after query was done. |
long |
getResultsCountLimit()
Limit of number of results beyond which the page provider may not be able to compute
#getResultsCount())
or navigate. |
boolean |
hasAggregateSupport() |
boolean |
hasError() |
boolean |
isLastPageAvailable()
Returns a boolean expressing if the last page can be displayed.
|
boolean |
isNextPageAvailable()
Returns a boolean expressing if there are further pages.
|
boolean |
isPreviousPageAvailable()
Returns a boolean expressing if there is a previous page.
|
boolean |
isSortable()
Returns if this provider is sortable.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
public PaginableWithDelegate(Paginable<T> delegate)
delegate
- public long getPageSize()
Paginable
getPageSize
in interface Paginable<T>
public long getMaxPageSize()
Paginable
If page size is greater than this maximum value, it will be taken into account instead.
getMaxPageSize
in interface Paginable<T>
public long getResultsCount()
Paginable
UNKNOWN_SIZE
if it is unknown as query was not done, and since 5.5,
UNKNOWN_SIZE_AFTER_QUERY
if it is still unknown after query was done.getResultsCount
in interface Paginable<T>
public long getNumberOfPages()
Paginable
getNumberOfPages
in interface Paginable<T>
public boolean isNextPageAvailable()
Paginable
isNextPageAvailable
in interface Paginable<T>
public boolean isLastPageAvailable()
Paginable
isLastPageAvailable
in interface Paginable<T>
public boolean isPreviousPageAvailable()
Paginable
isPreviousPageAvailable
in interface Paginable<T>
public long getCurrentPageSize()
Paginable
getCurrentPageSize
in interface Paginable<T>
public long getCurrentPageIndex()
Paginable
getCurrentPageIndex
in interface Paginable<T>
public boolean isSortable()
Paginable
isSortable
in interface Paginable<T>
public String getErrorMessage()
getErrorMessage
in interface Paginable<T>
public Map<String,Aggregate<? extends Bucket>> getAggregates()
getAggregates
in interface Paginable<T>
public boolean hasAggregateSupport()
hasAggregateSupport
in interface Paginable<T>
public List<QuickFilter> getActiveQuickFilters()
getActiveQuickFilters
in interface Paginable<T>
public List<QuickFilter> getAvailableQuickFilters()
getAvailableQuickFilters
in interface Paginable<T>
public long getCurrentPageOffset()
Paginable
UNKNOWN_SIZE
.getCurrentPageOffset
in interface Paginable<T>
public long getResultsCountLimit()
Paginable
#getResultsCount())
or navigate.
Requesting results beyond this limit may result in error. When #getResultsCount())
is negative, it means
there may be more results than this limit.
0 means there is no limit.
getResultsCountLimit
in interface Paginable<T>
Copyright © 2018 Nuxeo. All rights reserved.