org.broadleafcommerce.core.catalog.domain
Class ProductOptionImpl

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

@Entity
public class ProductOptionImpl
extends Object
implements ProductOption, AdminMainEntity

See Also:
Serialized Form

Field Summary
protected  List<ProductOptionValue> allowedValues
           
protected  String attributeName
           
protected  Integer displayOrder
           
protected  String errorCode
           
protected  String errorMessage
           
protected  Long id
           
protected  String label
           
protected  List<Product> products
           
protected  Boolean required
           
protected  String type
           
protected  String validationString
           
 
Fields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY
 
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
 String getErrorCode()
           
 String getErrorMessage()
           
 Long getId()
          Returns unique identifier of the product option.
 String getLabel()
          The label to show to the user when selecting from the available ProductOptionValues.
 String getMainEntityName()
           
 ProductOptionValidationType getProductOptionValidationType()
           
 List<Product> getProducts()
          Gets all the Products associated with this ProductOption
 Boolean getRequired()
           
 ProductOptionType getType()
          Returns the option type.
 Boolean getUseInSkuGeneration()
           
 String getValidationString()
           
 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 setErrorCode(String errorCode)
           
 void setErrorMessage(String errorMessage)
           
 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 setProductOptionValidationType(ProductOptionValidationType productOptionValidationType)
           
 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.
 void setUseInSkuGeneration(Boolean useInSkuGeneration)
           
 void setValidationString(String validationString)
           
 
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

validationString

protected String validationString

errorCode

protected String errorCode

errorMessage

protected String errorMessage

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

getUseInSkuGeneration

public Boolean getUseInSkuGeneration()
Specified by:
getUseInSkuGeneration in interface ProductOption

setUseInSkuGeneration

public void setUseInSkuGeneration(Boolean useInSkuGeneration)
Specified by:
setUseInSkuGeneration in interface ProductOption

getProductOptionValidationType

public ProductOptionValidationType getProductOptionValidationType()
Specified by:
getProductOptionValidationType in interface ProductOption

setProductOptionValidationType

public void setProductOptionValidationType(ProductOptionValidationType productOptionValidationType)
Specified by:
setProductOptionValidationType in interface ProductOption

getValidationString

public String getValidationString()
Specified by:
getValidationString in interface ProductOption

setValidationString

public void setValidationString(String validationString)
Specified by:
setValidationString in interface ProductOption

getErrorCode

public String getErrorCode()
Specified by:
getErrorCode in interface ProductOption

setErrorCode

public void setErrorCode(String errorCode)
Specified by:
setErrorCode in interface ProductOption

getErrorMessage

public String getErrorMessage()
Specified by:
getErrorMessage in interface ProductOption

setErrorMessage

public void setErrorMessage(String errorMessage)
Specified by:
setErrorMessage in interface ProductOption

getMainEntityName

public String getMainEntityName()
Specified by:
getMainEntityName in interface AdminMainEntity


Copyright © 2013. All Rights Reserved.