Class Attribute
java.lang.Object
com.broadleafcommerce.cartoperation.domain.Attribute
- All Implemented Interfaces:
Serializable
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:
- Chad Harchar, Samarth Dhruva
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttribute
(String name, Object value) Takes in any additional attributes passed in the request not matching any defined properties.protected boolean
boolean
Return any additional attributes passed in the request not matching any defined properties.Map holding any additional attributes passed in the request not matching any defined properties.getValue()
The value represented by this attribute.int
hashCode()
void
setAttributes
(Map<String, Object> attributes) Map holding any additional attributes passed in the request not matching any defined properties.void
setValue
(Serializable value) The value represented by this attribute.toString()
-
Constructor Details
-
Attribute
public Attribute() -
Attribute
-
-
Method Details
-
addAttribute
Takes in any additional attributes passed in the request not matching any defined properties.- Parameters:
name
- Name of the additional attributevalue
- Value of the additional attribute
-
getAttribute
Return any additional attributes passed in the request not matching any defined properties.- Returns:
- any additional attributes passed in the request not matching any defined properties.
-
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
-
getAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
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
-
setAttributes
Map holding any additional attributes passed in the request not matching any defined properties. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-