Class AttributeChoiceValue
java.lang.Object
com.broadleafcommerce.catalog.domain.product.option.AttributeChoiceValue
- All Implemented Interfaces:
com.broadleafcommerce.translation.mapping.SubIdentifiable
,Serializable
,Comparable<AttributeChoiceValue>
public class AttributeChoiceValue
extends Object
implements Serializable, Comparable<AttributeChoiceValue>, com.broadleafcommerce.translation.mapping.SubIdentifiable
A single value with a display, order and label within a
AttributeChoice
- Author:
- Phillip Verheyden (phillipuniverse)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
int
Order by thedisplayOrder
and then the label with nulls lastboolean
How this value displays in the context of all other values within a singleAttributeChoice
getId()
getLabel()
What the customer sees for display.getValue()
The value stored as an item attribute or cart attribute based on what the user selects.int
hashCode()
void
setDisplayOrder
(Integer displayOrder) How this value displays in the context of all other values within a singleAttributeChoice
void
void
What the customer sees for display.void
The value stored as an item attribute or cart attribute based on what the user selects.toString()
-
Constructor Details
-
AttributeChoiceValue
-
AttributeChoiceValue
public AttributeChoiceValue()
-
-
Method Details
-
compareTo
Order by thedisplayOrder
and then the label with nulls last- Specified by:
compareTo
in interfaceComparable<AttributeChoiceValue>
-
getId
- Specified by:
getId
in interfacecom.broadleafcommerce.translation.mapping.SubIdentifiable
- See Also:
-
SubIdentifiable.getId()
-
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 fromvalue
which is what is added to the cart- Returns:
- the customer-facing display. If null, the
getValue()
should be used for display
-
getValue
The value stored as an item attribute or cart attribute based on what the user selects. This field is required, but can be different than the customer-facing display inlabel
- Returns:
- the value that should be stored as an item/cart attribute when the user selects this choice
-
getDisplayOrder
How this value displays in the context of all other values within a singleAttributeChoice
- Returns:
- the ordering of this value or {@link null} in which case this should be ordered at the end
-
setId
- Specified by:
setId
in interfacecom.broadleafcommerce.translation.mapping.SubIdentifiable
- See Also:
-
SubIdentifiable.getId()
-
setLabel
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 fromvalue
which is what is added to the cart- Parameters:
label
- customer-facing display of this value
-
setValue
The value stored as an item attribute or cart attribute based on what the user selects. This field is required, but can be different than the customer-facing display inlabel
- Parameters:
value
- what will be stored as an item/cart attribute
-
setDisplayOrder
How this value displays in the context of all other values within a singleAttributeChoice
- Parameters:
displayOrder
- ordering of this value in relation to other values in the sameAttributeChoice
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-