Class OfferQualifier

    • Constructor Detail

      • OfferQualifier

        public OfferQualifier()
    • Method Detail

      • incrementQuantity

        public int incrementQuantity​(int incrementQuantity)
        Increments the quantity by the given amount.
        Parameters:
        incrementQuantity - amount by which to increment quantity
        Returns:
        the new quantity
      • split

        @NonNull
        public OfferQualifier split​(@NonNull
                                    com.broadleafcommerce.common.extension.TypeFactory offerFactory,
                                    int splitItemQty)
        Checks to see that the discount quantities match the target quantities. If not, splits this item into two.
        Returns:
        the item created by splitting
      • copy

        protected OfferQualifier copy​(com.broadleafcommerce.common.extension.TypeFactory offerFactory)
        Creates a copy of this offer discount.
        Parameters:
        offerFactory - the TypeFactory required to create a new instance
        Returns:
        the copied instance
      • getPrice

        public javax.money.MonetaryAmount getPrice()
        Tracks the discount amount of the related item qualifier. The discount amount will be 0 if this item was only used as a qualifier.
      • setQuantity

        public void setQuantity​(int quantity)
        The potential item quantity of an EnhancedLineItem that matched the offer.
        Parameters:
        quantity - The potential item quantity of an EnhancedLineItem that matched the offer.
      • setFinalizedQuantity

        public void setFinalizedQuantity​(int finalizedQuantity)
        The actual item quantity of an EnhancedLineItem matched to the offer.
        Parameters:
        quantity - The actual item quantity of an EnhancedLineItem matched to the offer.
      • setPrice

        public void setPrice​(javax.money.MonetaryAmount price)
        Tracks the discount amount of the related item qualifier. The discount amount will be 0 if this item was only used as a qualifier.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object