Class 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:
    Serialized Form
    • Constructor Detail

      • CombinabilityOverride

        public CombinabilityOverride()
    • Method Detail

      • 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:
        CombinabilityOverrideType
      • 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:
        CombinabilityOverrideType
      • 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
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object