Class EmbeddedContextState

java.lang.Object
com.broadleafcommerce.data.tracking.core.EmbeddedContextState
All Implemented Interfaces:
Serializable

public class EmbeddedContextState extends Object implements Serializable
A subset of information from Tracking placed on EmbeddedContextStateAware embedded collections members of business domains implementing ContextStateAware. Useful for API callers when making determinations regarding changes to particular items within an embedded collection. These changes would otherwise be obscured because ContextState does not provide information beyond that a collection was modified, not which items were changed and how.
Author:
Nathan Moore (nathandmoore)
See Also:
  • Constructor Details

    • EmbeddedContextState

      public EmbeddedContextState()
    • EmbeddedContextState

      public EmbeddedContextState(boolean changed, List<String> fieldsChanged)
  • Method Details

    • isChanged

      public boolean isChanged()
      Whether the EmbeddedContextStateAware item to which this state belongs has changed. Defaults to true since, otherwise, the owning item's contextState would likely be null.
      Returns:
      Whether the EmbeddedContextStateAware item to which this state belongs has changed.
    • getFieldsChanged

      public List<String> getFieldsChanged()
      List of fields on the EmbeddedContextStateAware item to which this state belongs that were changed.
      Returns:
      List of fields on the EmbeddedContextStateAware item to which this state belongs that were changed.
    • setChanged

      public void setChanged(boolean changed)
      Whether the EmbeddedContextStateAware item to which this state belongs has changed. Defaults to true since, otherwise, the owning item's contextState would likely be null.
      Parameters:
      changed - Whether the EmbeddedContextStateAware item to which this state belongs has changed.
    • setFieldsChanged

      public void setFieldsChanged(List<String> fieldsChanged)
      List of fields on the EmbeddedContextStateAware item to which this state belongs that were changed.
      Parameters:
      fieldsChanged - List of fields on the EmbeddedContextStateAware item to which this state belongs that were changed.
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object