Class FacetTermBuilder
java.lang.Object
com.commercetools.api.models.product.FacetTermBuilder
- Direct Known Subclasses:
FacetResultTermBuilder
FacetTermBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
FacetTerm facetTerm = FacetTerm.builder()
.count(0.3)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds FacetTerm with checking for non-null required valuesbuilds FacetTerm without checking for non-null required valuesNumber of ProductVariants for which thetermapplies.getCount()Number of ProductVariants for which thetermapplies.Number of Products for which thetermapplies.getTerm()Value for the field specified in the term facet expression for which at least one ProductVariant could be found.static FacetTermBuilderof()factory method for an instance of FacetTermBuilderstatic FacetTermBuildercreate builder for FacetTerm instanceproductCount(Long productCount) Number of Products for which thetermapplies.Value for the field specified in the term facet expression for which at least one ProductVariant could be found.
-
Constructor Details
-
FacetTermBuilder
public FacetTermBuilder()
-
-
Method Details
-
term
Value for the field specified in the term facet expression for which at least one ProductVariant could be found.
- Parameters:
term- value to be set- Returns:
- Builder
-
count
Number of ProductVariants for which the
termapplies.- Parameters:
count- value to be set- Returns:
- Builder
-
productCount
Number of Products for which the
termapplies. Only available if thecounting productsextension is enabled.- Parameters:
productCount- value to be set- Returns:
- Builder
-
getTerm
Value for the field specified in the term facet expression for which at least one ProductVariant could be found.
- Returns:
- term
-
getCount
Number of ProductVariants for which the
termapplies.- Returns:
- count
-
getProductCount
Number of Products for which the
termapplies. Only available if thecounting productsextension is enabled.- Returns:
- productCount
-
build
builds FacetTerm with checking for non-null required values -
buildUnchecked
builds FacetTerm without checking for non-null required values- Returns:
- FacetTerm
-
of
factory method for an instance of FacetTermBuilder- Returns:
- builder
-
of
create builder for FacetTerm instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-