Class ProductProjectionPagedSearchResponseBuilder
java.lang.Object
com.commercetools.api.models.product.ProductProjectionPagedSearchResponseBuilder
- All Implemented Interfaces:
Builder<ProductProjectionPagedSearchResponse>
public class ProductProjectionPagedSearchResponseBuilder
extends Object
implements Builder<ProductProjectionPagedSearchResponse>
ProductProjectionPagedSearchResponseBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
ProductProjectionPagedSearchResponse productProjectionPagedSearchResponse = ProductProjectionPagedSearchResponse.builder()
.limit(0.3)
.count(0.3)
.offset(0.3)
.plusResults(resultsBuilder -> resultsBuilder)
.facets(facetsBuilder -> facetsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd the value to the results using the builder functionbuild()
builds ProductProjectionPagedSearchResponse with checking for non-null required valuesbuilds ProductProjectionPagedSearchResponse without checking for non-null required valuesset the value to the countfacets
(FacetResults facets) set the value to the facetsfacets
(Function<FacetResultsBuilder, FacetResultsBuilder> builder) set the value to the facets using the builder functiongetCount()
value of count}value of facets}getLimit()
Number of results requested.Number of elements skipped.value of results}getTotal()
value of total}Number of results requested.of()
factory method for an instance of ProductProjectionPagedSearchResponseBuilderof
(ProductProjectionPagedSearchResponse template) create builder for ProductProjectionPagedSearchResponse instanceNumber of elements skipped.plusResults
(ProductProjection... results) add values to the resultsadd the value to the results using the builder functionresults
(ProductProjection... results) set values to the resultsresults
(List<ProductProjection> results) set value to the resultsset the value to the results using the builder functionset the value to the totalwithFacets
(Function<FacetResultsBuilder, FacetResults> builder) set the value to the facets using the builder functionset the value to the results using the builder function
-
Constructor Details
-
ProductProjectionPagedSearchResponseBuilder
public ProductProjectionPagedSearchResponseBuilder()
-
-
Method Details
-
limit
Number of results requested.
- Parameters:
limit
- value to be set- Returns:
- Builder
-
count
set the value to the count- Parameters:
count
- value to be set- Returns:
- Builder
-
total
set the value to the total- Parameters:
total
- value to be set- Returns:
- Builder
-
offset
Number of elements skipped.
- Parameters:
offset
- value to be set- Returns:
- Builder
-
results
set values to the results- Parameters:
results
- value to be set- Returns:
- Builder
-
results
set value to the results- Parameters:
results
- value to be set- Returns:
- Builder
-
plusResults
add values to the results- Parameters:
results
- value to be set- Returns:
- Builder
-
plusResults
public ProductProjectionPagedSearchResponseBuilder plusResults(Function<ProductProjectionBuilder, ProductProjectionBuilder> builder) add the value to the results using the builder function- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
withResults
public ProductProjectionPagedSearchResponseBuilder withResults(Function<ProductProjectionBuilder, ProductProjectionBuilder> builder) set the value to the results using the builder function- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
addResults
public ProductProjectionPagedSearchResponseBuilder addResults(Function<ProductProjectionBuilder, ProductProjection> builder) add the value to the results using the builder function- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
setResults
public ProductProjectionPagedSearchResponseBuilder setResults(Function<ProductProjectionBuilder, ProductProjection> builder) set the value to the results using the builder function- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
facets
public ProductProjectionPagedSearchResponseBuilder facets(Function<FacetResultsBuilder, FacetResultsBuilder> builder) set the value to the facets using the builder function- Parameters:
builder
- function to build the facets value- Returns:
- Builder
-
withFacets
public ProductProjectionPagedSearchResponseBuilder withFacets(Function<FacetResultsBuilder, FacetResults> builder) set the value to the facets using the builder function- Parameters:
builder
- function to build the facets value- Returns:
- Builder
-
facets
set the value to the facets- Parameters:
facets
- value to be set- Returns:
- Builder
-
getLimit
Number of results requested.
- Returns:
- limit
-
getCount
value of count}- Returns:
- count
-
getTotal
value of total}- Returns:
- total
-
getOffset
Number of elements skipped.
- Returns:
- offset
-
getResults
value of results}- Returns:
- results
-
getFacets
value of facets}- 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
-