Class PaginablePageProvider<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
org.nuxeo.ecm.automation.core.util.PaginablePageProvider<T>
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
,RandomAccess
,Paginable<T>
- Direct Known Subclasses:
LogEntryList
,PaginableDocumentModelListImpl
,PaginableRecordSetImpl
Wraps a
PageProvider
.- Since:
- 5.7.3
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the current page index as a zero-based integer.long
Returns the offset (starting from 0) of the first element in the current page orUNKNOWN_SIZE
.long
Returns the number of elements in current page.long
Returns the max number of results per page. 0 means no pagination.long
Returns the total number of pages or 0 if number of pages is unknown.long
Returns the number of results per page. 0 means no pagination.long
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
Limit of number of results beyond which the page provider may not be able to computePaginable.getResultsCount()
or navigate.boolean
boolean
hasError()
boolean
Returns a boolean expressing if the last page can be displayed.boolean
Returns a boolean expressing if there are further pages.boolean
Returns a boolean expressing if there is a previous page.boolean
Returns if this provider is sortable.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
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
-
Field Details
-
pageProvider
-
-
Constructor Details
-
PaginablePageProvider
-
-
Method Details
-
getPageSize
public long getPageSize()Description copied from interface:Paginable
Returns the number of results per page. 0 means no pagination.- Specified by:
getPageSize
in interfacePaginable<T>
-
getMaxPageSize
public long getMaxPageSize()Description copied from interface:Paginable
Returns 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:
getMaxPageSize
in interfacePaginable<T>
-
getResultsCount
public long getResultsCount()Description copied from interface:Paginable
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.- Specified by:
getResultsCount
in interfacePaginable<T>
-
getNumberOfPages
public long getNumberOfPages()Description copied from interface:Paginable
Returns the total number of pages or 0 if number of pages is unknown.- Specified by:
getNumberOfPages
in interfacePaginable<T>
-
isNextPageAvailable
public boolean isNextPageAvailable()Description copied from interface:Paginable
Returns a boolean expressing if there are further pages.- Specified by:
isNextPageAvailable
in interfacePaginable<T>
-
isLastPageAvailable
public boolean isLastPageAvailable()Description copied from interface:Paginable
Returns a boolean expressing if the last page can be displayed.- Specified by:
isLastPageAvailable
in interfacePaginable<T>
-
isPreviousPageAvailable
public boolean isPreviousPageAvailable()Description copied from interface:Paginable
Returns a boolean expressing if there is a previous page.- Specified by:
isPreviousPageAvailable
in interfacePaginable<T>
-
getCurrentPageSize
public long getCurrentPageSize()Description copied from interface:Paginable
Returns the number of elements in current page.- Specified by:
getCurrentPageSize
in interfacePaginable<T>
-
getCurrentPageIndex
public long getCurrentPageIndex()Description copied from interface:Paginable
Returns the current page index as a zero-based integer.- Specified by:
getCurrentPageIndex
in interfacePaginable<T>
-
getCurrentPageOffset
public long getCurrentPageOffset()Description copied from interface:Paginable
Returns the offset (starting from 0) of the first element in the current page orUNKNOWN_SIZE
.- Specified by:
getCurrentPageOffset
in interfacePaginable<T>
-
isSortable
public boolean isSortable()Description copied from interface:Paginable
Returns if this provider is sortable.- Specified by:
isSortable
in interfacePaginable<T>
-
hasError
public boolean hasError() -
getErrorMessage
- Specified by:
getErrorMessage
in interfacePaginable<T>
-
getAggregates
- Specified by:
getAggregates
in interfacePaginable<T>
-
hasAggregateSupport
public boolean hasAggregateSupport()- Specified by:
hasAggregateSupport
in interfacePaginable<T>
-
getActiveQuickFilters
- Specified by:
getActiveQuickFilters
in interfacePaginable<T>
-
getAvailableQuickFilters
- Specified by:
getAvailableQuickFilters
in interfacePaginable<T>
-
getResultsCountLimit
public long getResultsCountLimit()Description copied from interface:Paginable
Limit 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:
getResultsCountLimit
in interfacePaginable<T>
-