Skip navigation links


com.fatwire.assetapi.data
Interface AttributeData

All Known Implementing Classes:
AttributeDataImpl

public interface AttributeData

This interface represents data that is associated with an attribute.

The name of the attribute can be accessed using AttributeData.getAttributeName(). AttributeData.getData() returns data associated with the attribute, the return type for which is based in the type of attribute. Type can be inspected using AttributeData.getType().

The following table maps CS types to the Java types that AttributeData.getData() returns.

CS Data type Java Type
INT Integer
FLOAT Double
STRING String
DATE Date
MONEY Double
LONG Long
LARGE_TEXT String
ASSET AssetId
BLOB BlobObject

Method Summary
 void addData(java.lang.Object data)
          append a data to the AttributeData list if the attribute is multi-valued.
 AttributeDef getAttributeDef()
          Returns attribute definition for this attribute.
 java.lang.String getAttributeName()
          Returns name of the attribute for which this instance represents data
 java.lang.Object getData()
          Returns handle to the raw data.
 java.util.List getDataAsList()
          Returns handle to data when data is multi valued.
 AttributeTypeEnum getType()
          Indicates the type of data contained.
 void removeData(java.lang.Object data)
          remove a data from the attribute
 void setData(java.lang.Object data)
          sets data to the AttributeData
 void setDataAsList(java.util.List data)
          sets data aslist to the AttributeData

 

Method Detail

getAttributeName

java.lang.String getAttributeName()
Returns name of the attribute for which this instance represents data
Returns:
name of the attribute

getType

AttributeTypeEnum getType()
Indicates the type of data contained.
Returns:
corresponding type as AttributeTypeEnum

getData

java.lang.Object getData()
Returns handle to the raw data.
Returns:
data

getAttributeDef

AttributeDef getAttributeDef()
Returns attribute definition for this attribute.
Returns:
Attribute definition for which this instance is data for.

getDataAsList

java.util.List getDataAsList()
Returns handle to data when data is multi valued.
Returns:
list of data (for multi valued attributes)

setData

void setData(java.lang.Object data)
sets data to the AttributeData
Parameters:
data - data to add

setDataAsList

void setDataAsList(java.util.List data)
sets data aslist to the AttributeData
Parameters:
data - data to add

addData

void addData(java.lang.Object data)
append a data to the AttributeData list if the attribute is multi-valued. Else it will replace the exisiting data
Parameters:
data - data to add

removeData

void removeData(java.lang.Object data)
remove a data from the attribute
Parameters:
data - the data to remove

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.