Class OrderItemPriceDetailAdjustmentImpl
java.lang.Object
org.broadleafcommerce.core.offer.domain.OrderItemPriceDetailAdjustmentImpl
- All Implemented Interfaces:
Serializable,MultiTenantCloneable<OrderItemPriceDetailAdjustment>,CurrencyCodeIdentifiable,Adjustment,OrderItemPriceDetailAdjustment
@Entity
public class OrderItemPriceDetailAdjustmentImpl
extends Object
implements OrderItemPriceDetailAdjustment, CurrencyCodeIdentifiable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Offerprotected Longprotected Booleanprotected Offerprotected Stringprotected OrderItemPriceDetailprotected Stringprotected Moneyprotected Moneyprotected BigDecimal -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<G extends OrderItemPriceDetailAdjustment>
CreateResponse<G>booleanprotected BroadleafCurrencygetId()getOffer()Stores the offer name at the time the adjustment was made.Value of this adjustment relative to the retail price.Value of this adjustment relative to the sale price.getValue()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(Money retailPriceValue) voidsetSalesPriceValue(Money salesPriceValue) void
-
Field Details
-
id
-
orderItemPriceDetail
-
offer
-
offerName
-
reason
-
value
-
appliedToSalePrice
protected boolean appliedToSalePrice -
isFutureCredit
-
retailValue
-
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
-
getValue
- Specified by:
getValuein interfaceAdjustment
-
setValue
- 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
Description copied from interface:OrderItemPriceDetailAdjustmentValue of this adjustment relative to the retail price.- Specified by:
getRetailPriceValuein interfaceOrderItemPriceDetailAdjustment- Returns:
-
setRetailPriceValue
- Specified by:
setRetailPriceValuein interfaceOrderItemPriceDetailAdjustment
-
getSalesPriceValue
Description copied from interface:OrderItemPriceDetailAdjustmentValue of this adjustment relative to the sale price.- Specified by:
getSalesPriceValuein interfaceOrderItemPriceDetailAdjustment- Returns:
-
setSalesPriceValue
- Specified by:
setSalesPriceValuein interfaceOrderItemPriceDetailAdjustment
-
getCurrencyCode
- Specified by:
getCurrencyCodein interfaceCurrencyCodeIdentifiable
-
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> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException - Specified by:
createOrRetrieveCopyInstancein interfaceMultiTenantCloneable<OrderItemPriceDetailAdjustment>- Throws:
CloneNotSupportedException
-