com.elasticpath.domain.attribute
Interface AttributeValue

All Superinterfaces:
EpDomain, Persistence, java.io.Serializable, ValueObject
All Known Subinterfaces:
AttributeValueWithType
All Known Implementing Classes:
AttributeValueImpl

public interface AttributeValue
extends ValueObject

AttributeValue is a value object which contains an Attribute value of a domain model, such as Category or Product.


Method Summary
 Attribute getAttribute()
          Get the Attribute corresponding to this value.
 AttributeType getAttributeType()
          Return the AttributeType of this attribute.
 java.lang.String getLocalizedAttributeKey()
          Get the localized attribute key used to get a handle on this attribute value, given the parent object to which the attribute belongs.
 java.lang.String getStringValue()
          Get the string value of the attribute.
 java.lang.Object getValue()
          Get the value of the attribute.
 void setAttribute(Attribute attribute)
          Get the attribute corresponding to this value.
 void setAttributeType(AttributeType attributeType)
          Set the AttributeType of this attribute.
 void setStringValue(java.lang.String stringValue)
          Set the value of the attribute based on the given string value.
 void setValue(java.lang.Object value)
          Set the value of the attribute.
 
Methods inherited from interface com.elasticpath.domain.Persistence
executeBeforePersistAction, getUidPk, isPersistent, setDefaultValues, setUidPk
 
Methods inherited from interface com.elasticpath.domain.EpDomain
getElasticPath, setElasticPath
 

Method Detail

getAttribute

Attribute getAttribute()
Get the Attribute corresponding to this value.

Returns:
the Attribute corresponding to this value

getAttributeType

AttributeType getAttributeType()
Return the AttributeType of this attribute.

Returns:
the AttributeType of this attribute

getLocalizedAttributeKey

java.lang.String getLocalizedAttributeKey()
Get the localized attribute key used to get a handle on this attribute value, given the parent object to which the attribute belongs. For localized attributes, this is the attribute key plus a "_" and language code. For non-localized attributes, the language code suffix is ommitted.

Returns:
the attribute key

getStringValue

java.lang.String getStringValue()
Get the string value of the attribute.

Returns:
the string value

getValue

java.lang.Object getValue()
Get the value of the attribute.

Returns:
the value

setAttribute

void setAttribute(Attribute attribute)
Get the attribute corresponding to this value.

Parameters:
attribute - the Attribute corresponding to this value

setAttributeType

void setAttributeType(AttributeType attributeType)
Set the AttributeType of this attribute.

Parameters:
attributeType - the attribute type.

setStringValue

void setStringValue(java.lang.String stringValue)
                    throws EpBindException
Set the value of the attribute based on the given string value.

Parameters:
stringValue - the string value to set
Throws:
EpBindException - in case the given string value is invalid

setValue

void setValue(java.lang.Object value)
Set the value of the attribute.

Parameters:
value - the value to set