Interface LegacyOfferUses

All Known Implementing Classes:
LegacyOfferUsesImpl, WeaveLegacyOfferUses

public interface LegacyOfferUses
This interface represents an Offer instance that has some additional, deprecated fields related to uses and maxUses

These fields may be showing up as required by the database as they were initially non-nullable. If you don't have custom logic using these fields, it is safe to remove the fields from your database.

If you do have these fields, this class supports weaving in the legacy fields back into the system. This should be done as a last resort with a preference being to remove the columns (or at least the Non-Null restriction) from your DB and refactor any code you have referencing these fields.

These fields are not currently used by the codebase and have been removed in version 5.0 of the framework. However, for backwards compatibility reasons related to the non-nullable "uses" database field, we are allowing these fields to be dynamically re-introduced via a application property. To enable this behavior, add "enable.optional.offer.uses.fields=true" to the appropriate application property files.

Author:
Jeff Fischer
  • Method Details

    • getUses

      @Deprecated int getUses()
      Deprecated.
      replaced by the OfferAudit table
    • setUses

      @Deprecated void setUses(int uses)
      Deprecated.
      replaced by the OfferAudit table
    • getMaxUses

      @Deprecated int getMaxUses()
      Deprecated.
      use #getMaxUsesPerOrder() directly instead
      Returns the maximum number of times that this offer can be used in the current order.

      0 indicates unlimited usage.

    • setMaxUses

      @Deprecated void setMaxUses(int maxUses)
      Deprecated.
      use #setMaxUsesPerOrder(int) directly instead
      Sets the maximum number of times that this offer can be used in the current order.

      0 indicates unlimited usage.

    • isApplyDiscountToMarkedItems

      @Deprecated boolean isApplyDiscountToMarkedItems()
      Deprecated.
      This field is not used by BLC.
      Returns:
    • setApplyDiscountToMarkedItems

      @Deprecated void setApplyDiscountToMarkedItems(boolean applyDiscountToMarkedItems)
      Deprecated.
      This field is not used by BLC.