Class Attribute
- java.lang.Object
-
- com.broadleafcommerce.customer.domain.Attribute
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware,Serializable
public class Attribute extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
Many entities have customizable dynamic attributes, and this class is intended to hold such values.Attributes are placed on domain objects as a map of attribute names to attribute values:
Map<String, Attribute>.- Author:
- Samarth Dhruva, Chris Kittrell (ckittrell)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Attribute()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)com.broadleafcommerce.data.tracking.core.EmbeddedContextStategetContextState()A subset ofTrackinginformation to expose the context state for this object.ObjectgetValue()The value represented by this attribute.inthashCode()voidsetContextState(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState)A subset ofTrackinginformation to expose the context state for this object.voidsetValue(Object value)The value represented by this attribute.StringtoString()
-
-
-
Method Detail
-
getValue
public Object getValue()
The value represented by this attribute. Attributes are generally placed on domain objects as a map of attribute names to attribute values:Map<String, Attribute>.- Returns:
- the value represented by this attribute
-
getContextState
public com.broadleafcommerce.data.tracking.core.EmbeddedContextState getContextState()
A subset ofTrackinginformation to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when theChangeDetailsfor the parent object's entireattributesmap are compared.- Specified by:
getContextStatein interfacecom.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware- Returns:
- a subset of
Trackinginformation to expose the context state for this object
-
setValue
public void setValue(Object value)
The value represented by this attribute. Attributes are generally placed on domain objects as a map of attribute names to attribute values:Map<String, Attribute>.- Parameters:
value- the value represented by this attribute
-
setContextState
public void setContextState(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState)
A subset ofTrackinginformation to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when theChangeDetailsfor the parent object's entireattributesmap are compared.- Specified by:
setContextStatein interfacecom.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware- Parameters:
contextState- a subset ofTrackinginformation to expose the context state for this object
-
canEqual
protected boolean canEqual(Object other)
-
-