Class UserTarget

  • All Implemented Interfaces:
    com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware, Serializable

    public class UserTarget
    extends Object
    implements Serializable, com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
    Abstraction of a user that pricing entities can target. Examples include customers and accounts.
    Author:
    Nathan Moore (nathanmoore).
    See Also:
    Serialized Form
    • Constructor Detail

      • UserTarget

        public UserTarget()
    • Method Detail

      • getTargetValue

        public String getTargetValue()
      • getTargetType

        public String getTargetType()
        This could be "customer", "account", etc.
      • 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
      • setTargetValue

        public void setTargetValue​(String targetValue)
      • setTargetType

        public void setTargetType​(String targetType)
        This could be "customer", "account", etc.
      • 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