Class LegacyOfferUsesImpl

java.lang.Object
org.broadleafcommerce.core.offer.domain.LegacyOfferUsesImpl
All Implemented Interfaces:
org.broadleafcommerce.common.copy.MultiTenantCloneable<LegacyOfferUses>, LegacyOfferUses

@Embeddable public class LegacyOfferUsesImpl extends Object implements LegacyOfferUses, org.broadleafcommerce.common.copy.MultiTenantCloneable<LegacyOfferUses>
Holds the backwards compatibility field for uses. Also hold the backwards compatibility mutator implementations for maxUses.
Author:
Jeff Fischer
  • Field Details

    • offer

      protected Offer offer
    • uses

      protected int uses
    • applyDiscountToMarkedItems

      @Deprecated protected boolean applyDiscountToMarkedItems
      Deprecated.
  • Constructor Details

    • LegacyOfferUsesImpl

      public LegacyOfferUsesImpl()
  • Method Details

    • getUses

      public int getUses()
      Specified by:
      getUses in interface LegacyOfferUses
    • setUses

      public void setUses(int uses)
      Specified by:
      setUses in interface LegacyOfferUses
    • getMaxUses

      public int getMaxUses()
      Description copied from interface: LegacyOfferUses
      Returns the maximum number of times that this offer can be used in the current order.

      0 indicates unlimited usage.

      Specified by:
      getMaxUses in interface LegacyOfferUses
    • setMaxUses

      public void setMaxUses(int maxUses)
      Description copied from interface: LegacyOfferUses
      Sets the maximum number of times that this offer can be used in the current order.

      0 indicates unlimited usage.

      Specified by:
      setMaxUses in interface LegacyOfferUses
    • isApplyDiscountToMarkedItems

      @Deprecated public boolean isApplyDiscountToMarkedItems()
      Deprecated.
      Description copied from interface: LegacyOfferUses
      This field is not used by BLC.
      Specified by:
      isApplyDiscountToMarkedItems in interface LegacyOfferUses
      Returns:
    • getApplyDiscountToMarkedItems

      @Deprecated public boolean getApplyDiscountToMarkedItems()
      Deprecated.
    • setApplyDiscountToMarkedItems

      @Deprecated public void setApplyDiscountToMarkedItems(boolean applyDiscountToMarkedItems)
      Deprecated.
      Description copied from interface: LegacyOfferUses
      This field is not used by BLC.
      Specified by:
      setApplyDiscountToMarkedItems in interface LegacyOfferUses
    • getOffer

      public Offer getOffer()
    • setOffer

      public void setOffer(Offer offer)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • createOrRetrieveCopyInstance

      public <G extends LegacyOfferUses> org.broadleafcommerce.common.copy.CreateResponse<G> createOrRetrieveCopyInstance(org.broadleafcommerce.common.copy.MultiTenantCopyContext context) throws CloneNotSupportedException
      Specified by:
      createOrRetrieveCopyInstance in interface org.broadleafcommerce.common.copy.MultiTenantCloneable<LegacyOfferUses>
      Throws:
      CloneNotSupportedException