T
- the actual type of response contentpublic class SearchResponse<T,P extends SearchParameter> extends PagingResponse<T>
List
of elements.
The type of the elements is bounded by the type parameter T. The list of results can be an empty list.
Optionally the response can contain: a count of the total returned elements, an offset, a pageSize and
the list of facets (if those were requested).Pageable.OffsetLimitParameters
Constructor and Description |
---|
SearchResponse()
Default constructor.
|
SearchResponse(long offset,
int limit)
Minimal paging constructor.
|
SearchResponse(long offset,
int pageSize,
Long count,
List<T> results,
List<Facet<P>> facets)
Full constructor.
|
SearchResponse(Pageable page)
Minimal paging constructor.
|
SearchResponse(PagingResponse<T> response)
Minimal paging constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
List<Facet<P>> |
getFacets()
Gets the resulting facets of a search operation, the list can be empty if no facets were requested.
|
SpellCheckResponse |
getSpellCheckResponse() |
int |
hashCode() |
void |
setFacets(List<Facet<P>> facets)
Sets the list of facets.
|
void |
setSpellCheckResponse(SpellCheckResponse spellCheckResponse)
Sets the spellcheck response.
|
String |
toString() |
getCount, getResults, isEndOfRecords, setCount, setEndOfRecords, setResults
addOffset, copyPagingValues, getLimit, getOffset, setLimit, setOffset
public SearchResponse()
public SearchResponse(Pageable page)
public SearchResponse(PagingResponse<T> response)
public SearchResponse(long offset, int limit)
public List<Facet<P>> getFacets()
public final void setFacets(List<Facet<P>> facets)
facets
- list of facets, never nullpublic SpellCheckResponse getSpellCheckResponse()
public void setSpellCheckResponse(SpellCheckResponse spellCheckResponse)
spellCheckResponse
- if it was requestedpublic boolean equals(Object o)
equals
in class PagingResponse<T>
public int hashCode()
hashCode
in class PagingResponse<T>
public String toString()
toString
in class PagingResponse<T>
Copyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.