com.esri.adf.web.ags.data.edit
Class Attribute

java.lang.Object
  extended by com.esri.adf.web.ags.data.edit.Attribute
All Implemented Interfaces:
Serializable

public class Attribute
extends Object
implements Serializable

Defines a feature attribute. A feature attribute contains information about a field of a feature such as name, type and value.

 Attribute att = new Attribute(index, name, esriFieldType.esriFieldTypeInteger, value);
 
 UpdateAttribute action = new UpdateAttribute(feature, att);
 

See Also:
Serialized Form

Field Summary
static String NULL_STRING
          A string for "null" value.
 
Constructor Summary
Attribute(com.esri.arcgis.geodatabase.IField field, int index, String value)
          Instantiates an object of Attribute.
Attribute(int index, String name, int type, String value)
          Instantiates an object of Attribute.
 
Method Summary
 boolean equals(Object obj)
           
 String getAlias()
          Gets the alias of the Attribute.
 int getIndex()
          Gets the index of the attribute when retrieved from a feature.
 String getName()
          Gets the name of the attribute.
 int getType()
          Gets the type of the attribute.
 String getValue()
          Gets the value of the attribute.
 Map<String,String> getValueList()
          Gets the available values of the Attribute.
 int hashCode()
           
 boolean isDirty()
          Returns true if the attribute is changed but has not been synch back to the associated feature.
 boolean isReadOnly()
          Returns true if the attribute is read only.
 void setAlias(String alias)
          Sets the alias of the Attribute.
 void setDirty(boolean dirty)
          Sets to true if the attribute is changed but has not been synch back to the associated feature.
 void setIndex(int index)
          Sets the index of the attribute when retrieved from a feature.
 void setName(String name)
          Sets the name of the attribute.
 void setReadOnly(boolean readonly)
          Sets to true if the attribute is read only.
 void setType(int type)
          Sets the type of the attribute.
 void setValue(String value)
          Sets the value of the attribute.
 void setValueList(Map<String,String> valueList)
          Sets the available values of the Attribute.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_STRING

public static String NULL_STRING
A string for "null" value.

Constructor Detail

Attribute

public Attribute(int index,
                 String name,
                 int type,
                 String value)
Instantiates an object of Attribute.

Parameters:
index - the index of the attribute when retrieved from a feature.
value - the value converted as a String
name - the name of the field.
type - the attribute type. It is an esriFieldType constant.

Attribute

public Attribute(com.esri.arcgis.geodatabase.IField field,
                 int index,
                 String value)
          throws Exception
Instantiates an object of Attribute.

Parameters:
field - the IField of the feature.
index - the index of the field
value - the field value as a string.
Throws:
Exception
Method Detail

getValue

public String getValue()
Gets the value of the attribute. The value is always represented as a String regardless the real type.

Returns:
Returns the value.

setValue

public void setValue(String value)
Sets the value of the attribute. The value is always represented as a String regardless the real type.

Parameters:
value - The value to set.

getValueList

public Map<String,String> getValueList()
Gets the available values of the Attribute. If the attribute is a subtype or a domain, it may have a value list.

Returns:
Returns the value list.

setValueList

public void setValueList(Map<String,String> valueList)
Sets the available values of the Attribute. If the attribute is a subtype or a domain, it may have a value list.

Parameters:
valueList - The value list to set.

getName

public String getName()
Gets the name of the attribute.

Returns:
Returns the name.

getType

public int getType()
Gets the type of the attribute. It is an esriFieldType constant.

Returns:
Returns the type.

getIndex

public int getIndex()
Gets the index of the attribute when retrieved from a feature.

Returns:
Returns the index.

setIndex

public void setIndex(int index)
Sets the index of the attribute when retrieved from a feature.

Parameters:
index - The index to set.

setName

public void setName(String name)
Sets the name of the attribute.

Parameters:
name - The name to set.

setType

public void setType(int type)
Sets the type of the attribute. It is an esriFieldType constant.

Parameters:
type - The type to set.

getAlias

public String getAlias()
Gets the alias of the Attribute.

Returns:
Returns the alias.

setAlias

public void setAlias(String alias)
Sets the alias of the Attribute.

Parameters:
alias - The alias to set.

isDirty

public boolean isDirty()
Returns true if the attribute is changed but has not been synch back to the associated feature.

Returns:
Returns true if the attribute is dirty.

setDirty

public void setDirty(boolean dirty)
Sets to true if the attribute is changed but has not been synch back to the associated feature.

Parameters:
dirty - Sets to true if the attribute is dirty.

isReadOnly

public boolean isReadOnly()
Returns true if the attribute is read only.

Returns:
Returns true if the attribute is read only.

setReadOnly

public void setReadOnly(boolean readonly)
Sets to true if the attribute is read only.

Parameters:
readonly - Sets to true if the attribute is read only.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object