Class OrderPagedSearchResponseBuilder
java.lang.Object
com.commercetools.api.models.order.OrderPagedSearchResponseBuilder
- All Implemented Interfaces:
Builder<OrderPagedSearchResponse>
public class OrderPagedSearchResponseBuilder
extends Object
implements Builder<OrderPagedSearchResponse>
OrderPagedSearchResponseBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderPagedSearchResponse orderPagedSearchResponse = OrderPagedSearchResponse.builder()
.total(0.3)
.plusHits(hitsBuilder -> hitsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddHits
(Function<HitBuilder, Hit> builder) Actual results.build()
builds OrderPagedSearchResponse with checking for non-null required valuesbuilds OrderPagedSearchResponse without checking for non-null required valuesgetHits()
Actual results.getLimit()
Number of results requested.Number of elements skipped.getTotal()
Total number of results matching the query.Actual results.Actual results.Number of results requested.of()
factory method for an instance of OrderPagedSearchResponseBuilderof
(OrderPagedSearchResponse template) create builder for OrderPagedSearchResponse instanceNumber of elements skipped.Actual results.plusHits
(Function<HitBuilder, HitBuilder> builder) Actual results.setHits
(Function<HitBuilder, Hit> builder) Actual results.Total number of results matching the query.withHits
(Function<HitBuilder, HitBuilder> builder) Actual results.
-
Constructor Details
-
OrderPagedSearchResponseBuilder
public OrderPagedSearchResponseBuilder()
-
-
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
-
hits
Actual results.
- Parameters:
hits
- value to be set- Returns:
- Builder
-
hits
Actual results.
- Parameters:
hits
- value to be set- Returns:
- Builder
-
plusHits
Actual results.
- Parameters:
hits
- value to be set- Returns:
- Builder
-
plusHits
Actual results.
- Parameters:
builder
- function to build the hits value- Returns:
- Builder
-
withHits
Actual results.
- Parameters:
builder
- function to build the hits value- Returns:
- Builder
-
addHits
Actual results.
- Parameters:
builder
- function to build the hits value- Returns:
- Builder
-
setHits
Actual results.
- Parameters:
builder
- function to build the hits 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
-
getHits
Actual results.
- Returns:
- hits
-
build
builds OrderPagedSearchResponse with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderPagedSearchResponse>
- Returns:
- OrderPagedSearchResponse
-
buildUnchecked
builds OrderPagedSearchResponse without checking for non-null required values- Returns:
- OrderPagedSearchResponse
-
of
factory method for an instance of OrderPagedSearchResponseBuilder- Returns:
- builder
-
of
create builder for OrderPagedSearchResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-