org.alfresco.query
Class EmptyCannedQueryResults

java.lang.Object
  extended by org.alfresco.query.EmptyPagingResults
      extended by org.alfresco.query.EmptyCannedQueryResults
All Implemented Interfaces:
CannedQueryResults, PagingResults

public class EmptyCannedQueryResults
extends EmptyPagingResults
implements CannedQueryResults

An always empty CannedQueryResults, used when you know you can short circuit a query when no results are found.

Since:
4.0

Constructor Summary
EmptyCannedQueryResults(CannedQuery query)
           
 
Method Summary
 CannedQuery getOriginatingQuery()
          Get the instance of the query that generated these results.
 int getPageCount()
          Get the number of pages available
 int getPagedResultCount()
          Get the total number of results available within the pages of this result.
 java.util.List getPages()
          Get the paged results
 java.lang.Object getSingleResult()
          Get a single result if there is only one result expected.
 
Methods inherited from class org.alfresco.query.EmptyPagingResults
getPage, getQueryExecutionId, getTotalResultCount, hasMoreItems
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.query.PagingResults
getPage, getQueryExecutionId, getTotalResultCount, hasMoreItems
 

Constructor Detail

EmptyCannedQueryResults

public EmptyCannedQueryResults(CannedQuery query)
Method Detail

getOriginatingQuery

public CannedQuery getOriginatingQuery()
Description copied from interface: CannedQueryResults
Get the instance of the query that generated these results.

Specified by:
getOriginatingQuery in interface CannedQueryResults
Returns:
the query that generated these results.

getPageCount

public int getPageCount()
Description copied from interface: CannedQueryResults
Get the number of pages available

Specified by:
getPageCount in interface CannedQueryResults
Returns:
the number of pages available

getPagedResultCount

public int getPagedResultCount()
Description copied from interface: CannedQueryResults
Get the total number of results available within the pages of this result. The count excludes results chopped out by the paging process i.e. it is only the count of results physically obtainable through this instance.

Specified by:
getPagedResultCount in interface CannedQueryResults
Returns:
number of results available in the pages

getPages

public java.util.List getPages()
Description copied from interface: CannedQueryResults
Get the paged results

Specified by:
getPages in interface CannedQueryResults
Returns:
a list of paged results

getSingleResult

public java.lang.Object getSingleResult()
Description copied from interface: CannedQueryResults
Get a single result if there is only one result expected.

Specified by:
getSingleResult in interface CannedQueryResults
Returns:
a single result


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.