public class PromotableOrderAdjustmentImpl extends Object implements PromotableOrderAdjustment
| Modifier and Type | Field and Description |
|---|---|
protected Money |
adjustmentValue |
protected boolean |
isFutureCredit |
protected Offer |
offer |
protected PromotableCandidateOrderOffer |
promotableCandidateOrderOffer |
protected PromotableOrder |
promotableOrder |
protected RoundingMode |
roundingMode |
protected int |
roundingScale |
protected boolean |
roundOfferValues |
| Constructor and Description |
|---|
PromotableOrderAdjustmentImpl(PromotableCandidateOrderOffer promotableCandidateOrderOffer,
PromotableOrder promotableOrder) |
PromotableOrderAdjustmentImpl(PromotableCandidateOrderOffer promotableCandidateOrderOffer,
PromotableOrder promotableOrder,
Money adjustmentValue) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
computeAdjustmentValue() |
Money |
getAdjustmentValue()
Returns the value of this adjustment
|
Offer |
getOffer()
Returns the associated promotableCandidateOrderOffer
|
PromotableOrder |
getPromotableOrder()
Returns the associated promotableOrder
|
RoundingMode |
getRoundingMode() |
int |
getRoundingScale() |
boolean |
isCombinable()
Returns true if this adjustment represents a combinable offer.
|
boolean |
isFutureCredit()
Future credit means that the associated adjustment will be discounted at a later time to the customer
via a credit.
|
boolean |
isRoundOfferValues()
It is sometimes problematic to offer percentage-off offers with regards to rounding.
|
boolean |
isTotalitarian()
Returns true if this adjustment represents a totalitarian offer.
|
void |
setFutureCredit(boolean futureCredit)
Future credit means that the associated adjustment will be discounted at a later time to the customer
via a credit.
|
void |
setRoundingMode(RoundingMode roundingMode) |
void |
setRoundingScale(int roundingScale) |
protected PromotableCandidateOrderOffer promotableCandidateOrderOffer
protected PromotableOrder promotableOrder
protected Money adjustmentValue
protected Offer offer
protected boolean roundOfferValues
protected int roundingScale
protected RoundingMode roundingMode
protected boolean isFutureCredit
public PromotableOrderAdjustmentImpl(PromotableCandidateOrderOffer promotableCandidateOrderOffer, PromotableOrder promotableOrder)
public PromotableOrderAdjustmentImpl(PromotableCandidateOrderOffer promotableCandidateOrderOffer, PromotableOrder promotableOrder, Money adjustmentValue)
public PromotableOrder getPromotableOrder()
PromotableOrderAdjustmentgetPromotableOrder in interface PromotableOrderAdjustmentpublic Offer getOffer()
PromotableOrderAdjustmentgetOffer in interface PromotableOrderAdjustmentprotected void computeAdjustmentValue()
public Money getAdjustmentValue()
PromotableOrderAdjustmentgetAdjustmentValue in interface PromotableOrderAdjustmentpublic boolean isRoundOfferValues()
public void setRoundingScale(int roundingScale)
roundingScale - isRoundOfferValues()public int getRoundingScale()
public void setRoundingMode(RoundingMode roundingMode)
roundingMode - isRoundOfferValues()public RoundingMode getRoundingMode()
public boolean isCombinable()
PromotableOrderAdjustmentisCombinable in interface PromotableOrderAdjustmentpublic boolean isTotalitarian()
PromotableOrderAdjustmentisTotalitarian in interface PromotableOrderAdjustmentpublic boolean isFutureCredit()
PromotableOrderAdjustmentOffer.getAdjustmentType() for more infoisFutureCredit in interface PromotableOrderAdjustmentpublic void setFutureCredit(boolean futureCredit)
PromotableOrderAdjustmentOffer.getAdjustmentType() for more infosetFutureCredit in interface PromotableOrderAdjustmentCopyright © 2020. All rights reserved.