Class OrderItemPriceDetailAdjustmentImpl
java.lang.Object
org.broadleafcommerce.core.offer.domain.OrderItemPriceDetailAdjustmentImpl
- All Implemented Interfaces:
Serializable,org.broadleafcommerce.common.copy.MultiTenantCloneable<OrderItemPriceDetailAdjustment>,org.broadleafcommerce.common.currency.util.CurrencyCodeIdentifiable,Adjustment,OrderItemPriceDetailAdjustment
@Entity
public class OrderItemPriceDetailAdjustmentImpl
extends Object
implements OrderItemPriceDetailAdjustment, org.broadleafcommerce.common.currency.util.CurrencyCodeIdentifiable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Offerprotected Longprotected Booleanprotected Offerprotected Stringprotected OrderItemPriceDetailprotected Stringprotected org.broadleafcommerce.common.money.Moneyprotected org.broadleafcommerce.common.money.Moneyprotected BigDecimal -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends OrderItemPriceDetailAdjustment>
org.broadleafcommerce.common.copy.CreateResponse<G>createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) booleanprotected org.broadleafcommerce.common.currency.domain.BroadleafCurrencygetId()getOffer()Stores the offer name at the time the adjustment was made.org.broadleafcommerce.common.money.MoneyValue of this adjustment relative to the retail price.org.broadleafcommerce.common.money.MoneyValue of this adjustment relative to the sale price.org.broadleafcommerce.common.money.MoneygetValue()inthashCode()voidinit(OrderItemPriceDetail orderItemPriceDetail, Offer offer, String reason) booleanEven for items that are on sale, it is possible that an adjustment was made to the retail price that gave the customer a better offer.booleanFuture credit means that the associated adjustment will be discounted at a later time to the customer via a credit.voidsetAppliedToSalePrice(boolean appliedToSalePrice) voidsetFutureCredit(boolean futureCredit) Future credit means that the associated adjustment will be discounted at a later time to the customer via a credit.voidvoidvoidsetOfferName(String offerName) Returns the name of the offer at the time the adjustment was made.voidsetOrderItemPriceDetail(OrderItemPriceDetail orderItemPriceDetail) voidvoidsetRetailPriceValue(org.broadleafcommerce.common.money.Money retailPriceValue) voidsetSalesPriceValue(org.broadleafcommerce.common.money.Money salesPriceValue) voidsetValue(org.broadleafcommerce.common.money.Money value)
-
Field Details
-
id
-
orderItemPriceDetail
-
offer
-
offerName
-
reason
-
value
-
appliedToSalePrice
protected boolean appliedToSalePrice -
isFutureCredit
-
retailValue
protected org.broadleafcommerce.common.money.Money retailValue -
salesValue
protected org.broadleafcommerce.common.money.Money salesValue -
deproxiedOffer
-
-
Constructor Details
-
OrderItemPriceDetailAdjustmentImpl
public OrderItemPriceDetailAdjustmentImpl()
-
-
Method Details
-
init
- Specified by:
initin interfaceOrderItemPriceDetailAdjustment
-
getId
- Specified by:
getIdin interfaceAdjustment
-
setId
- Specified by:
setIdin interfaceAdjustment
-
getOrderItemPriceDetail
- Specified by:
getOrderItemPriceDetailin interfaceOrderItemPriceDetailAdjustment
-
setOrderItemPriceDetail
- Specified by:
setOrderItemPriceDetailin interfaceOrderItemPriceDetailAdjustment
-
getOffer
- Specified by:
getOfferin interfaceAdjustment
-
setOffer
-
getOfferName
Description copied from interface:OrderItemPriceDetailAdjustmentStores the offer name at the time the adjustment was made. Primarily to simplify display within the admin.- Specified by:
getOfferNamein interfaceOrderItemPriceDetailAdjustment- Returns:
-
setOfferName
Description copied from interface:OrderItemPriceDetailAdjustmentReturns the name of the offer at the time the adjustment was made.- Specified by:
setOfferNamein interfaceOrderItemPriceDetailAdjustment
-
getReason
- Specified by:
getReasonin interfaceAdjustment
-
setReason
- Specified by:
setReasonin interfaceAdjustment
-
getCurrency
protected org.broadleafcommerce.common.currency.domain.BroadleafCurrency getCurrency() -
getValue
public org.broadleafcommerce.common.money.Money getValue()- Specified by:
getValuein interfaceAdjustment
-
setValue
public void setValue(org.broadleafcommerce.common.money.Money value) - Specified by:
setValuein interfaceAdjustment
-
isAppliedToSalePrice
public boolean isAppliedToSalePrice()Description copied from interface:OrderItemPriceDetailAdjustmentEven for items that are on sale, it is possible that an adjustment was made to the retail price that gave the customer a better offer.Since some offers can be applied to the sale price and some only to the retail price, this setting provides the required value.
- Specified by:
isAppliedToSalePricein interfaceOrderItemPriceDetailAdjustment- Returns:
- true if this adjustment was applied to the sale price
-
setAppliedToSalePrice
public void setAppliedToSalePrice(boolean appliedToSalePrice) - Specified by:
setAppliedToSalePricein interfaceOrderItemPriceDetailAdjustment
-
getRetailPriceValue
public org.broadleafcommerce.common.money.Money getRetailPriceValue()Description copied from interface:OrderItemPriceDetailAdjustmentValue of this adjustment relative to the retail price.- Specified by:
getRetailPriceValuein interfaceOrderItemPriceDetailAdjustment- Returns:
-
setRetailPriceValue
public void setRetailPriceValue(org.broadleafcommerce.common.money.Money retailPriceValue) - Specified by:
setRetailPriceValuein interfaceOrderItemPriceDetailAdjustment
-
getSalesPriceValue
public org.broadleafcommerce.common.money.Money getSalesPriceValue()Description copied from interface:OrderItemPriceDetailAdjustmentValue of this adjustment relative to the sale price.- Specified by:
getSalesPriceValuein interfaceOrderItemPriceDetailAdjustment- Returns:
-
setSalesPriceValue
public void setSalesPriceValue(org.broadleafcommerce.common.money.Money salesPriceValue) - Specified by:
setSalesPriceValuein interfaceOrderItemPriceDetailAdjustment
-
getCurrencyCode
- Specified by:
getCurrencyCodein interfaceorg.broadleafcommerce.common.currency.util.CurrencyCodeIdentifiable
-
isFutureCredit
public boolean isFutureCredit()Description copied from interface:OrderItemPriceDetailAdjustmentFuture credit means that the associated adjustment will be discounted at a later time to the customer via a credit. It is up to the implementor to decide how to achieve this. This field is used to determine if the adjustment originated from an offer marked as FUTURE_CREDIT.See
Offer.getAdjustmentType()for more info- Specified by:
isFutureCreditin interfaceOrderItemPriceDetailAdjustment- Returns:
-
setFutureCredit
public void setFutureCredit(boolean futureCredit) Description copied from interface:OrderItemPriceDetailAdjustmentFuture credit means that the associated adjustment will be discounted at a later time to the customer via a credit. It is up to the implementor to decide how to achieve this. This field is used to determine if the adjustment originated from an offer marked as FUTURE_CREDIT.See
Offer.getAdjustmentType()for more info- Specified by:
setFutureCreditin interfaceOrderItemPriceDetailAdjustment
-
hashCode
public int hashCode() -
equals
-
createOrRetrieveCopyInstance
public <G extends OrderItemPriceDetailAdjustment> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceorg.broadleafcommerce.common.copy.MultiTenantCloneable<OrderItemPriceDetailAdjustment>- Throws:
CloneNotSupportedException
-