Interface TermFacetResult
- All Superinterfaces:
FacetResult
Example to create an instance using the builder pattern
TermFacetResult termFacetResult = TermFacetResult.builder()
.dataType(TermFacetResultType.TEXT)
.missing(0.3)
.total(0.3)
.other(0.3)
.plusTerms(termsBuilder -> termsBuilder)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic TermFacetResultBuilder
builder()
builder factory method for TermFacetResultstatic TermFacetResultBuilder
builder
(TermFacetResult template) create builder for TermFacetResult instancecopyDeep()
static TermFacetResult
deepCopy
(TermFacetResult template) factory method to create a deep copy of TermFacetResult@NotNull TermFacetResultType
Data type to which the facet is applied.@NotNull Long
Number of ProductVariants that have no value for the specified term facet expression.@NotNull Long
getOther()
Number of terms not represented in this object (such as the number of terms beyond the limit).getTerms()
Values for the field specified in term facet expression for which at least one ProductVariant could be found.@NotNull Long
getTotal()
Number of terms matching the term facet expression.static TermFacetResult
of()
factory methodstatic TermFacetResult
of
(TermFacetResult template) factory method to create a shallow copy TermFacetResultvoid
setDataType
(TermFacetResultType dataType) Data type to which the facet is applied.void
setMissing
(Long missing) Number of ProductVariants that have no value for the specified term facet expression.void
Number of terms not represented in this object (such as the number of terms beyond the limit).void
Values for the field specified in term facet expression for which at least one ProductVariant could be found.void
Values for the field specified in term facet expression for which at least one ProductVariant could be found.void
Number of terms matching the term facet expression.static com.fasterxml.jackson.core.type.TypeReference<TermFacetResult>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withTermFacetResult
(Function<TermFacetResult, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.product.FacetResult
getType, withFacetResult
-
Field Details
-
TERMS
discriminator value for TermFacetResult- See Also:
-
-
Method Details
-
getDataType
Data type to which the facet is applied.
- Returns:
- dataType
-
getMissing
Number of ProductVariants that have no value for the specified term facet expression.
- Returns:
- missing
-
getTotal
Number of terms matching the term facet expression.
- If the expression refers to Product fields like
categories.id
andreviewRatingStatistics.count
, the value represents the number of Products. - If the expression is defined for fields specific to Product Variants, for example,
variants.attributes.{name}
, the value represents the number of Product Variants matching the expression.
- Returns:
- total
- If the expression refers to Product fields like
-
getOther
Number of terms not represented in this object (such as the number of terms beyond the limit).
- Returns:
- other
-
getTerms
Values for the field specified in term facet expression for which at least one ProductVariant could be found.
By default, facet terms are returned in a descending order of their
count
.If the term facet expression specifies to count Products through the
counting products
extension, then facet terms are returned in a descending order of theirproductCount
.- Returns:
- terms
-
setDataType
Data type to which the facet is applied.
- Parameters:
dataType
- value to be set
-
setMissing
Number of ProductVariants that have no value for the specified term facet expression.
- Parameters:
missing
- value to be set
-
setTotal
Number of terms matching the term facet expression.
- If the expression refers to Product fields like
categories.id
andreviewRatingStatistics.count
, the value represents the number of Products. - If the expression is defined for fields specific to Product Variants, for example,
variants.attributes.{name}
, the value represents the number of Product Variants matching the expression.
- Parameters:
total
- value to be set
- If the expression refers to Product fields like
-
setOther
Number of terms not represented in this object (such as the number of terms beyond the limit).
- Parameters:
other
- value to be set
-
setTerms
Values for the field specified in term facet expression for which at least one ProductVariant could be found.
By default, facet terms are returned in a descending order of their
count
.If the term facet expression specifies to count Products through the
counting products
extension, then facet terms are returned in a descending order of theirproductCount
.- Parameters:
terms
- values to be set
-
setTerms
Values for the field specified in term facet expression for which at least one ProductVariant could be found.
By default, facet terms are returned in a descending order of their
count
.If the term facet expression specifies to count Products through the
counting products
extension, then facet terms are returned in a descending order of theirproductCount
.- Parameters:
terms
- values to be set
-
of
factory method- Returns:
- instance of TermFacetResult
-
of
factory method to create a shallow copy TermFacetResult- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
TermFacetResult copyDeep()- Specified by:
copyDeep
in interfaceFacetResult
-
deepCopy
factory method to create a deep copy of TermFacetResult- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for TermFacetResult- Returns:
- builder
-
builder
create builder for TermFacetResult instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withTermFacetResult
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-