Class AbstractPromotionRounding

java.lang.Object
org.broadleafcommerce.core.offer.service.discount.domain.AbstractPromotionRounding
All Implemented Interfaces:
PromotionRounding
Direct Known Subclasses:
PromotableCandidateFulfillmentGroupOfferImpl, PromotableCandidateItemOfferImpl, PromotableFulfillmentGroupAdjustmentImpl, PromotableOrderItemPriceDetailAdjustmentImpl

public abstract class AbstractPromotionRounding extends Object implements PromotionRounding
  • Field Details

    • roundingScale

      protected Integer roundingScale
    • roundingMode

      protected RoundingMode roundingMode
  • Constructor Details

    • AbstractPromotionRounding

      public AbstractPromotionRounding()
  • Method Details

    • setRoundingScale

      public void setRoundingScale(int roundingScale)
      It is sometimes problematic to offer percentage-off offers with regards to rounding. For example, consider an item that costs 9.99 and has a 50% promotion. To be precise, the offer value is 4.995, but this may be a strange value to display to the user depending on the currency being used.
      Parameters:
      roundingScale -
    • setRoundingMode

      public void setRoundingMode(RoundingMode roundingMode)
      It is sometimes problematic to offer percentage-off offers with regards to rounding. For example, consider an item that costs 9.99 and has a 50% promotion. To be precise, the offer value is 4.995, but this may be a strange value to display to the user depending on the currency being used.
      Parameters:
      roundingMode -
    • getRoundingMode

      public RoundingMode getRoundingMode()
      Description copied from interface: PromotionRounding
      It is sometimes problematic to offer percentage-off offers with regards to rounding. For example, consider an item that costs 9.99 and has a 50% promotion. To be precise, the offer value is 4.995, but this may be a strange value to display to the user depending on the currency being used.
      Specified by:
      getRoundingMode in interface PromotionRounding
    • getRoundingScale

      public Integer getRoundingScale()
      Description copied from interface: PromotionRounding
      It is sometimes problematic to offer percentage-off offers with regards to rounding. For example, consider an item that costs 9.99 and has a 50% promotion. To be precise, the offer value is 4.995, but this may be a strange value to display to the user depending on the currency being used.
      Specified by:
      getRoundingScale in interface PromotionRounding