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:
  • Field Details

    • id

      protected Long id
    • attributeValue

      protected String attributeValue
    • displayOrder

      protected Long displayOrder
    • priceAdjustment

      protected BigDecimal priceAdjustment
    • productOption

      protected ProductOption productOption
  • Constructor Details

    • ProductOptionValueImpl

      public ProductOptionValueImpl()
  • Method Details

    • getId

      public Long getId()
      Description copied from interface: ProductOptionValue
      Returns unique identifier of the product option value.
      Specified by:
      getId in interface ProductOptionValue
      Returns:
    • setId

      public void setId(Long id)
      Description copied from interface: ProductOptionValue
      Sets the unique identifier of the product option value.
      Specified by:
      setId in interface ProductOptionValue
    • getAttributeValue

      public String getAttributeValue()
      Description copied from interface: ProductOptionValue
      Gets the option value. (e.g. "red") This method uses dynamic translation for the current locale.
      Specified by:
      getAttributeValue in interface ProductOptionValue
      Returns:
    • setAttributeValue

      public void setAttributeValue(String attributeValue)
      Description copied from interface: ProductOptionValue
      Sets the option value. (e.g. "red")
      Specified by:
      setAttributeValue in interface ProductOptionValue
    • getRawAttributeValue

      public String getRawAttributeValue()
      Description copied from interface: ProductOptionValue
      Gets 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:
      getRawAttributeValue in interface ProductOptionValue
      Returns:
    • getDisplayOrder

      public Long getDisplayOrder()
      Description copied from interface: ProductOptionValue
      Returns the order that the option value should be displayed in.
      Specified by:
      getDisplayOrder in interface ProductOptionValue
      Returns:
    • setDisplayOrder

      public void setDisplayOrder(Long displayOrder)
      Description copied from interface: ProductOptionValue
      Sets the display order.
      Specified by:
      setDisplayOrder in interface ProductOptionValue
    • getPriceAdjustment

      public org.broadleafcommerce.common.money.Money getPriceAdjustment()
      Description copied from interface: ProductOptionValue
      Gets 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:
      getPriceAdjustment in interface ProductOptionValue
      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: ProductOptionValue
      Gets 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:
      setPriceAdjustment in interface ProductOptionValue
    • getPriceAdjustmentSkipDynamicPricing

      public org.broadleafcommerce.common.money.Money getPriceAdjustmentSkipDynamicPricing()
      Description copied from interface: ProductOptionValue
      Retrieve the Product Option's price adjustment without dynamic pricing applied.
      Specified by:
      getPriceAdjustmentSkipDynamicPricing in interface ProductOptionValue
      Returns:
      The price adjustment for this product option.
      See Also:
    • getProductOption

      public ProductOption getProductOption()
      Description copied from interface: ProductOptionValue
      Returns the associated ProductOption
      Specified by:
      getProductOption in interface ProductOptionValue
      Returns:
    • setProductOption

      public void setProductOption(ProductOption productOption)
      Description copied from interface: ProductOptionValue
      Sets the associated product option.
      Specified by:
      setProductOption in interface ProductOptionValue
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • createOrRetrieveCopyInstance

      public <G extends ProductOptionValue> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException
      Specified by:
      createOrRetrieveCopyInstance in interface org.broadleafcommerce.common.copy.MultiTenantCloneable<ProductOptionValue>
      Throws:
      CloneNotSupportedException