Class SearchPageResponse<T>
- java.lang.Object
-
- com.atlassian.confluence.api.model.search.SearchPageResponse<T>
-
- Type Parameters:
T
- the type of entity in the collection of search results
- All Implemented Interfaces:
PageResponse<T>
,Iterable<T>
@ExperimentalApi public class SearchPageResponse<T> extends Object implements PageResponse<T>
A page response impl for the search service which provides the total size of the result set, along with the CQL Query that was used to generate the result set.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SearchPageResponse.Builder<T>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Optional<Integer>
archivedResultCount()
static <T> SearchPageResponse.Builder<T>
builder()
com.atlassian.fugue.Option<Integer>
getArchivedResultCount()
Deprecated.since 7.0.1.String
getCqlQuery()
PageRequest
getPageRequest()
List<T>
getResults()
int
getSearchDuration()
boolean
hasMore()
Indicates whether the source has more results after this page.Iterator<T>
iterator()
int
size()
int
totalSize()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface com.atlassian.confluence.api.model.pagination.PageResponse
getNextCursor, getPrevCursor
-
-
-
-
Method Detail
-
getResults
public List<T> getResults()
- Specified by:
getResults
in interfacePageResponse<T>
- Returns:
- the results
-
size
public int size()
- Specified by:
size
in interfacePageResponse<T>
- Returns:
- the number of results in this page of results
-
totalSize
public int totalSize()
- Returns:
- the total size of the requested result set, this equal to or greater than the number of results returned in the page response.
-
getSearchDuration
public int getSearchDuration()
- Returns:
- search duration in milliseconds
-
getArchivedResultCount
@Deprecated public com.atlassian.fugue.Option<Integer> getArchivedResultCount()
Deprecated.since 7.0.1. UsearchivedResultCount()
- Returns:
- number of hits from archived spaces. Only shown if the original search returned no results.
-
archivedResultCount
public Optional<Integer> archivedResultCount()
- Returns:
- number of hits from archived spaces. Only shown if the original search returned no results.
- Since:
- 7.0.1
-
hasMore
public boolean hasMore()
Description copied from interface:PageResponse
Indicates whether the source has more results after this page.- Specified by:
hasMore
in interfacePageResponse<T>
- Returns:
- true if there are more results
-
getPageRequest
public PageRequest getPageRequest()
- Specified by:
getPageRequest
in interfacePageResponse<T>
- Returns:
- the request used to produce this response
-
getCqlQuery
public String getCqlQuery()
- Returns:
- the CQL query used to query this set of results
-
builder
public static <T> SearchPageResponse.Builder<T> builder()
-
-