public class PromotableCandidateItemOfferImpl extends AbstractPromotionRounding implements PromotableCandidateItemOffer, OfferHolder
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<OfferItemCriteria,List<PromotableOrderItem>> |
candidateQualifiersMap |
protected HashMap<OfferItemCriteria,List<PromotableOrderItem>> |
candidateTargetsMap |
protected List<PromotableOrderItem> |
legacyCandidateTargets |
protected Offer |
offer |
protected Money |
originalPrice |
protected Money |
potentialSavings |
protected Money |
potentialSavingsQtyOne |
protected PromotableOrder |
promotableOrder |
protected int |
uses |
protected BigDecimal |
weightedPercentSaved |
roundingMode, roundingScale, roundOfferValues| Constructor and Description |
|---|
PromotableCandidateItemOfferImpl(PromotableOrder promotableOrder,
Offer offer) |
getRoundingMode, getRoundingScale, isRoundOfferValues, setRoundingMode, setRoundingScaleprotected Offer offer
protected PromotableOrder promotableOrder
protected Money potentialSavings
protected Money potentialSavingsQtyOne
protected BigDecimal weightedPercentSaved
protected Money originalPrice
protected int uses
protected HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateQualifiersMap
protected HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateTargetsMap
protected List<PromotableOrderItem> legacyCandidateTargets
public PromotableCandidateItemOfferImpl(PromotableOrder promotableOrder, Offer offer)
public BroadleafCurrency getCurrency()
getCurrency in interface OfferHolderpublic Money calculateSavingsForOrderItem(PromotableOrderItem orderItem, int qtyToReceiveSavings)
PromotableCandidateItemOffercalculateSavingsForOrderItem in interface PromotableCandidateItemOfferpublic int calculateTargetQuantityForTieredOffer()
calculateTargetQuantityForTieredOffer in interface PromotableCandidateItemOfferpublic Money getPotentialSavings()
getPotentialSavings in interface PromotableCandidateItemOfferpublic void setPotentialSavings(Money potentialSavings)
setPotentialSavings in interface PromotableCandidateItemOfferpublic Money getPotentialSavingsQtyOne()
getPotentialSavingsQtyOne in interface PromotableCandidateItemOfferpublic void setPotentialSavingsQtyOne(Money potentialSavingsQtyOne)
setPotentialSavingsQtyOne in interface PromotableCandidateItemOfferpublic boolean hasQualifyingItemCriteria()
hasQualifyingItemCriteria in interface PromotableCandidateItemOfferpublic int calculateMaximumNumberOfUses()
calculateMaximumNumberOfUses in interface PromotableCandidateItemOfferpublic int calculateMaxUsesForItemCriteria(OfferItemCriteria itemCriteria, Offer promotion)
PromotableCandidateItemOffercalculateMaxUsesForItemCriteria in interface PromotableCandidateItemOfferpublic HashMap<OfferItemCriteria,List<PromotableOrderItem>> getCandidateQualifiersMap()
getCandidateQualifiersMap in interface PromotableCandidateItemOfferpublic void setCandidateQualifiersMap(HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateItemsMap)
setCandidateQualifiersMap in interface PromotableCandidateItemOfferpublic HashMap<OfferItemCriteria,List<PromotableOrderItem>> getCandidateTargetsMap()
getCandidateTargetsMap in interface PromotableCandidateItemOfferpublic void setCandidateTargetsMap(HashMap<OfferItemCriteria,List<PromotableOrderItem>> candidateItemsMap)
setCandidateTargetsMap in interface PromotableCandidateItemOfferpublic int getPriority()
getPriority in interface PromotableCandidateItemOfferpublic Offer getOffer()
getOffer in interface OfferHoldergetOffer in interface PromotableCandidateItemOfferpublic int getUses()
getUses in interface PromotableCandidateItemOfferpublic void addUse()
addUse in interface PromotableCandidateItemOfferpublic void resetUses()
PromotableCandidateItemOfferresetUses in interface PromotableCandidateItemOfferItemOfferProcessor#applyAndCompareOrderAndItemOffers(PromotableOrder, List, List)}public boolean isLegacyOffer()
isLegacyOffer in interface PromotableCandidateItemOfferpublic List<PromotableOrderItem> getLegacyCandidateTargets()
getLegacyCandidateTargets in interface PromotableCandidateItemOfferpublic void setLegacyCandidateTargets(List<PromotableOrderItem> candidateTargets)
setLegacyCandidateTargets in interface PromotableCandidateItemOfferpublic BigDecimal getWeightedPercentSaved()
getWeightedPercentSaved in interface PromotableCandidateItemOfferpublic void setWeightedPercentSaved(BigDecimal weightedPercentSaved)
setWeightedPercentSaved in interface PromotableCandidateItemOfferpublic Money getOriginalPrice()
getOriginalPrice in interface PromotableCandidateItemOfferpublic void setOriginalPrice(Money originalPrice)
setOriginalPrice in interface PromotableCandidateItemOfferCopyright © 2017. All rights reserved.