Class ProductSearchMatchingVariantsBuilder
- All Implemented Interfaces:
Builder<ProductSearchMatchingVariants>
Example to create an instance using the builder pattern
ProductSearchMatchingVariants productSearchMatchingVariants = ProductSearchMatchingVariants.builder()
.allMatched(true)
.plusMatchedVariants(matchedVariantsBuilder -> matchedVariantsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddMatchedVariants
(Function<ProductSearchMatchingVariantEntryBuilder, ProductSearchMatchingVariantEntry> builder) The variants matching the search criteria or empty if all matched.allMatched
(Boolean allMatched) Whether the search criteria definitely matches all Variants of the returned Product, like for Product-level fields.build()
builds ProductSearchMatchingVariants with checking for non-null required valuesbuilds ProductSearchMatchingVariants without checking for non-null required valuesWhether the search criteria definitely matches all Variants of the returned Product, like for Product-level fields.The variants matching the search criteria or empty if all matched.matchedVariants
(ProductSearchMatchingVariantEntry... matchedVariants) The variants matching the search criteria or empty if all matched.matchedVariants
(List<ProductSearchMatchingVariantEntry> matchedVariants) The variants matching the search criteria or empty if all matched.of()
factory method for an instance of ProductSearchMatchingVariantsBuilderof
(ProductSearchMatchingVariants template) create builder for ProductSearchMatchingVariants instanceplusMatchedVariants
(ProductSearchMatchingVariantEntry... matchedVariants) The variants matching the search criteria or empty if all matched.plusMatchedVariants
(Function<ProductSearchMatchingVariantEntryBuilder, ProductSearchMatchingVariantEntryBuilder> builder) The variants matching the search criteria or empty if all matched.setMatchedVariants
(Function<ProductSearchMatchingVariantEntryBuilder, ProductSearchMatchingVariantEntry> builder) The variants matching the search criteria or empty if all matched.withMatchedVariants
(Function<ProductSearchMatchingVariantEntryBuilder, ProductSearchMatchingVariantEntryBuilder> builder) The variants matching the search criteria or empty if all matched.
-
Constructor Details
-
ProductSearchMatchingVariantsBuilder
public ProductSearchMatchingVariantsBuilder()
-
-
Method Details
-
allMatched
Whether the search criteria definitely matches all Variants of the returned Product, like for Product-level fields. Is always
false
for search expressions on Variant-level fields.- Parameters:
allMatched
- value to be set- Returns:
- Builder
-
matchedVariants
public ProductSearchMatchingVariantsBuilder matchedVariants(ProductSearchMatchingVariantEntry... matchedVariants) The variants matching the search criteria or empty if all matched.
- Parameters:
matchedVariants
- value to be set- Returns:
- Builder
-
matchedVariants
public ProductSearchMatchingVariantsBuilder matchedVariants(List<ProductSearchMatchingVariantEntry> matchedVariants) The variants matching the search criteria or empty if all matched.
- Parameters:
matchedVariants
- value to be set- Returns:
- Builder
-
plusMatchedVariants
public ProductSearchMatchingVariantsBuilder plusMatchedVariants(ProductSearchMatchingVariantEntry... matchedVariants) The variants matching the search criteria or empty if all matched.
- Parameters:
matchedVariants
- value to be set- Returns:
- Builder
-
plusMatchedVariants
public ProductSearchMatchingVariantsBuilder plusMatchedVariants(Function<ProductSearchMatchingVariantEntryBuilder, ProductSearchMatchingVariantEntryBuilder> builder) The variants matching the search criteria or empty if all matched.
- Parameters:
builder
- function to build the matchedVariants value- Returns:
- Builder
-
withMatchedVariants
public ProductSearchMatchingVariantsBuilder withMatchedVariants(Function<ProductSearchMatchingVariantEntryBuilder, ProductSearchMatchingVariantEntryBuilder> builder) The variants matching the search criteria or empty if all matched.
- Parameters:
builder
- function to build the matchedVariants value- Returns:
- Builder
-
addMatchedVariants
public ProductSearchMatchingVariantsBuilder addMatchedVariants(Function<ProductSearchMatchingVariantEntryBuilder, ProductSearchMatchingVariantEntry> builder) The variants matching the search criteria or empty if all matched.
- Parameters:
builder
- function to build the matchedVariants value- Returns:
- Builder
-
setMatchedVariants
public ProductSearchMatchingVariantsBuilder setMatchedVariants(Function<ProductSearchMatchingVariantEntryBuilder, ProductSearchMatchingVariantEntry> builder) The variants matching the search criteria or empty if all matched.
- Parameters:
builder
- function to build the matchedVariants value- Returns:
- Builder
-
getAllMatched
Whether the search criteria definitely matches all Variants of the returned Product, like for Product-level fields. Is always
false
for search expressions on Variant-level fields.- Returns:
- allMatched
-
getMatchedVariants
The variants matching the search criteria or empty if all matched.
- Returns:
- matchedVariants
-
build
builds ProductSearchMatchingVariants with checking for non-null required values- Specified by:
build
in interfaceBuilder<ProductSearchMatchingVariants>
- Returns:
- ProductSearchMatchingVariants
-
buildUnchecked
builds ProductSearchMatchingVariants without checking for non-null required values- Returns:
- ProductSearchMatchingVariants
-
of
factory method for an instance of ProductSearchMatchingVariantsBuilder- Returns:
- builder
-
of
create builder for ProductSearchMatchingVariants instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-