Class AttributeChoiceValue

java.lang.Object
com.broadleafcommerce.order.common.domain.AttributeChoiceValue
All Implemented Interfaces:
Serializable

public class AttributeChoiceValue extends Object implements Serializable
A selected option attribute choice value for a product option to be stored in a cart, cart item, order, or order item's attribute choices.
See Also:
  • Constructor Details

    • AttributeChoiceValue

      public AttributeChoiceValue()
    • AttributeChoiceValue

      public AttributeChoiceValue(String optionLabel, String label, String value)
  • Method Details

    • getOptionLabel

      public String getOptionLabel()
      The label shown to customers for the option.
      Returns:
      the display shown to customer for the option
    • getLabel

      public String getLabel()
      What the customer sees for display. For example, text in the case of sizes or a hex value in the case of colors. Can diverge from value which is what was added to the cart
      Returns:
      the customer-facing display. If null, the getValue() should be used for display
    • getValue

      public String getValue()
      The value based on what the user selected.
      Returns:
      the value the user selected
    • setOptionLabel

      public void setOptionLabel(String optionLabel)
      The label shown to customers for the option.
      Parameters:
      optionLabel - the display shown to customers for the option
    • setLabel

      public void setLabel(String label)
      What the customer sees for display. For example, text in the case of sizes or a hex value in the case of colors. Can diverge from value which is what was added to the cart
      Parameters:
      label - customer-facing display of this value
    • setValue

      public void setValue(String value)
      The value based on what the user selected.
      Parameters:
      value - the value the user selected
    • 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