IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.plugins.io.datadescriptor
Interface Attribute


public interface Attribute

Identifies an attribute. The attribute name and type are required. Use DataDescriptorFactory.createAttribute() methods to create an Attribute instance.

Since:
7.1.1
See Also:
DataDescriptorFactory, DataDescriptor, EmbeddedType

Method Summary
 String getAttributeName()
          Retrieves the name of the attribute.
 AttributeType getAttributeType()
          Retrieves the type of the attribute.
 EmbeddedType getEmbeddedType()
          Retrieves the embedded attribute type.
 boolean isCollection()
          Returns true if the attribute has zero or more values.
 void setAttributeName(String attributeName)
          Sets the name of the attribute.
 void setAttributeType(AttributeType attributeType)
          The type of the attribute.
 void setCollection(boolean isCollection)
          Identifies the attribute as a collection attribute values.
 void setEmbeddedType(EmbeddedType embeddedType)
          The type of the embedded attribute.
 

Method Detail

getAttributeName

String getAttributeName()
Retrieves the name of the attribute.

Returns:
the name of the attribute or null if not yet set.

setAttributeName

void setAttributeName(String attributeName)
Sets the name of the attribute.

Attributes names must include letters, digits and the underscore '_' character. Spaces and special characters are not permitted.

Parameters:
attributeName - the name of the attribute. Must not be null.
Throws:
IllegalStateException - if the attribute has been initialized.

getAttributeType

AttributeType getAttributeType()
Retrieves the type of the attribute.

Returns:
the type of the attribute or null if not yet set.

setAttributeType

void setAttributeType(AttributeType attributeType)
The type of the attribute. If the type is AttributeType.EMBEDDED, then the EmbeddedType must also be set.

Parameters:
attributeType - the type of the attribute. Must not be null.
Throws:
IllegalStateException - if the attribute has been initialized.

getEmbeddedType

EmbeddedType getEmbeddedType()
Retrieves the embedded attribute type.

Returns:
the embedded attribute type or null if the type is not an EmbeddedType.

setEmbeddedType

void setEmbeddedType(EmbeddedType embeddedType)
The type of the embedded attribute. If set, the AttributeType must be set to AttributeType.EMBEDDED

Parameters:
embeddedType - the embedded type of the attribute or null if the type is not an EmbeddedType.
Throws:
IllegalStateException - if the attribute has been initialized.

isCollection

boolean isCollection()
Returns true if the attribute has zero or more values.

Returns:
true if the attribute has zero or more values, false if there is zero or one.

setCollection

void setCollection(boolean isCollection)
Identifies the attribute as a collection attribute values. Collections of attribute values can have zero or more instances set.

Parameters:
isCollection - answrs true if the attribute is a collection.
Throws:
IllegalStateException - if the attribute has been initialized.

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.