com.elasticpath.domain.attribute
Interface AttributeType

All Known Implementing Classes:
AbstractAttributeTypeImpl

public interface AttributeType

Represents an attribute type.


Method Summary
 java.lang.String getStorageType()
          Returns a string representing the type/field used to store data for this attribute.
 java.lang.String getStringValue(AttributeValueWithType attributeValueImpl)
          Gets the string value of the given attribute value instance.
 int getTypeId()
          Returns the attribute type Id.
 java.lang.Object getValue(AttributeValueWithType attributeValueImpl)
          Gets the value object of the given attribute value instance.
 void setStringValue(AttributeValueWithType attributeValueImpl, java.lang.String stringValue)
          Sets the given attribute value with the given string value.
 void setValue(AttributeValueWithType attributeValueImpl, java.lang.Object value)
          Sets the given value object to the given attribute value instance.
 java.lang.String toString()
          Returns the attribute type name.
 

Method Detail

getStorageType

java.lang.String getStorageType()
Returns a string representing the type/field used to store data for this attribute. For example, images (URLS) and short text attributes both store their values as shortTextValues despite being different attribute types.

Returns:
the string name of the field where this attribute's data is stored.

getStringValue

java.lang.String getStringValue(AttributeValueWithType attributeValueImpl)
Gets the string value of the given attribute value instance.

Parameters:
attributeValueImpl - the attribute value instance
Returns:
the string value

getTypeId

int getTypeId()
Returns the attribute type Id.

Returns:
the attribute type Id

getValue

java.lang.Object getValue(AttributeValueWithType attributeValueImpl)
Gets the value object of the given attribute value instance.

Parameters:
attributeValueImpl - the attribute value instance
Returns:
the value object

setStringValue

void setStringValue(AttributeValueWithType attributeValueImpl,
                    java.lang.String stringValue)
                    throws EpBindException
Sets the given attribute value with the given string value.

Parameters:
attributeValueImpl - the attribute value instance
stringValue - the string value to set
Throws:
EpBindException - when the string value cannot be bound to the attribute type

setValue

void setValue(AttributeValueWithType attributeValueImpl,
              java.lang.Object value)
Sets the given value object to the given attribute value instance.

Parameters:
attributeValueImpl - the attribute value instance
value - the value object

toString

java.lang.String toString()
Returns the attribute type name.

Overrides:
toString in class java.lang.Object
Returns:
the attribute type name