Class PaginablePageProvider<T>
java.lang.Object
java.util.AbstractCollection<T>
java.util.AbstractList<T>
java.util.ArrayList<T>
org.nuxeo.ecm.automation.core.util.PaginablePageProvider<T>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,List<T>,RandomAccess,SequencedCollection<T>,Paginable<T>
- Direct Known Subclasses:
LogEntryList,PaginableDocumentModelListImpl,PaginableLogEntryList,PaginableRecordSetImpl
Wraps a
PageProvider.- Since:
- 5.7.3
- See Also:
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the current page index as a zero-based integer.longReturns the offset (starting from 0) of the first element in the current page orUNKNOWN_SIZE.longReturns the number of elements in current page.longReturns the max number of results per page. 0 means no pagination.longReturns the total number of pages or 0 if number of pages is unknown.longReturns the number of results per page. 0 means no pagination.longReturns the number of result elements if available or a negative value if it is unknown:UNKNOWN_SIZEif it is unknown as query was not done, and since 5.5,UNKNOWN_SIZE_AFTER_QUERYif it is still unknown after query was done.longLimit of number of results beyond which the page provider may not be able to computePaginable.getResultsCount()or navigate.booleanbooleanhasError()booleanReturns a boolean expressing if the last page can be displayed.booleanReturns a boolean expressing if there are further pages.booleanReturns a boolean expressing if there is a previous page.booleanReturns if this provider is sortable.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Field Details
-
pageProvider
-
-
Constructor Details
-
PaginablePageProvider
-
-
Method Details
-
getPageSize
public long getPageSize()Description copied from interface:PaginableReturns the number of results per page. 0 means no pagination.- Specified by:
getPageSizein interfacePaginable<T>
-
getMaxPageSize
public long getMaxPageSize()Description copied from interface:PaginableReturns the max number of results per page. 0 means no pagination.If page size is greater than this maximum value, it will be taken into account instead.
- Specified by:
getMaxPageSizein interfacePaginable<T>
-
getResultsCount
public long getResultsCount()Description copied from interface:PaginableReturns the number of result elements if available or a negative value if it is unknown:UNKNOWN_SIZEif it is unknown as query was not done, and since 5.5,UNKNOWN_SIZE_AFTER_QUERYif it is still unknown after query was done.- Specified by:
getResultsCountin interfacePaginable<T>
-
getNumberOfPages
public long getNumberOfPages()Description copied from interface:PaginableReturns the total number of pages or 0 if number of pages is unknown.- Specified by:
getNumberOfPagesin interfacePaginable<T>
-
isNextPageAvailable
public boolean isNextPageAvailable()Description copied from interface:PaginableReturns a boolean expressing if there are further pages.- Specified by:
isNextPageAvailablein interfacePaginable<T>
-
isLastPageAvailable
public boolean isLastPageAvailable()Description copied from interface:PaginableReturns a boolean expressing if the last page can be displayed.- Specified by:
isLastPageAvailablein interfacePaginable<T>
-
isPreviousPageAvailable
public boolean isPreviousPageAvailable()Description copied from interface:PaginableReturns a boolean expressing if there is a previous page.- Specified by:
isPreviousPageAvailablein interfacePaginable<T>
-
getCurrentPageSize
public long getCurrentPageSize()Description copied from interface:PaginableReturns the number of elements in current page.- Specified by:
getCurrentPageSizein interfacePaginable<T>
-
getCurrentPageIndex
public long getCurrentPageIndex()Description copied from interface:PaginableReturns the current page index as a zero-based integer.- Specified by:
getCurrentPageIndexin interfacePaginable<T>
-
getCurrentPageOffset
public long getCurrentPageOffset()Description copied from interface:PaginableReturns the offset (starting from 0) of the first element in the current page orUNKNOWN_SIZE.- Specified by:
getCurrentPageOffsetin interfacePaginable<T>
-
isSortable
public boolean isSortable()Description copied from interface:PaginableReturns if this provider is sortable.- Specified by:
isSortablein interfacePaginable<T>
-
hasError
public boolean hasError() -
getErrorMessage
- Specified by:
getErrorMessagein interfacePaginable<T>
-
getAggregates
- Specified by:
getAggregatesin interfacePaginable<T>
-
hasAggregateSupport
public boolean hasAggregateSupport()- Specified by:
hasAggregateSupportin interfacePaginable<T>
-
getActiveQuickFilters
- Specified by:
getActiveQuickFiltersin interfacePaginable<T>
-
getAvailableQuickFilters
- Specified by:
getAvailableQuickFiltersin interfacePaginable<T>
-
getResultsCountLimit
public long getResultsCountLimit()Description copied from interface:PaginableLimit of number of results beyond which the page provider may not be able to computePaginable.getResultsCount()or navigate.Requesting results beyond this limit may result in error. When
Paginable.getResultsCount()is negative, it means there may be more results than this limit.0 means there is no limit.
- Specified by:
getResultsCountLimitin interfacePaginable<T>
-