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:
-
Field Summary
Fields inherited from interface com.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
DEFAULT_FIELD_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
com.broadleafcommerce.data.tracking.core.EmbeddedContextState
A subset ofTracking
information to expose the context state for this object.getValue()
The value represented by this attribute.int
hashCode()
void
setContextState
(com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState) A subset ofTracking
information to expose the context state for this object.void
The value represented by this attribute.toString()
-
Constructor Details
-
Attribute
public Attribute()
-
-
Method Details
-
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 ofTracking
information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when theChangeDetails
for the parent object's entireattributes
map are compared.- Specified by:
getContextState
in interfacecom.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
- Returns:
- a subset of
Tracking
information to expose the context state for this object
-
setValue
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 ofTracking
information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when theChangeDetails
for the parent object's entireattributes
map are compared.- Specified by:
setContextState
in interfacecom.broadleafcommerce.data.tracking.core.EmbeddedContextStateAware
- Parameters:
contextState
- a subset ofTracking
information to expose the context state for this object
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-