Class ProductProjectionPagedSearchResponseBuilder
- All Implemented Interfaces:
Builder<ProductProjectionPagedSearchResponse>
Example to create an instance using the builder pattern
ProductProjectionPagedSearchResponse productProjectionPagedSearchResponse = ProductProjectionPagedSearchResponse.builder()
.limit(0.3)
.offset(0.3)
.count(0.3)
.plusResults(resultsBuilder -> resultsBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}
and/orfilter.query
orfilter
query parameter.build()
builds ProductProjectionPagedSearchResponse with checking for non-null required valuesbuilds ProductProjectionPagedSearchResponse without checking for non-null required valuesActual number of results returned.facets
(FacetResults facets) Facet results for each facet expression specified in the search request.facets
(Function<FacetResultsBuilder, FacetResultsBuilder> builder) Facet results for each facet expression specified in the search request.getCount()
Actual number of results returned.Facet results for each facet expression specified in the search request.getLimit()
The maximum number of results returned on a page.The starting point for the retrieved paginated result.ProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}
and/orfilter.query
orfilter
query parameter.getTotal()
Total number of results matching the query.The maximum number of results returned on a page.of()
factory method for an instance of ProductProjectionPagedSearchResponseBuilderof
(ProductProjectionPagedSearchResponse template) create builder for ProductProjectionPagedSearchResponse instanceThe starting point for the retrieved paginated result.plusResults
(ProductProjection... results) ProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}
and/orfilter.query
orfilter
query parameter.ProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}
and/orfilter.query
orfilter
query parameter.results
(ProductProjection... results) ProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}
and/orfilter.query
orfilter
query parameter.results
(List<ProductProjection> results) ProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}
and/orfilter.query
orfilter
query parameter.ProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}
and/orfilter.query
orfilter
query parameter.Total number of results matching the query.withFacets
(Function<FacetResultsBuilder, FacetResults> builder) Facet results for each facet expression specified in the search request.ProductProjections where at least one ProductVariant matches the search query, provided with thetext.{language}
and/orfilter.query
orfilter
query parameter.
-
Constructor Details
-
ProductProjectionPagedSearchResponseBuilder
public ProductProjectionPagedSearchResponseBuilder()
-
-
Method Details
-
limit
The maximum number of results returned on a page.
- Parameters:
limit
- value to be set- Returns:
- Builder
-
offset
The starting point for the retrieved paginated result.
- Parameters:
offset
- value to be set- Returns:
- Builder
-
count
Actual number of results returned.
- Parameters:
count
- value to be set- Returns:
- Builder
-
total
Total number of results matching the query.
- Parameters:
total
- value to be set- Returns:
- Builder
-
results
ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}
and/orfilter.query
orfilter
query parameter. If the query parametermarkMatchingVariants=true
was provided with the request, the matching variants are marked as such.- Parameters:
results
- value to be set- Returns:
- Builder
-
results
ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}
and/orfilter.query
orfilter
query parameter. If the query parametermarkMatchingVariants=true
was provided with the request, the matching variants are marked as such.- Parameters:
results
- value to be set- Returns:
- Builder
-
plusResults
ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}
and/orfilter.query
orfilter
query parameter. If the query parametermarkMatchingVariants=true
was provided with the request, the matching variants are marked as such.- Parameters:
results
- value to be set- Returns:
- Builder
-
plusResults
public ProductProjectionPagedSearchResponseBuilder plusResults(Function<ProductProjectionBuilder, ProductProjectionBuilder> builder) ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}
and/orfilter.query
orfilter
query parameter. If the query parametermarkMatchingVariants=true
was provided with the request, the matching variants are marked as such.- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
withResults
public ProductProjectionPagedSearchResponseBuilder withResults(Function<ProductProjectionBuilder, ProductProjectionBuilder> builder) ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}
and/orfilter.query
orfilter
query parameter. If the query parametermarkMatchingVariants=true
was provided with the request, the matching variants are marked as such.- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
addResults
public ProductProjectionPagedSearchResponseBuilder addResults(Function<ProductProjectionBuilder, ProductProjection> builder) ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}
and/orfilter.query
orfilter
query parameter. If the query parametermarkMatchingVariants=true
was provided with the request, the matching variants are marked as such.- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
setResults
public ProductProjectionPagedSearchResponseBuilder setResults(Function<ProductProjectionBuilder, ProductProjection> builder) ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}
and/orfilter.query
orfilter
query parameter. If the query parametermarkMatchingVariants=true
was provided with the request, the matching variants are marked as such.- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
facets
public ProductProjectionPagedSearchResponseBuilder facets(Function<FacetResultsBuilder, FacetResultsBuilder> builder) Facet results for each facet expression specified in the search request.
Only present if at least one
facet
parameter was provided with the search request.- Parameters:
builder
- function to build the facets value- Returns:
- Builder
-
withFacets
public ProductProjectionPagedSearchResponseBuilder withFacets(Function<FacetResultsBuilder, FacetResults> builder) Facet results for each facet expression specified in the search request.
Only present if at least one
facet
parameter was provided with the search request.- Parameters:
builder
- function to build the facets value- Returns:
- Builder
-
facets
Facet results for each facet expression specified in the search request.
Only present if at least one
facet
parameter was provided with the search request.- Parameters:
facets
- value to be set- Returns:
- Builder
-
getLimit
The maximum number of results returned on a page.
- Returns:
- limit
-
getOffset
The starting point for the retrieved paginated result.
- Returns:
- offset
-
getCount
Actual number of results returned.
- Returns:
- count
-
getTotal
Total number of results matching the query.
- Returns:
- total
-
getResults
ProductProjections where at least one ProductVariant matches the search query, provided with the
text.{language}
and/orfilter.query
orfilter
query parameter. If the query parametermarkMatchingVariants=true
was provided with the request, the matching variants are marked as such.- Returns:
- results
-
getFacets
Facet results for each facet expression specified in the search request.
Only present if at least one
facet
parameter was provided with the search request.- Returns:
- facets
-
build
builds ProductProjectionPagedSearchResponse with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductProjectionPagedSearchResponse>
- Returns:
- ProductProjectionPagedSearchResponse
-
buildUnchecked
builds ProductProjectionPagedSearchResponse without checking for non-null required values- Returns:
- ProductProjectionPagedSearchResponse
-
of
factory method for an instance of ProductProjectionPagedSearchResponseBuilder- Returns:
- builder
-
of
public static ProductProjectionPagedSearchResponseBuilder of(ProductProjectionPagedSearchResponse template) create builder for ProductProjectionPagedSearchResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-