Class SearchResponse
java.lang.Object
org.springframework.data.domain.PageImpl<Object>
com.broadleafcommerce.search.api.domain.SearchResponse
- All Implemented Interfaces:
 Serializable,Iterable<Object>,Supplier<Stream<Object>>,org.springframework.data.domain.Page<Object>,org.springframework.data.domain.Slice<Object>,org.springframework.data.util.Streamable<Object>
Represents the results from a search.
- See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionSearchResponse(List<Object> content, org.springframework.data.domain.Pageable pageable, long total)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleangetConvertedContent(Function<? super Object, ? extends U> arg0) The facets returned in the search result.intintorg.springframework.data.domain.PageableA redirect generated based on the original request query.intgetSize()org.springframework.data.domain.SortgetSort()getSorts()The sort options returned in the search result.Set if spellcheck returned any results.booleaninthashCode()booleanbooleanIf no results were found and a different query was executed than the original, this is set to true.booleanisFirst()iterator()org.springframework.data.domain.Pageableorg.springframework.data.domain.PageablevoidsetCorrectedQuery(boolean correctedQuery) If no results were found and a different query was executed than the original, this is set to true.voidsetFacets(List<FacetResponse> facets) The facets returned in the search result.voidsetRedirect(SearchRedirectResponse redirect) A redirect generated based on the original request query.voidsetSorts(List<SortResponse> sorts) The sort options returned in the search result.voidsetSpellCheckResult(SpellCheckResult spellCheckResult) Set if spellcheck returned any results.toString()Methods inherited from class org.springframework.data.domain.PageImpl
getTotalElements, getTotalPages, hasNext, isLast, mapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.springframework.data.domain.Slice
getContent, getNumber, getNumberOfElements, getPageable, getSize, getSort, hasContent, hasPrevious, isFirst, nextOrLastPageable, nextPageable, previousOrFirstPageable, previousPageableMethods inherited from interface org.springframework.data.util.Streamable
and, and, and, and, filter, flatMap, get, isEmpty, stream, toList, toSet 
- 
Constructor Details
- 
SearchResponse
 
 - 
 - 
Method Details
- 
getFacets
The facets returned in the search result.- Returns:
 - facets returned in the search result
 
 - 
getSorts
The sort options returned in the search result.- Returns:
 - sort options returned in the search result
 
 - 
getRedirect
A redirect generated based on the original request query.If present, the rest of the response will be empty.
- Returns:
 - redirect to perform in place of search results
 
 - 
isCorrectedQuery
public boolean isCorrectedQuery()If no results were found and a different query was executed than the original, this is set to true.- Returns:
 - whether this response is for a different corrected query
 
 - 
getSpellCheckResult
Set if spellcheck returned any results. Contains the original query and any potential suggestions.- Returns:
 - spell check results and suggestions
 
 - 
setFacets
The facets returned in the search result.- Parameters:
 facets- facets returned in the search result
 - 
setSorts
The sort options returned in the search result.- Parameters:
 sorts- sort options returned in the search result
 - 
setRedirect
A redirect generated based on the original request query.If present, the rest of the response will be empty.
- Parameters:
 redirect- redirect to perform in place of search results
 - 
setCorrectedQuery
public void setCorrectedQuery(boolean correctedQuery) If no results were found and a different query was executed than the original, this is set to true.- Parameters:
 correctedQuery- whether this response is for a different corrected query
 - 
setSpellCheckResult
Set if spellcheck returned any results. Contains the original query and any potential suggestions.- Parameters:
 spellCheckResult- spell check results and suggestions
 - 
toString
- Overrides:
 toStringin classorg.springframework.data.domain.PageImpl<Object>
 - 
equals
- Overrides:
 equalsin classorg.springframework.data.domain.PageImpl<Object>
 - 
canEqual
 - 
hashCode
public int hashCode()- Overrides:
 hashCodein classorg.springframework.data.domain.PageImpl<Object>
 - 
getNumber
public int getNumber()- Specified by:
 getNumberin interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
getSize
public int getSize()- Specified by:
 getSizein interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
getNumberOfElements
public int getNumberOfElements()- Specified by:
 getNumberOfElementsin interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
hasPrevious
public boolean hasPrevious()- Specified by:
 hasPreviousin interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
isFirst
public boolean isFirst()- Specified by:
 isFirstin interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
nextPageable
public org.springframework.data.domain.Pageable nextPageable()- Specified by:
 nextPageablein interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
previousPageable
public org.springframework.data.domain.Pageable previousPageable()- Specified by:
 previousPageablein interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
hasContent
public boolean hasContent()- Specified by:
 hasContentin interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
getContent
- Specified by:
 getContentin interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
getPageable
public org.springframework.data.domain.Pageable getPageable()- Specified by:
 getPageablein interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
getSort
public org.springframework.data.domain.Sort getSort()- Specified by:
 getSortin interfaceorg.springframework.data.domain.Slice<T extends Object>
 - 
iterator
 - 
getConvertedContent
 
 -