Class SuggestionField

java.lang.Object
com.broadleafcommerce.search.api.domain.SuggestionField

public class SuggestionField extends Object
Signifies a field to be used in a suggestion.
  • Constructor Details

    • SuggestionField

      public SuggestionField()
  • Method Details

    • getFieldVariant

      public FieldVariant getFieldVariant()
      Retrieves the FieldVariant to be used for this suggestion field.
      Returns:
      variant to be used for this suggestion field.
    • getFieldDefinition

      public FieldDefinition getFieldDefinition()
      The field definition to provide suggestions for. The most common scenario would be a product's name.
      Returns:
      field definition to provide suggestions for
    • getVariantType

      public String getVariantType()
      The variant type to use when building suggestions. If this is an autocomplete field, this should be a searchable field, tokenized in such a way that it returns useful autocomplete results.
      Returns:
      variant type to use when building suggestions
    • setFieldDefinition

      public void setFieldDefinition(FieldDefinition fieldDefinition)
      The field definition to provide suggestions for. The most common scenario would be a product's name.
      Parameters:
      fieldDefinition - field definition to provide suggestions for
    • setVariantType

      public void setVariantType(String variantType)
      The variant type to use when building suggestions. If this is an autocomplete field, this should be a searchable field, tokenized in such a way that it returns useful autocomplete results.
      Parameters:
      variantType - variant type to use when building suggestions
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object