Class CustomerPagedSearchResponseBuilder
java.lang.Object
com.commercetools.api.models.customer_search.CustomerPagedSearchResponseBuilder
- All Implemented Interfaces:
Builder<CustomerPagedSearchResponse>
public class CustomerPagedSearchResponseBuilder
extends Object
implements Builder<CustomerPagedSearchResponse>
CustomerPagedSearchResponseBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CustomerPagedSearchResponse customerPagedSearchResponse = CustomerPagedSearchResponse.builder()
.total(0.3)
.limit(0.3)
.offset(0.3)
.plusResults(resultsBuilder -> resultsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSearch result containing the Customers matching the search query.build()
builds CustomerPagedSearchResponse with checking for non-null required valuesbuilds CustomerPagedSearchResponse without checking for non-null required valuesgetLimit()
Number of results requested.Number of elements skipped.Search result containing the Customers matching the search query.getTotal()
Total number of results matching the query.Number of results requested.of()
factory method for an instance of CustomerPagedSearchResponseBuilderof
(CustomerPagedSearchResponse template) create builder for CustomerPagedSearchResponse instanceNumber of elements skipped.plusResults
(CustomerSearchResult... results) Search result containing the Customers matching the search query.Search result containing the Customers matching the search query.results
(CustomerSearchResult... results) Search result containing the Customers matching the search query.results
(List<CustomerSearchResult> results) Search result containing the Customers matching the search query.Search result containing the Customers matching the search query.Total number of results matching the query.Search result containing the Customers matching the search query.
-
Constructor Details
-
CustomerPagedSearchResponseBuilder
public CustomerPagedSearchResponseBuilder()
-
-
Method Details
-
total
Total number of results matching the query.
- Parameters:
total
- value to be set- Returns:
- Builder
-
limit
Number of results requested.
- Parameters:
limit
- value to be set- Returns:
- Builder
-
offset
Number of elements skipped.
- Parameters:
offset
- value to be set- Returns:
- Builder
-
results
Search result containing the Customers matching the search query.
- Parameters:
results
- value to be set- Returns:
- Builder
-
results
Search result containing the Customers matching the search query.
- Parameters:
results
- value to be set- Returns:
- Builder
-
plusResults
Search result containing the Customers matching the search query.
- Parameters:
results
- value to be set- Returns:
- Builder
-
plusResults
public CustomerPagedSearchResponseBuilder plusResults(Function<CustomerSearchResultBuilder, CustomerSearchResultBuilder> builder) Search result containing the Customers matching the search query.
- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
withResults
public CustomerPagedSearchResponseBuilder withResults(Function<CustomerSearchResultBuilder, CustomerSearchResultBuilder> builder) Search result containing the Customers matching the search query.
- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
addResults
public CustomerPagedSearchResponseBuilder addResults(Function<CustomerSearchResultBuilder, CustomerSearchResult> builder) Search result containing the Customers matching the search query.
- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
setResults
public CustomerPagedSearchResponseBuilder setResults(Function<CustomerSearchResultBuilder, CustomerSearchResult> builder) Search result containing the Customers matching the search query.
- Parameters:
builder
- function to build the results value- Returns:
- Builder
-
getTotal
Total number of results matching the query.
- Returns:
- total
-
getLimit
Number of results requested.
- Returns:
- limit
-
getOffset
Number of elements skipped.
- Returns:
- offset
-
getResults
Search result containing the Customers matching the search query.
- Returns:
- results
-
build
builds CustomerPagedSearchResponse with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerPagedSearchResponse>
- Returns:
- CustomerPagedSearchResponse
-
buildUnchecked
builds CustomerPagedSearchResponse without checking for non-null required values- Returns:
- CustomerPagedSearchResponse
-
of
factory method for an instance of CustomerPagedSearchResponseBuilder- Returns:
- builder
-
of
create builder for CustomerPagedSearchResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-