org.broadleafcommerce.core.catalog.domain
Class ProductOptionImpl

java.lang.Object
  extended by org.broadleafcommerce.core.catalog.domain.ProductOptionImpl
All Implemented Interfaces:
Serializable, ProductOption

@Entity
public class ProductOptionImpl
extends Object
implements ProductOption

See Also:
Serialized Form

Field Summary
protected  List<ProductOptionValue> allowedValues
           
protected  String attributeName
           
protected  Integer displayOrder
           
protected  Long id
           
protected  String label
           
protected  List<Product> products
           
protected  Boolean required
           
protected  String type
           
 
Constructor Summary
ProductOptionImpl()
           
 
Method Summary
 List<ProductOptionValue> getAllowedValues()
          Gets the available values that a user can select for this ProductOption.
 String getAttributeName()
          Gets the attribute name for where the ProductOptionValue selected for this ProductOption is stored in the OrderItemAttributes for the OrderItem
 Integer getDisplayOrder()
          Gets the display order of this option in relation to the other ProductOptions
 Long getId()
          Returns unique identifier of the product option.
 String getLabel()
          The label to show to the user when selecting from the available ProductOptionValues.
 List<Product> getProducts()
          Gets all the Products associated with this ProductOption
 Boolean getRequired()
           
 ProductOptionType getType()
          Returns the option type.
 void setAllowedValues(List<ProductOptionValue> allowedValues)
          Set the allowed values for this ProductOption
 void setAttributeName(String attributeName)
          Sets the attribute name that will be used in storing the selected ProductOptionValue for this ProductOption
 void setDisplayOrder(Integer displayOrder)
          Gets the display order of this option in relation to the other ProductOptions
 void setId(Long id)
          Sets the unique identifier of the product option.
 void setLabel(String label)
          Sets the label to show the user when selecting from the available ProductOptionValues
 void setProducts(List<Product> products)
          Set the Products to associate with this ProductOption
 void setRequired(Boolean required)
          Sets whether or not
 void setType(ProductOptionType type)
          Sets the option type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected Long id

type

protected String type

attributeName

protected String attributeName

label

protected String label

required

protected Boolean required

displayOrder

protected Integer displayOrder

allowedValues

protected List<ProductOptionValue> allowedValues

products

protected List<Product> products
Constructor Detail

ProductOptionImpl

public ProductOptionImpl()
Method Detail

getId

public Long getId()
Description copied from interface: ProductOption
Returns unique identifier of the product option.

Specified by:
getId in interface ProductOption
Returns:

setId

public void setId(Long id)
Description copied from interface: ProductOption
Sets the unique identifier of the product option.

Specified by:
setId in interface ProductOption

getType

public ProductOptionType getType()
Description copied from interface: ProductOption
Returns the option type. For example, "color", "size", etc. These are used primarily to determine how the UI should prompt for and validate the product option.

Specified by:
getType in interface ProductOption
Returns:

setType

public void setType(ProductOptionType type)
Description copied from interface: ProductOption
Sets the option type. This is primarily used for display to render the option selection.

Specified by:
setType in interface ProductOption

getAttributeName

public String getAttributeName()
Description copied from interface: ProductOption
Gets the attribute name for where the ProductOptionValue selected for this ProductOption is stored in the OrderItemAttributes for the OrderItem

Specified by:
getAttributeName in interface ProductOption
Returns:
the name of the OrderItemAttribute to store the selected ProductOptionValue in the Order domain
See Also:
OrderItemAttribute}, {@link OrderItem}

setAttributeName

public void setAttributeName(String attributeName)
Description copied from interface: ProductOption
Sets the attribute name that will be used in storing the selected ProductOptionValue for this ProductOption

Specified by:
setAttributeName in interface ProductOption
Parameters:
attributeName - - the name of the OrderItemAttribute to store the selected ProductOptionValue in the Order domain

getLabel

public String getLabel()
Description copied from interface: ProductOption
The label to show to the user when selecting from the available ProductOptionValues. This might be "Color" or "Size"

Specified by:
getLabel in interface ProductOption
Returns:

setLabel

public void setLabel(String label)
Description copied from interface: ProductOption
Sets the label to show the user when selecting from the available ProductOptionValues

Specified by:
setLabel in interface ProductOption

getRequired

public Boolean getRequired()
Specified by:
getRequired in interface ProductOption
Returns:
whether or not this ProductOption is required

setRequired

public void setRequired(Boolean required)
Description copied from interface: ProductOption
Sets whether or not

Specified by:
setRequired in interface ProductOption

getDisplayOrder

public Integer getDisplayOrder()
Description copied from interface: ProductOption
Gets the display order of this option in relation to the other ProductOptions

Specified by:
getDisplayOrder in interface ProductOption
Returns:

setDisplayOrder

public void setDisplayOrder(Integer displayOrder)
Description copied from interface: ProductOption
Gets the display order of this option in relation to the other ProductOptions

Specified by:
setDisplayOrder in interface ProductOption

getProducts

public List<Product> getProducts()
Description copied from interface: ProductOption
Gets all the Products associated with this ProductOption

Specified by:
getProducts in interface ProductOption
Returns:
the Products associated with this ProductOption

setProducts

public void setProducts(List<Product> products)
Description copied from interface: ProductOption
Set the Products to associate with this ProductOption

Specified by:
setProducts in interface ProductOption

getAllowedValues

public List<ProductOptionValue> getAllowedValues()
Description copied from interface: ProductOption
Gets the available values that a user can select for this ProductOption. This value will be stored in OrderItemAttributes at the OrderItem level. The OrderItemAttribute name will be whatever was returned from ProductOption.getAttributeName()

Specified by:
getAllowedValues in interface ProductOption
Returns:
the allowed values for this ProductOption

setAllowedValues

public void setAllowedValues(List<ProductOptionValue> allowedValues)
Description copied from interface: ProductOption
Set the allowed values for this ProductOption

Specified by:
setAllowedValues in interface ProductOption


Copyright © 2013. All Rights Reserved.