Class CombinabilityOverride

java.lang.Object
com.broadleafcommerce.promotion.offer.domain.CombinabilityOverride
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware, Serializable

public class CombinabilityOverride extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
Represents a collection of overrides to other combinability and stacking settings. Overrides can be used to make an offer more or less restrictive with other specific offers.
Author:
Brian Polster
See Also:
  • Field Summary

    Fields inherited from interface com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware

    DEFAULT_FIELD_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
    com.broadleafcommerce.data.tracking.core.EmbeddedContextState
    A subset of Tracking information to expose the context state for this object.
    The type of override being performed for this offer combination.
    The id of an offer for which combinability is being overridden for this offer.
    int
     
    void
    setContextState(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState)
    A subset of Tracking information to expose the context state for this object.
    void
    setOverrideType(String overrideType)
    The type of override being performed for this offer combination.
    void
    setRelatedOfferRef(String relatedOfferRef)
    The id of an offer for which combinability is being overridden for this offer.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CombinabilityOverride

      public CombinabilityOverride()
  • Method Details

    • getRelatedOfferRef

      public String getRelatedOfferRef()
      The id of an offer for which combinability is being overridden for this offer.
      Returns:
      The context id of the related offer
    • getOverrideType

      public String getOverrideType()
      The type of override being performed for this offer combination.
      Returns:
      the maximum number of times that this code can be used regardless of Order or Customer.
      See Also:
    • getContextState

      public com.broadleafcommerce.data.tracking.core.EmbeddedContextState getContextState()
      A subset of Tracking information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when the ChangeDetails for the parent object's entire attributes map are compared.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setRelatedOfferRef

      public void setRelatedOfferRef(String relatedOfferRef)
      The id of an offer for which combinability is being overridden for this offer.
      Parameters:
      relatedOfferRef - The context id of a related offer.
    • setOverrideType

      public void setOverrideType(String overrideType)
      The type of override being performed for this offer combination.
      Parameters:
      maxUses - the maximum number of times that this code can be used regardless of Order or Customer.
      See Also:
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState)
      A subset of Tracking information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when the ChangeDetails for the parent object's entire attributes map are compared.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object