Class TermFacetResultBuilder

java.lang.Object
com.commercetools.api.models.product.TermFacetResultBuilder
All Implemented Interfaces:
Builder<TermFacetResult>

@Deprecated public class TermFacetResultBuilder extends Object implements Builder<TermFacetResult>
Deprecated.
TermFacetResultBuilder
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()
 
  • Constructor Details

    • TermFacetResultBuilder

      public TermFacetResultBuilder()
      Deprecated.
  • Method Details

    • dataType

      Deprecated.

      Data type to which the facet is applied.

      Parameters:
      dataType - value to be set
      Returns:
      Builder
    • missing

      public TermFacetResultBuilder missing(Long missing)
      Deprecated.

      Number of ProductVariants that have no value for the specified term facet expression.

      Parameters:
      missing - value to be set
      Returns:
      Builder
    • total

      public TermFacetResultBuilder total(Long total)
      Deprecated.

      Number of terms matching the term facet expression.

      • If the expression refers to Product fields like categories.id and reviewRatingStatistics.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
      Returns:
      Builder
    • other

      public TermFacetResultBuilder other(Long other)
      Deprecated.

      Number of terms not represented in this object (such as the number of terms beyond the limit).

      Parameters:
      other - value to be set
      Returns:
      Builder
    • terms

      public TermFacetResultBuilder terms(FacetTerm... terms)
      Deprecated.

      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 their productCount.

      Parameters:
      terms - value to be set
      Returns:
      Builder
    • terms

      public TermFacetResultBuilder terms(List<FacetTerm> terms)
      Deprecated.

      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 their productCount.

      Parameters:
      terms - value to be set
      Returns:
      Builder
    • plusTerms

      public TermFacetResultBuilder plusTerms(FacetTerm... terms)
      Deprecated.

      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 their productCount.

      Parameters:
      terms - value to be set
      Returns:
      Builder
    • plusTerms

      Deprecated.

      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 their productCount.

      Parameters:
      builder - function to build the terms value
      Returns:
      Builder
    • withTerms

      Deprecated.

      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 their productCount.

      Parameters:
      builder - function to build the terms value
      Returns:
      Builder
    • addTerms

      Deprecated.

      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 their productCount.

      Parameters:
      builder - function to build the terms value
      Returns:
      Builder
    • setTerms

      Deprecated.

      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 their productCount.

      Parameters:
      builder - function to build the terms value
      Returns:
      Builder
    • getDataType

      @Deprecated public TermFacetResultType getDataType()
      Deprecated.

      Data type to which the facet is applied.

      Returns:
      dataType
    • getMissing

      public Long getMissing()
      Deprecated.

      Number of ProductVariants that have no value for the specified term facet expression.

      Returns:
      missing
    • getTotal

      public Long getTotal()
      Deprecated.

      Number of terms matching the term facet expression.

      • If the expression refers to Product fields like categories.id and reviewRatingStatistics.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
    • getOther

      public Long getOther()
      Deprecated.

      Number of terms not represented in this object (such as the number of terms beyond the limit).

      Returns:
      other
    • getTerms

      public List<FacetTerm> getTerms()
      Deprecated.

      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 their productCount.

      Returns:
      terms
    • build

      public TermFacetResult build()
      Deprecated.
      builds TermFacetResult with checking for non-null required values
      Specified by:
      build in interface Builder<TermFacetResult>
      Returns:
      TermFacetResult
    • buildUnchecked

      public TermFacetResult buildUnchecked()
      Deprecated.
      builds TermFacetResult without checking for non-null required values
      Returns:
      TermFacetResult
    • of

      public static TermFacetResultBuilder of()
      Deprecated.
      factory method for an instance of TermFacetResultBuilder
      Returns:
      builder
    • of

      public static TermFacetResultBuilder of(TermFacetResult template)
      Deprecated.
      create builder for TermFacetResult instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder