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 fromTrackingplaced onEmbeddedContextStateAwareembedded 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 becauseContextStatedoes 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 booleancanEqual(Object other)booleanequals(Object o)List<String>getFieldsChanged()List of fields on theEmbeddedContextStateAwareitem to which this state belongs that were changed.inthashCode()booleanisChanged()Whether theEmbeddedContextStateAwareitem to which this state belongs has changed.voidsetChanged(boolean changed)Whether theEmbeddedContextStateAwareitem to which this state belongs has changed.voidsetFieldsChanged(List<String> fieldsChanged)List of fields on theEmbeddedContextStateAwareitem to which this state belongs that were changed.StringtoString()
-
-
-
Method Detail
-
isChanged
public boolean isChanged()
Whether theEmbeddedContextStateAwareitem to which this state belongs has changed. Defaults to true since, otherwise, the owning item's contextState would likely be null.- Returns:
- Whether the
EmbeddedContextStateAwareitem to which this state belongs has changed.
-
getFieldsChanged
public List<String> getFieldsChanged()
List of fields on theEmbeddedContextStateAwareitem to which this state belongs that were changed.- Returns:
- List of fields on the
EmbeddedContextStateAwareitem to which this state belongs that were changed.
-
setChanged
public void setChanged(boolean changed)
Whether theEmbeddedContextStateAwareitem to which this state belongs has changed. Defaults to true since, otherwise, the owning item's contextState would likely be null.- Parameters:
changed- Whether theEmbeddedContextStateAwareitem to which this state belongs has changed.
-
setFieldsChanged
public void setFieldsChanged(List<String> fieldsChanged)
List of fields on theEmbeddedContextStateAwareitem to which this state belongs that were changed.- Parameters:
fieldsChanged- List of fields on theEmbeddedContextStateAwareitem to which this state belongs that were changed.
-
canEqual
protected boolean canEqual(Object other)
-
-