Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.search.api.client.search.results.document
Class SearchPageProvider

java.lang.Object
  extended by org.nuxeo.ecm.core.search.api.client.search.results.document.SearchPageProvider
All Implemented Interfaces:
Serializable, PagedDocumentsProvider

Deprecated. use CoreQueryDocumentPageProvider instead

@Deprecated
public class SearchPageProvider
extends Object
implements PagedDocumentsProvider

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.nuxeo.ecm.core.api.PagedDocumentsProvider
UNKNOWN_SIZE
 
Constructor Summary
SearchPageProvider(ResultSet set)
          Deprecated. Constructor to create a non-sortable resultset.
SearchPageProvider(ResultSet set, boolean sortable, SortInfo sortInfo, String query)
          Deprecated. Constructor to create a sortable provider.
 
Method Summary
 DocumentModelList getCurrentPage()
          Deprecated. Returns the current page of results.
 int getCurrentPageIndex()
          Deprecated. Get current page index as a 0 (zero) based int.
 int getCurrentPageOffset()
          Deprecated.  
 int getCurrentPageSize()
          Deprecated.  
 String getCurrentPageStatus()
          Deprecated.  
 String getName()
          Deprecated.  
 DocumentModelList getNextPage()
          Deprecated. Get the next page of documents.
 int getNumberOfPages()
          Deprecated. Return the total number of pages
 DocumentModelList getPage(int page)
          Deprecated. Sets the current page of results to the required one and return it.
 int getPageSize()
          Deprecated.  
 String getQuery()
          Deprecated.  
 long getResultsCount()
          Deprecated.  
 SortInfo getSortInfo()
          Deprecated.  
 void goToPage(int page)
          Deprecated.  
 boolean isNextPageAvailable()
          Deprecated.  
 boolean isPreviousPageAvailable()
          Deprecated.  
 boolean isSortable()
          Deprecated.  
 void last()
          Deprecated. Go to the last page
 void next()
          Deprecated. Go to the next page
 void previous()
          Deprecated. Go to the previous page
 void refresh()
          Deprecated. Actual refresh will be next time the page is really needed.
 void rewind()
          Deprecated. Go to the first page
 void setName(String name)
          Deprecated.  
 void setSortable(boolean sortable)
          Deprecated.  
 void setSortInfo(SortInfo sortInfo)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchPageProvider

public SearchPageProvider(ResultSet set,
                          boolean sortable,
                          SortInfo sortInfo,
                          String query)
Deprecated. 
Constructor to create a sortable provider. Note that a provider can be sortable and have a null sortInfo, which means a subsequent method call with sortInfo not null will succeed.

Parameters:
set - the resultset
sortable - if sortable, a subsequent call that provides sorting info
sortInfo - the sorting info or null if the resultset is not sorted
query - the query that produced this result. will succeed.

SearchPageProvider

public SearchPageProvider(ResultSet set)
Deprecated. 
Constructor to create a non-sortable resultset.

Parameters:
set -
Method Detail

getCurrentPage

public DocumentModelList getCurrentPage()
Deprecated. 
Description copied from interface: PagedDocumentsProvider
Returns the current page of results.

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.

Specified by:
getCurrentPage in interface PagedDocumentsProvider
Returns:
the current page

getCurrentPageIndex

public int getCurrentPageIndex()
Deprecated. 
Description copied from interface: PagedDocumentsProvider
Get current page index as a 0 (zero) based int.

Specified by:
getCurrentPageIndex in interface PagedDocumentsProvider
Returns:
current page index

getCurrentPageStatus

public String getCurrentPageStatus()
Deprecated. 
Specified by:
getCurrentPageStatus in interface PagedDocumentsProvider
Returns:
a simple formatted string for current pagination statuts.

getNextPage

public DocumentModelList getNextPage()
Deprecated. 
Description copied from interface: PagedDocumentsProvider
Get the next page of documents.

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.

Specified by:
getNextPage in interface PagedDocumentsProvider
Returns:
the next page of documents

goToPage

public void goToPage(int page)
Deprecated. 

getPage

public DocumentModelList getPage(int page)
Deprecated. 
Description copied from interface: PagedDocumentsProvider
Sets the current page of results to the required one and return it.

Specified by:
getPage in interface PagedDocumentsProvider
Parameters:
page - the page index, starting from 0

getResultsCount

public long getResultsCount()
Deprecated. 
Specified by:
getResultsCount in interface PagedDocumentsProvider
Returns:
number of result elements if available or UNKNOWN_SIZE if it is unknown

isNextPageAvailable

public boolean isNextPageAvailable()
Deprecated. 
Specified by:
isNextPageAvailable in interface PagedDocumentsProvider
Returns:
a boolean expressing if there are further pages.

getQuery

public String getQuery()
Deprecated. 

last

public void last()
Deprecated. 
Description copied from interface: PagedDocumentsProvider
Go to the last page

Specified by:
last in interface PagedDocumentsProvider

next

public void next()
Deprecated. 
Description copied from interface: PagedDocumentsProvider
Go to the next page

Specified by:
next in interface PagedDocumentsProvider

previous

public void previous()
Deprecated. 
Description copied from interface: PagedDocumentsProvider
Go to the previous page

Specified by:
previous in interface PagedDocumentsProvider

rewind

public void rewind()
Deprecated. 
Description copied from interface: PagedDocumentsProvider
Go to the first page

Specified by:
rewind in interface PagedDocumentsProvider

isPreviousPageAvailable

public boolean isPreviousPageAvailable()
Deprecated. 
Specified by:
isPreviousPageAvailable in interface PagedDocumentsProvider
Returns:
a boolean expressing if there is a previous page.

getNumberOfPages

public int getNumberOfPages()
Deprecated. 
Description copied from interface: PagedDocumentsProvider
Return the total number of pages

Specified by:
getNumberOfPages in interface PagedDocumentsProvider
Returns:
an integer

refresh

public void refresh()
Deprecated. 
Actual refresh will be next time the page is really needed. Better suited for Seam/JSF (avoid useless multiple requests)

Specified by:
refresh in interface PagedDocumentsProvider

getCurrentPageOffset

public int getCurrentPageOffset()
Deprecated. 
Specified by:
getCurrentPageOffset in interface PagedDocumentsProvider
Returns:
the offset (starting from 0) of the first element in the current page or UNKNOWN_SIZE

getCurrentPageSize

public int getCurrentPageSize()
Deprecated. 
Specified by:
getCurrentPageSize in interface PagedDocumentsProvider
Returns:
the number of elements in current page.

getPageSize

public int getPageSize()
Deprecated. 
Specified by:
getPageSize in interface PagedDocumentsProvider
Returns:
the number of requested page size.

getSortInfo

public SortInfo getSortInfo()
Deprecated. 
Specified by:
getSortInfo in interface PagedDocumentsProvider
Returns:
the sorting info for this provider

isSortable

public boolean isSortable()
Deprecated. 
Specified by:
isSortable in interface PagedDocumentsProvider
Returns:
if this provider is sortable

setSortInfo

public void setSortInfo(SortInfo sortInfo)
Deprecated. 

setSortable

public void setSortable(boolean sortable)
Deprecated. 

getName

public String getName()
Deprecated. 
Specified by:
getName in interface PagedDocumentsProvider
Returns:
the provider identifier

setName

public void setName(String name)
Deprecated. 
Specified by:
setName in interface PagedDocumentsProvider
Parameters:
name - the provider identifier

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.