Class ProductPagedSearchResponseBuilder
- All Implemented Interfaces:
Builder<ProductPagedSearchResponse>
Example to create an instance using the builder pattern
ProductPagedSearchResponse productPagedSearchResponse = ProductPagedSearchResponse.builder()
.total(0.3)
.offset(0.3)
.limit(0.3)
.plusFacets(facetsBuilder -> facetsBuilder)
.plusResults(resultsBuilder -> resultsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionResults for facets when requested.Search result containing the Products matching the search query.build()
builds ProductPagedSearchResponse with checking for non-null required valuesbuilds ProductPagedSearchResponse without checking for non-null required valuesfacets
(ProductSearchFacetResult... facets) Results for facets when requested.facets
(List<ProductSearchFacetResult> facets) Results for facets when requested.Results for facets when requested.getLimit()
Number of results requested.Number of elements skipped.Search result containing the Products matching the search query.getTotal()
Total number of results matching the query.Number of results requested.of()
factory method for an instance of ProductPagedSearchResponseBuilderof
(ProductPagedSearchResponse template) create builder for ProductPagedSearchResponse instanceNumber of elements skipped.plusFacets
(ProductSearchFacetResult... facets) Results for facets when requested.Results for facets when requested.plusResults
(ProductSearchResult... results) Search result containing the Products matching the search query.Search result containing the Products matching the search query.results
(ProductSearchResult... results) Search result containing the Products matching the search query.results
(List<ProductSearchResult> results) Search result containing the Products matching the search query.Results for facets when requested.Search result containing the Products matching the search query.Total number of results matching the query.Results for facets when requested.Search result containing the Products matching the search query.
-
Constructor Details
-
ProductPagedSearchResponseBuilder
public ProductPagedSearchResponseBuilder()
-
-
Method Details
-
total
Total number of results matching the query.
- Parameters:
total
- value to be set- Returns:
- Builder
-
offset
Number of elements skipped.
- Parameters:
offset
- value to be set- Returns:
- Builder
-
limit
Number of results requested.
- Parameters:
limit
- value to be set- Returns:
- Builder
-
facets
Results for facets when requested.
- Parameters:
facets
- value to be set- Returns:
- Builder
-
facets
Results for facets when requested.
- Parameters:
facets
- value to be set- Returns:
- Builder
-
plusFacets
Results for facets when requested.
- Parameters:
facets
- value to be set- Returns:
- Builder
-
plusFacets
public ProductPagedSearchResponseBuilder plusFacets(Function<ProductSearchFacetResultBuilder, ProductSearchFacetResultBuilder> builder) Results for facets when requested.
- Parameters:
builder
- function to build the facets value- Returns:
- Builder
-
withFacets
public ProductPagedSearchResponseBuilder withFacets(Function<ProductSearchFacetResultBuilder, ProductSearchFacetResultBuilder> builder) Results for facets when requested.
- Parameters:
builder
- function to build the facets value- Returns:
- Builder
-
addFacets
public ProductPagedSearchResponseBuilder addFacets(Function<ProductSearchFacetResultBuilder, ProductSearchFacetResult> builder) Results for facets when requested.
- Parameters:
builder
- function to build the facets value- Returns:
- Builder
-
setFacets
public ProductPagedSearchResponseBuilder setFacets(Function<ProductSearchFacetResultBuilder, ProductSearchFacetResult> builder) Results for facets when requested.
- Parameters:
builder
- function to build the facets value- Returns:
- Builder
-
results
Search result containing the Products matching the search query.
- Parameters:
results
- value to be set- Returns:
- Builder
-
results
Search result containing the Products matching the search query.
- Parameters:
results
- value to be set- Returns:
- Builder
-
plusResults
Search result containing the Products matching the search query.
- Parameters:
results
- value to be set- Returns:
- Builder
-
plusResults
public ProductPagedSearchResponseBuilder plusResults(Function<ProductSearchResultBuilder, ProductSearchResultBuilder> builder) Search result containing the Products matching the search query.
- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
withResults
public ProductPagedSearchResponseBuilder withResults(Function<ProductSearchResultBuilder, ProductSearchResultBuilder> builder) Search result containing the Products matching the search query.
- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
addResults
public ProductPagedSearchResponseBuilder addResults(Function<ProductSearchResultBuilder, ProductSearchResult> builder) Search result containing the Products matching the search query.
- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
setResults
public ProductPagedSearchResponseBuilder setResults(Function<ProductSearchResultBuilder, ProductSearchResult> builder) Search result containing the Products matching the search query.
- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
getTotal
Total number of results matching the query.
- Returns:
- total
-
getOffset
Number of elements skipped.
- Returns:
- offset
-
getLimit
Number of results requested.
- Returns:
- limit
-
getFacets
Results for facets when requested.
- Returns:
- facets
-
getResults
Search result containing the Products matching the search query.
- Returns:
- results
-
build
builds ProductPagedSearchResponse with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductPagedSearchResponse>
- Returns:
- ProductPagedSearchResponse
-
buildUnchecked
builds ProductPagedSearchResponse without checking for non-null required values- Returns:
- ProductPagedSearchResponse
-
of
factory method for an instance of ProductPagedSearchResponseBuilder- Returns:
- builder
-
of
create builder for ProductPagedSearchResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-