Class SuggestionField


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

      • SuggestionField

        public SuggestionField()
    • Method Detail

      • 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
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object