public class EmptyResultsProvider extends Object implements PagedDocumentsProvider
UNKNOWN_SIZE
Constructor and Description |
---|
EmptyResultsProvider() |
Modifier and Type | Method and Description |
---|---|
DocumentModelList |
getCurrentPage()
Returns the current page of results.
|
int |
getCurrentPageIndex()
Get current page index as a 0 (zero) based int.
|
int |
getCurrentPageOffset() |
int |
getCurrentPageSize() |
String |
getCurrentPageStatus() |
String |
getName() |
DocumentModelList |
getNextPage()
Get the next page of documents.
|
int |
getNumberOfPages()
Return the total number of pages
|
DocumentModelList |
getPage(int page)
Sets the current page of results to the required one and return it.
|
int |
getPageSize() |
long |
getResultsCount() |
SortInfo |
getSortInfo() |
boolean |
isNextPageAvailable() |
boolean |
isPreviousPageAvailable() |
boolean |
isSortable() |
void |
last()
Go to the last page
|
void |
next()
Go to the next page
|
void |
previous()
Go to the previous page
|
void |
refresh()
Forces refresh of the current page.
|
void |
rewind()
Go to the first page
|
void |
setName(String name) |
public DocumentModelList getCurrentPage()
PagedDocumentsProvider
This method is designed to be called from JSF. It therefore ensures cheapness of repeated calls, rather than data consistency. There is a refresh() method for that.
getCurrentPage
in interface PagedDocumentsProvider
public int getCurrentPageIndex()
PagedDocumentsProvider
getCurrentPageIndex
in interface PagedDocumentsProvider
public int getCurrentPageOffset()
getCurrentPageOffset
in interface PagedDocumentsProvider
UNKNOWN_SIZE
public int getCurrentPageSize()
getCurrentPageSize
in interface PagedDocumentsProvider
public String getCurrentPageStatus()
getCurrentPageStatus
in interface PagedDocumentsProvider
public DocumentModelList getNextPage()
PagedDocumentsProvider
Has the side effect of setting the current page, too, hence
provider.getNextPage()
is equivalent to
provider.next(); page = provider.getCurrentPage()
in
terms of returned value and state of the provider, although
implementation details might imply a performance difference.
getNextPage
in interface PagedDocumentsProvider
public int getNumberOfPages()
PagedDocumentsProvider
getNumberOfPages
in interface PagedDocumentsProvider
public DocumentModelList getPage(int page)
PagedDocumentsProvider
getPage
in interface PagedDocumentsProvider
page
- the page index, starting from 0public long getResultsCount()
getResultsCount
in interface PagedDocumentsProvider
UNKNOWN_SIZE
if it is unknownpublic boolean isNextPageAvailable()
isNextPageAvailable
in interface PagedDocumentsProvider
public boolean isPreviousPageAvailable()
isPreviousPageAvailable
in interface PagedDocumentsProvider
public void last()
PagedDocumentsProvider
last
in interface PagedDocumentsProvider
public void next()
PagedDocumentsProvider
next
in interface PagedDocumentsProvider
public void previous()
PagedDocumentsProvider
previous
in interface PagedDocumentsProvider
public void refresh()
PagedDocumentsProvider
refresh
in interface PagedDocumentsProvider
public void rewind()
PagedDocumentsProvider
rewind
in interface PagedDocumentsProvider
public int getPageSize()
getPageSize
in interface PagedDocumentsProvider
public String getName()
getName
in interface PagedDocumentsProvider
public SortInfo getSortInfo()
getSortInfo
in interface PagedDocumentsProvider
public boolean isSortable()
isSortable
in interface PagedDocumentsProvider
public void setName(String name)
setName
in interface PagedDocumentsProvider
name
- the provider identifierCopyright © 2013 Nuxeo SA. All Rights Reserved.