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.int
getPageCount()
Get the number of pages availableint
getPagedResultCount()
Get the total number of results available within the pages of this result.List<List<R>>
getPages()
Get the paged resultsR
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<R> query)
-
-
Method Detail
-
getOriginatingQuery
public CannedQuery<R> getOriginatingQuery()
Description copied from interface:CannedQueryResults
Get the instance of the query that generated these results.- Specified by:
getOriginatingQuery
in interfaceCannedQueryResults<R>
- 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 interfaceCannedQueryResults<R>
- 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 interfaceCannedQueryResults<R>
- Returns:
- number of results available in the pages
-
getPages
public List<List<R>> getPages()
Description copied from interface:CannedQueryResults
Get the paged results- Specified by:
getPages
in interfaceCannedQueryResults<R>
- Returns:
- a list of paged results
-
getSingleResult
public R getSingleResult()
Description copied from interface:CannedQueryResults
Get a single result if there is only one result expected.- Specified by:
getSingleResult
in interfaceCannedQueryResults<R>
- Returns:
- a single result
-
-