Class ProductOptionImpl
java.lang.Object
org.broadleafcommerce.core.catalog.domain.ProductOptionImpl
- All Implemented Interfaces:
Serializable,AdminMainEntity,MultiTenantCloneable<ProductOption>,ProductOption,ProductOptionAdminPresentation
@Entity
public class ProductOptionImpl
extends Object
implements ProductOption, AdminMainEntity, ProductOptionAdminPresentation
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.broadleafcommerce.core.catalog.domain.ProductOptionAdminPresentation
ProductOptionAdminPresentation.FieldOrder, ProductOptionAdminPresentation.GroupName, ProductOptionAdminPresentation.GroupOrder, ProductOptionAdminPresentation.TabName, ProductOptionAdminPresentation.TabOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<ProductOptionValue>protected Stringprotected Integerprotected Stringprotected Stringprotected Longprotected Stringprotected Stringprotected Stringprotected List<ProductOptionXref>protected Booleanprotected Stringprotected StringFields inherited from interface org.broadleafcommerce.common.admin.domain.AdminMainEntity
MAIN_ENTITY_NAME_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends ProductOption>
CreateResponse<G>booleanGets the available values that a user can select for this ProductOption.Gets the attribute name for where the ProductOptionValue selected for this ProductOption is stored in the OrderItemAttributes for the OrderItemGets the display order of this option in relation to the otherProductOptionsgetId()Returns unique identifier of the product option.getLabel()The label to show to the user when selecting from the availableProductOptionValues.getName()Returns name of the product option.Gets all the Products associated with this ProductOptiongetType()Returns the option type.inthashCode()voidsetAllowedValues(List<ProductOptionValue> allowedValues) Set the allowed values for this ProductOptionvoidsetAttributeName(String attributeName) Sets the attribute name that will be used in storing the selected ProductOptionValue for this ProductOptionvoidsetDisplayOrder(Integer displayOrder) Gets the display order of this option in relation to the otherProductOptionsvoidsetErrorCode(String errorCode) voidsetErrorMessage(String errorMessage) voidSets the unique identifier of the product option.voidSets the label to show the user when selecting from the availableProductOptionValuesvoidsetLongDescription(String longDescription) voidSets the name of the product option.voidsetProductOptionValidationStrategyType(ProductOptionValidationStrategyType productOptionValidationStrategyType) voidsetProductOptionValidationType(ProductOptionValidationType productOptionValidationType) voidsetProducts(List<Product> products) Set the Products to associate with this ProductOptionvoidsetProductXrefs(List<ProductOptionXref> xrefs) voidsetRequired(Boolean required) Sets whether or notvoidsetType(ProductOptionType type) Sets the option type.voidsetUseInSkuGeneration(Boolean useInSkuGeneration) voidsetValidationString(String validationString)
-
Field Details
-
id
-
name
-
type
-
attributeName
-
label
-
required
-
displayOrder
-
validationString
-
errorCode
-
errorMessage
-
allowedValues
-
longDescription
-
products
-
-
Constructor Details
-
ProductOptionImpl
public ProductOptionImpl()
-
-
Method Details
-
getId
Description copied from interface:ProductOptionReturns unique identifier of the product option.- Specified by:
getIdin interfaceProductOption- Returns:
-
setId
Description copied from interface:ProductOptionSets the unique identifier of the product option.- Specified by:
setIdin interfaceProductOption
-
getName
Description copied from interface:ProductOptionReturns name of the product option.- Specified by:
getNamein interfaceProductOption- Returns:
-
setName
Description copied from interface:ProductOptionSets the name of the product option.- Specified by:
setNamein interfaceProductOption
-
getType
Description copied from interface:ProductOptionReturns 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:
getTypein interfaceProductOption- Returns:
-
setType
Description copied from interface:ProductOptionSets the option type. This is primarily used for display to render the option selection.- Specified by:
setTypein interfaceProductOption
-
getAttributeName
Description copied from interface:ProductOptionGets the attribute name for where the ProductOptionValue selected for this ProductOption is stored in the OrderItemAttributes for the OrderItem- Specified by:
getAttributeNamein interfaceProductOption- Returns:
- the name of the OrderItemAttribute to store the selected ProductOptionValue in the Order domain
-
setAttributeName
Description copied from interface:ProductOptionSets the attribute name that will be used in storing the selected ProductOptionValue for this ProductOption- Specified by:
setAttributeNamein interfaceProductOption- Parameters:
attributeName- - the name of the OrderItemAttribute to store the selected ProductOptionValue in the Order domain
-
getLabel
Description copied from interface:ProductOptionThe label to show to the user when selecting from the availableProductOptionValues. This might be "Color" or "Size"- Specified by:
getLabelin interfaceProductOption- Returns:
-
setLabel
Description copied from interface:ProductOptionSets the label to show the user when selecting from the availableProductOptionValues- Specified by:
setLabelin interfaceProductOption
-
getRequired
- Specified by:
getRequiredin interfaceProductOption- Returns:
- whether or not this ProductOption is required
-
setRequired
Description copied from interface:ProductOptionSets whether or not- Specified by:
setRequiredin interfaceProductOption
-
getDisplayOrder
Description copied from interface:ProductOptionGets the display order of this option in relation to the otherProductOptions- Specified by:
getDisplayOrderin interfaceProductOption- Returns:
-
setDisplayOrder
Description copied from interface:ProductOptionGets the display order of this option in relation to the otherProductOptions- Specified by:
setDisplayOrderin interfaceProductOption
-
getProductXrefs
- Specified by:
getProductXrefsin interfaceProductOption
-
setProductXrefs
- Specified by:
setProductXrefsin interfaceProductOption
-
getProducts
Description copied from interface:ProductOptionGets all the Products associated with this ProductOption- Specified by:
getProductsin interfaceProductOption- Returns:
- the Products associated with this ProductOption
-
setProducts
Description copied from interface:ProductOptionSet the Products to associate with this ProductOption- Specified by:
setProductsin interfaceProductOption
-
getAllowedValues
Description copied from interface:ProductOptionGets 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 fromProductOption.getAttributeName()- Specified by:
getAllowedValuesin interfaceProductOption- Returns:
- the allowed values for this ProductOption
-
setAllowedValues
Description copied from interface:ProductOptionSet the allowed values for this ProductOption- Specified by:
setAllowedValuesin interfaceProductOption
-
getUseInSkuGeneration
- Specified by:
getUseInSkuGenerationin interfaceProductOption
-
setUseInSkuGeneration
- Specified by:
setUseInSkuGenerationin interfaceProductOption
-
getProductOptionValidationStrategyType
- Specified by:
getProductOptionValidationStrategyTypein interfaceProductOption
-
setProductOptionValidationStrategyType
public void setProductOptionValidationStrategyType(ProductOptionValidationStrategyType productOptionValidationStrategyType) - Specified by:
setProductOptionValidationStrategyTypein interfaceProductOption
-
getProductOptionValidationType
- Specified by:
getProductOptionValidationTypein interfaceProductOption
-
setProductOptionValidationType
- Specified by:
setProductOptionValidationTypein interfaceProductOption
-
getValidationString
- Specified by:
getValidationStringin interfaceProductOption
-
setValidationString
- Specified by:
setValidationStringin interfaceProductOption
-
getErrorCode
- Specified by:
getErrorCodein interfaceProductOption
-
setErrorCode
- Specified by:
setErrorCodein interfaceProductOption
-
getErrorMessage
- Specified by:
getErrorMessagein interfaceProductOption
-
setErrorMessage
- Specified by:
setErrorMessagein interfaceProductOption
-
getMainEntityName
- Specified by:
getMainEntityNamein interfaceAdminMainEntity
-
getLongDescription
- Specified by:
getLongDescriptionin interfaceProductOption
-
setLongDescription
- Specified by:
setLongDescriptionin interfaceProductOption
-
createOrRetrieveCopyInstance
public <G extends ProductOption> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceMultiTenantCloneable<ProductOption>- Throws:
CloneNotSupportedException
-
equals
-
hashCode
public int hashCode()
-