Package org.alfresco.query
Class EmptyCannedQueryResults<R>
- java.lang.Object
-
- org.alfresco.query.EmptyPagingResults<R>
-
- org.alfresco.query.EmptyCannedQueryResults<R>
-
- All Implemented Interfaces:
CannedQueryResults<R>,PagingResults<R>
public class EmptyCannedQueryResults<R> extends EmptyPagingResults<R> implements CannedQueryResults<R>
An always emptyCannedQueryResults, used when you know you can short circuit a query when no results are found.- Since:
- 4.0
- Author:
- Nick Burch
-
-
Constructor Summary
Constructors Constructor Description EmptyCannedQueryResults(CannedQuery<R> query)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CannedQuery<R>getOriginatingQuery()Get the instance of the query that generated these results.intgetPageCount()Get the number of pages availableintgetPagedResultCount()Get the total number of results available within the pages of this result.List<List<R>>getPages()Get the paged resultsRgetSingleResult()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<R> query)
-
-
Method Detail
-
getOriginatingQuery
public CannedQuery<R> getOriginatingQuery()
Description copied from interface:CannedQueryResultsGet the instance of the query that generated these results.- Specified by:
getOriginatingQueryin interfaceCannedQueryResults<R>- Returns:
- the query that generated these results.
-
getPageCount
public int getPageCount()
Description copied from interface:CannedQueryResultsGet the number of pages available- Specified by:
getPageCountin interfaceCannedQueryResults<R>- Returns:
- the number of pages available
-
getPagedResultCount
public int getPagedResultCount()
Description copied from interface:CannedQueryResultsGet 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:
getPagedResultCountin interfaceCannedQueryResults<R>- Returns:
- number of results available in the pages
-
getPages
public List<List<R>> getPages()
Description copied from interface:CannedQueryResultsGet the paged results- Specified by:
getPagesin interfaceCannedQueryResults<R>- Returns:
- a list of paged results
-
getSingleResult
public R getSingleResult()
Description copied from interface:CannedQueryResultsGet a single result if there is only one result expected.- Specified by:
getSingleResultin interfaceCannedQueryResults<R>- Returns:
- a single result
-
-