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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanintOrder by thedisplayOrderand then the label with nulls lastbooleanHow this value displays in the context of all other values within a singleAttributeChoicegetId()getLabel()What the customer sees for display.getValue()The value stored as an item attribute or cart attribute based on what the user selects.inthashCode()voidsetDisplayOrder(Integer displayOrder) How this value displays in the context of all other values within a singleAttributeChoicevoidvoidWhat the customer sees for display.voidThe value stored as an item attribute or cart attribute based on what the user selects.toString()
- 
Constructor Details- 
AttributeChoiceValue
- 
AttributeChoiceValuepublic AttributeChoiceValue()
 
- 
- 
Method Details- 
compareToOrder by thedisplayOrderand then the label with nulls last- Specified by:
- compareToin interface- Comparable<AttributeChoiceValue>
 
- 
getId- Specified by:
- getIdin interface- com.broadleafcommerce.translation.mapping.SubIdentifiable
- See Also:
- 
- SubIdentifiable.getId()
 
 
- 
getLabelWhat the customer sees for display. For example, text in the case of sizes or a hex value in the case of colors. Can diverge fromvaluewhich is what is added to the cart- Returns:
- the customer-facing display. If null, the getValue()should be used for display
 
- 
getValueThe 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
 
- 
getDisplayOrderHow 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:
- setIdin interface- com.broadleafcommerce.translation.mapping.SubIdentifiable
- See Also:
- 
- SubIdentifiable.getId()
 
 
- 
setLabelWhat the customer sees for display. For example, text in the case of sizes or a hex value in the case of colors. Can diverge fromvaluewhich is what is added to the cart- Parameters:
- label- customer-facing display of this value
 
- 
setValueThe 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
 
- 
setDisplayOrderHow 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 same- AttributeChoice
 
- 
equals
- 
canEqual
- 
hashCodepublic int hashCode()
- 
toString
 
-