Class ProductOptionValueImpl
java.lang.Object
org.broadleafcommerce.core.catalog.domain.ProductOptionValueImpl
- All Implemented Interfaces:
Serializable,org.broadleafcommerce.common.copy.MultiTenantCloneable<ProductOptionValue>,ProductOptionValue,ProductOptionValueAdminPresentation
@Entity
public class ProductOptionValueImpl
extends Object
implements ProductOptionValue, ProductOptionValueAdminPresentation
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.broadleafcommerce.core.catalog.domain.ProductOptionValueAdminPresentation
ProductOptionValueAdminPresentation.FieldOrder, ProductOptionValueAdminPresentation.GroupName, ProductOptionValueAdminPresentation.GroupOrder, ProductOptionValueAdminPresentation.TabName, ProductOptionValueAdminPresentation.TabOrder -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Longprotected Longprotected BigDecimalprotected ProductOption -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends ProductOptionValue>
org.broadleafcommerce.common.copy.CreateResponse<G>createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) booleanGets the option value.Returns the order that the option value should be displayed in.getId()Returns unique identifier of the product option value.org.broadleafcommerce.common.money.MoneyGets the price adjustment associated with this value.org.broadleafcommerce.common.money.MoneyRetrieve the Product Option's price adjustment without dynamic pricing applied.Returns the associated ProductOptionGets the option value.inthashCode()voidsetAttributeValue(String attributeValue) Sets the option value.voidsetDisplayOrder(Long displayOrder) Sets the display order.voidSets the unique identifier of the product option value.voidsetPriceAdjustment(org.broadleafcommerce.common.money.Money priceAdjustment) Gets the price adjustment associated with this value.voidsetProductOption(ProductOption productOption) Sets the associated product option.
-
Field Details
-
id
-
attributeValue
-
displayOrder
-
priceAdjustment
-
productOption
-
-
Constructor Details
-
ProductOptionValueImpl
public ProductOptionValueImpl()
-
-
Method Details
-
getId
Description copied from interface:ProductOptionValueReturns unique identifier of the product option value.- Specified by:
getIdin interfaceProductOptionValue- Returns:
-
setId
Description copied from interface:ProductOptionValueSets the unique identifier of the product option value.- Specified by:
setIdin interfaceProductOptionValue
-
getAttributeValue
Description copied from interface:ProductOptionValueGets the option value. (e.g. "red") This method uses dynamic translation for the current locale.- Specified by:
getAttributeValuein interfaceProductOptionValue- Returns:
-
setAttributeValue
Description copied from interface:ProductOptionValueSets the option value. (e.g. "red")- Specified by:
setAttributeValuein interfaceProductOptionValue
-
getRawAttributeValue
Description copied from interface:ProductOptionValueGets the option value. (e.g. "red") This method does not use dynamic translation for the current locale. Instead it returns the raw value.- Specified by:
getRawAttributeValuein interfaceProductOptionValue- Returns:
-
getDisplayOrder
Description copied from interface:ProductOptionValueReturns the order that the option value should be displayed in.- Specified by:
getDisplayOrderin interfaceProductOptionValue- Returns:
-
setDisplayOrder
Description copied from interface:ProductOptionValueSets the display order.- Specified by:
setDisplayOrderin interfaceProductOptionValue
-
getPriceAdjustment
public org.broadleafcommerce.common.money.Money getPriceAdjustment()Description copied from interface:ProductOptionValueGets the price adjustment associated with this value. For instance, if this ProductOptionValue represented an extra-large shirt, that might be a $1 upcharge. This adjustments will be automatically added to the Sku retail price and sale price.This may be a negative value if you wanted to offer a particular ProductOptionValue at a discount
Depending on the implementation, this may perform dynamic pricing, which influences the value returned by examining price lists for the product option.
To retrieve the price adjustment without dynamic pricing applied, see
ProductOptionValue.getPriceAdjustmentSkipDynamicPricing().- Specified by:
getPriceAdjustmentin interfaceProductOptionValue- Returns:
- The price adjustment for this product option, with dynamic pricing applied, if applicable.
-
setPriceAdjustment
public void setPriceAdjustment(org.broadleafcommerce.common.money.Money priceAdjustment) Description copied from interface:ProductOptionValueGets the price adjustment associated with this value. For instance, if this ProductOptionValue represented an extra-large shirt, that might be a $1 upcharge. These adjustments will be automatically added to the Sku retail price and sale price. To offer this particular ProductOptionValue at a discount, you could also provide a negative value here- Specified by:
setPriceAdjustmentin interfaceProductOptionValue
-
getPriceAdjustmentSkipDynamicPricing
public org.broadleafcommerce.common.money.Money getPriceAdjustmentSkipDynamicPricing()Description copied from interface:ProductOptionValueRetrieve the Product Option's price adjustment without dynamic pricing applied.- Specified by:
getPriceAdjustmentSkipDynamicPricingin interfaceProductOptionValue- Returns:
- The price adjustment for this product option.
- See Also:
-
getProductOption
Description copied from interface:ProductOptionValueReturns the associated ProductOption- Specified by:
getProductOptionin interfaceProductOptionValue- Returns:
-
setProductOption
Description copied from interface:ProductOptionValueSets the associated product option.- Specified by:
setProductOptionin interfaceProductOptionValue
-
equals
-
hashCode
public int hashCode() -
createOrRetrieveCopyInstance
public <G extends ProductOptionValue> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceorg.broadleafcommerce.common.copy.MultiTenantCloneable<ProductOptionValue>- Throws:
CloneNotSupportedException
-