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 fromTracking
placed onEmbeddedContextStateAware
embedded collections members of business domains implementingContextStateAware
. Useful for API callers when making determinations regarding changes to particular items within an embedded collection. These changes would otherwise be obscured becauseContextState
does not provide information beyond that a collection was modified, not which items were changed and how.- Author:
- Nathan Moore (nathandmoore)
- See Also:
EmbeddedContextStateAware
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EmbeddedContextState()
EmbeddedContextState(boolean changed, List<String> fieldsChanged)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
List<String>
getFieldsChanged()
List of fields on theEmbeddedContextStateAware
item to which this state belongs that were changed.int
hashCode()
boolean
isChanged()
Whether theEmbeddedContextStateAware
item to which this state belongs has changed.void
setChanged(boolean changed)
Whether theEmbeddedContextStateAware
item to which this state belongs has changed.void
setFieldsChanged(List<String> fieldsChanged)
List of fields on theEmbeddedContextStateAware
item to which this state belongs that were changed.String
toString()
-
-
-
Method Detail
-
isChanged
public boolean isChanged()
Whether theEmbeddedContextStateAware
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 theEmbeddedContextStateAware
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 theEmbeddedContextStateAware
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 theEmbeddedContextStateAware
item to which this state belongs has changed.
-
setFieldsChanged
public void setFieldsChanged(List<String> fieldsChanged)
List of fields on theEmbeddedContextStateAware
item to which this state belongs that were changed.- Parameters:
fieldsChanged
- List of fields on theEmbeddedContextStateAware
item to which this state belongs that were changed.
-
canEqual
protected boolean canEqual(Object other)
-
-