Class SearchQueryExpressionValueBuilder

java.lang.Object
com.commercetools.api.models.search.SearchQueryExpressionValueBuilder
All Implemented Interfaces:
Builder<SearchQueryExpressionValue>

public class SearchQueryExpressionValueBuilder extends Object implements Builder<SearchQueryExpressionValue>
SearchQueryExpressionValueBuilder
Example to create an instance using the builder pattern

     SearchQueryExpressionValue searchQueryExpressionValue = SearchQueryExpressionValue.builder()
             .field("{field}")
             .build()
 
  • Constructor Details

    • SearchQueryExpressionValueBuilder

      public SearchQueryExpressionValueBuilder()
  • Method Details

    • field

      set the value to the field
      Parameters:
      field - value to be set
      Returns:
      Builder
    • boost

      public SearchQueryExpressionValueBuilder boost(@Nullable Double boost)
      set the value to the boost
      Parameters:
      boost - value to be set
      Returns:
      Builder
    • fieldType

      public SearchQueryExpressionValueBuilder fieldType(@Nullable SearchFieldType fieldType)

      Possible values for the fieldType property on simple expressions indicating the data type of the field.

      Parameters:
      fieldType - value to be set
      Returns:
      Builder
    • getField

      public String getField()
      value of field}
      Returns:
      field
    • getBoost

      @Nullable public Double getBoost()
      value of boost}
      Returns:
      boost
    • getFieldType

      @Nullable public SearchFieldType getFieldType()

      Possible values for the fieldType property on simple expressions indicating the data type of the field.

      Returns:
      fieldType
    • build

      builds SearchQueryExpressionValue with checking for non-null required values
      Specified by:
      build in interface Builder<SearchQueryExpressionValue>
      Returns:
      SearchQueryExpressionValue
    • buildUnchecked

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

      factory method for an instance of SearchQueryExpressionValueBuilder
      Returns:
      builder
    • of

      create builder for SearchQueryExpressionValue instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder