Class JpaSpecificItemVariantPricing

java.lang.Object
com.broadleafcommerce.catalog.provider.jpa.domain.product.option.JpaSpecificItemVariantPricing
All Implemented Interfaces:
Serializable

public class JpaSpecificItemVariantPricing extends Object implements Serializable
Represents a pricing override to be used for a JpaSpecificItemChoice if a specific variant of the parent product is added to the cart along with the item choice. Persistent counterpart to SpecificItemVariantPricing.
See Also:
  • Constructor Details

    • JpaSpecificItemVariantPricing

      public JpaSpecificItemVariantPricing()
  • Method Details

    • addFromMeMappings

      public static void addFromMeMappings(@NonNull org.modelmapper.ModelMapper mapper)
    • addToMeMappings

      public static void addToMeMappings(@NonNull org.modelmapper.ModelMapper mapper)
    • setOverridePrice

      public void setOverridePrice(javax.money.MonetaryAmount overridePrice)
    • getOverridePrice

      public javax.money.MonetaryAmount getOverridePrice()
    • getVariantId

      public String getVariantId()
      Returns:
      The persisted counter-part of the Variant.getId() on SpecificItemVariantPricing.
    • getVariantSku

      public String getVariantSku()
      Returns:
      The persisted counter-part of the Variant.getSku() on SpecificItemVariantPricing.
    • getPricingKey

      public String getPricingKey()
      Returns:
      The persisted counter-part of SpecificItemVariantPricing.getPricingKey().
    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
      Returns:
      the currency type provided to the pricing.
    • setVariantId

      public void setVariantId(String variantId)
      Parameters:
      variantId - id of the variant that the override price belongs to. This saves space since we don't need to store the entire Variant.
    • setVariantSku

      public void setVariantSku(String variantSku)
      Parameters:
      variantSku - sku of the variant, necessary to correctly display a unique value after being read. This saves space since we don't need to store the entire Variant.
    • setPricingKey

      public void setPricingKey(String pricingKey)
      Parameters:
      pricingKey - related pricing key for the override price.
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
      Parameters:
      currency - currency to correctly translate the BigDecimal price to a MonetaryAmount.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object