Class SearchResultsSetImpl
- java.lang.Object
-
- com.adobe.cq.commerce.core.search.internal.models.SearchResultsSetImpl
-
- All Implemented Interfaces:
SearchResultsSet
public class SearchResultsSetImpl extends Object implements SearchResultsSet
-
-
Constructor Summary
Constructors Constructor Description SearchResultsSetImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<SearchAggregation>
getAppliedAggregations()
Get the list of aggregations or filters that were applied in this search.Map<String,String>
getAppliedQueryParameters()
Get a map of the applied search query string parameters.List<SearchAggregation>
getAvailableAggregations()
Get the available search aggregations for the given result setPager
getPager()
List<ProductListItem>
getProductListItems()
Get the result product list items.List<SearchAggregation>
getSearchAggregations()
Get the available search aggregations for the given result set.SearchOptions
getSearchOptions()
Get the search options used to provide this search result set.SorterImpl
getSorter()
Integer
getTotalResults()
Get the total number of results.boolean
hasAggregations()
boolean
hasPagination()
boolean
hasSorting()
void
setProductListItems(List<ProductListItem> productListItems)
void
setSearchAggregations(List<SearchAggregation> searchAggregations)
void
setSearchOptions(SearchOptions searchOptions)
void
setTotalResults(Integer totalResults)
-
-
-
Method Detail
-
getSearchOptions
@Nonnull public SearchOptions getSearchOptions()
Description copied from interface:SearchResultsSet
Get the search options used to provide this search result set.- Specified by:
getSearchOptions
in interfaceSearchResultsSet
- Returns:
- the
SearchOptions
used in the search
-
getTotalResults
@Nonnull public Integer getTotalResults()
Description copied from interface:SearchResultsSet
Get the total number of results.- Specified by:
getTotalResults
in interfaceSearchResultsSet
- Returns:
- the total number of results
-
getProductListItems
@Nonnull public List<ProductListItem> getProductListItems()
Description copied from interface:SearchResultsSet
Get the result product list items. These are the actual result of the search.- Specified by:
getProductListItems
in interfaceSearchResultsSet
- Returns:
- the resulting products
-
getSearchAggregations
@Nonnull public List<SearchAggregation> getSearchAggregations()
Description copied from interface:SearchResultsSet
Get the available search aggregations for the given result set.- Specified by:
getSearchAggregations
in interfaceSearchResultsSet
- Returns:
- the aggregations or filters available for the search result set.
-
getPager
@Nonnull public Pager getPager()
- Specified by:
getPager
in interfaceSearchResultsSet
- Returns:
- The pager model, responsible for handling the pagination of search results.
-
getSorter
@Nonnull public SorterImpl getSorter()
- Specified by:
getSorter
in interfaceSearchResultsSet
- Returns:
- The sorter model, responsible for handling the sorting of search results.
-
getAppliedQueryParameters
@Nonnull public Map<String,String> getAppliedQueryParameters()
Description copied from interface:SearchResultsSet
Get a map of the applied search query string parameters.- Specified by:
getAppliedQueryParameters
in interfaceSearchResultsSet
- Returns:
- the query string parameters (key value pairs)
-
setTotalResults
public void setTotalResults(Integer totalResults)
-
setSearchOptions
public void setSearchOptions(SearchOptions searchOptions)
-
setProductListItems
public void setProductListItems(List<ProductListItem> productListItems)
-
setSearchAggregations
public void setSearchAggregations(List<SearchAggregation> searchAggregations)
-
getAvailableAggregations
@Nonnull public List<SearchAggregation> getAvailableAggregations()
Description copied from interface:SearchResultsSet
Get the available search aggregations for the given result set- Specified by:
getAvailableAggregations
in interfaceSearchResultsSet
- Returns:
- the available aggregations
-
getAppliedAggregations
@Nonnull public List<SearchAggregation> getAppliedAggregations()
Description copied from interface:SearchResultsSet
Get the list of aggregations or filters that were applied in this search.- Specified by:
getAppliedAggregations
in interfaceSearchResultsSet
- Returns:
- the applied filter aggregations
-
hasAggregations
public boolean hasAggregations()
- Specified by:
hasAggregations
in interfaceSearchResultsSet
- Returns:
true
if the result set provides search aggregations for faceted search support,false
otherwise
-
hasPagination
public boolean hasPagination()
- Specified by:
hasPagination
in interfaceSearchResultsSet
- Returns:
true
if the result set provides pagination,false
otherwise
-
hasSorting
public boolean hasSorting()
- Specified by:
hasSorting
in interfaceSearchResultsSet
- Returns:
true
if the result set provides support for sorting of the results,false
otherwise
-
-