public class PromotableOrderAdjustmentImpl extends Object implements PromotableOrderAdjustment
| Modifier and Type | Field and Description |
|---|---|
protected Money |
adjustmentValue |
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 |
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 |
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
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 PromotableOrderAdjustmentCopyright © 2014. All Rights Reserved.