Class JpaSpecificItemVariantPricing
java.lang.Object
com.broadleafcommerce.catalog.provider.jpa.domain.product.option.JpaSpecificItemVariantPricing
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addFromMeMappings
(org.modelmapper.ModelMapper mapper) static void
addToMeMappings
(org.modelmapper.ModelMapper mapper) protected boolean
boolean
javax.money.CurrencyUnit
javax.money.MonetaryAmount
int
hashCode()
void
setCurrency
(javax.money.CurrencyUnit currency) void
setOverridePrice
(javax.money.MonetaryAmount overridePrice) void
setPricingKey
(String pricingKey) void
setVariantId
(String variantId) void
setVariantSku
(String variantSku) toString()
-
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
- Returns:
- The persisted counter-part of the
Variant.getId()
onSpecificItemVariantPricing
.
-
getVariantSku
- Returns:
- The persisted counter-part of the
Variant.getSku()
onSpecificItemVariantPricing
.
-
getPricingKey
- Returns:
- The persisted counter-part of
SpecificItemVariantPricing.getPricingKey()
.
-
getCurrency
public javax.money.CurrencyUnit getCurrency()- Returns:
- the currency type provided to the pricing.
-
setVariantId
- Parameters:
variantId
- id of the variant that the override price belongs to. This saves space since we don't need to store the entireVariant
.
-
setVariantSku
- 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 entireVariant
.
-
setPricingKey
- Parameters:
pricingKey
- related pricing key for the override price.
-
setCurrency
public void setCurrency(javax.money.CurrencyUnit currency) - Parameters:
currency
- currency to correctly translate theBigDecimal
price to aMonetaryAmount
.
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-