com.crystaldecisions.sdk.uri
Interface IPageResult

All Superinterfaces:
java.io.Serializable

public interface IPageResult
extends java.io.Serializable

This object represents a page result from a uri-based query executed off the IInfoStore's getPagingQuery method. Please see the IInfoStore class for details on how to call this method.

See Also:
IInfoStore.getPagingQuery(String, PagingQueryOptions), PagingQueryOptions

Method Summary
 int getEstimatedTotalResultSize()
          For non-incremental queries, the behaviour is the same as IPageResult.getResultSize().
 java.lang.String getLastPageURI()
          Returns the last page URI.
 int getPageCount()
          Returns the number of page URIs returned in this result.
 int getPageSize()
          Returns the size of each page - indicating the page size used when splitting up the result set.
 java.lang.String getPageURI(int index)
          Returns the page URI at the index specified.
 int getResultSize()
          Returns the number of objects retrieved by the query.
 boolean hasMorePage(int pageindex)
          Returns whether there are more pages after the specified index.
 java.util.Iterator iterator()
          Returns an Iterator for iterating through the entire set of page URIs.
 

Method Detail

getPageCount

int getPageCount()
Returns the number of page URIs returned in this result. These URIs will represent each page of objects to be returned.

Returns:
the number of pageURIs available

getPageSize

int getPageSize()
Returns the size of each page - indicating the page size used when splitting up the result set. This will represent the page size passed in (or the default page size if none was set).

It's important to note that as of the current implementation, the page size is used only during the initial "index" query. If the set of result objects has changed before subsequent requests, then it is possible the number of objects actually returned is somewhat less or greater than the originally specified page size.

Returns:
the number of pageURIs available

getResultSize

int getResultSize()
Returns the number of objects retrieved by the query.

For non-incremental queries, this method returns the total number of objects. For incremental queries, it returns the total number of objects in all pages that have been retrieved so far.

See Also:
IPageResult.getEstimatedTotalResultSize()

getEstimatedTotalResultSize

int getEstimatedTotalResultSize()
For non-incremental queries, the behaviour is the same as IPageResult.getResultSize().

For incremental queries, it returns either the exact number of the maximum number objects retrieved by the query The behaviour depends on whether all pages have been retrieved.

If all pages in the query have been retrieved, this method returns the exact number of objects retrieved. If there are still pages to be retrieved, it returns the number of objects in the repository that match the query. It may not match the actual number of objects that would be returned because it does not perform permission checking to determine whether the user can access the objects.

Returns:
return size of result without right checking if not all pages are retrieved. If all pages are reterived, the result of getEstimatedTotalResultSize() will be reset to exact result size.
See Also:
IPageResult.getResultSize()

getPageURI

java.lang.String getPageURI(int index)
Returns the page URI at the index specified. This URI can then be passed back into IInfoStore.getStatelessPageInfo(java.lang.String, com.crystaldecisions.sdk.uri.PagingQueryOptions) to return a IStatelessPageInfo object containing the SQL representing that page of objects.

If the index is greater than the last page, it will return the last page's URI.

Parameters:
index - the index of the pageURI to retrieve
Returns:
the page URI at the given index
See Also:
IStatelessPageInfo

getLastPageURI

java.lang.String getLastPageURI()
Returns the last page URI. This URI can then be passed back into IInfoStore.getStatelessPageInfo(java.lang.String, com.crystaldecisions.sdk.uri.PagingQueryOptions) to return a IStatelessPageInfo object containing the SQL representing that page of objects.

Returns:
the last page URI.
See Also:
IStatelessPageInfo

iterator

java.util.Iterator iterator()
Returns an Iterator for iterating through the entire set of page URIs. Each object is an instance of IStatelessPageInfo.

Returns:
an iterator pointing to the first object in the set of page URIs.
See Also:
IStatelessPageInfo

hasMorePage

boolean hasMorePage(int pageindex)
Returns whether there are more pages after the specified index.

Parameters:
pageindex: - page index of the page you want to see if there's more page afterwards.
Returns:
true if there's page after pageindex, false if pageindex is the last page.