net.xoetrope.xui.data.table
Class XTableModel

java.lang.Object
  extended by net.xoetrope.xui.data.XModel
      extended by net.xoetrope.xui.data.XBaseModel
          extended by net.xoetrope.xui.data.table.XTableModel
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
DatabaseTableModel, XCollectionTableModel

public abstract class XTableModel
extends XBaseModel

An interface describing the extended methods support by table models.


Field Summary
 
Fields inherited from class net.xoetrope.xui.data.XBaseModel
addByDefault, appendByDefault, attributeNames, attributeValues, ID_ATTRIBUTE, NUM_FIXED_ATTRIBUTE, VALUE_ATTRIBUTE, values
 
Fields inherited from class net.xoetrope.xui.data.XModel
parentModel, tagName
 
Constructor Summary
XTableModel()
           
 
Method Summary
abstract  java.lang.String getAttribValueAsString(int i)
          Get an attribute as a String object
abstract  java.lang.String getFieldValue(int colIdx)
          Provides iterative access to the table values.
abstract  java.lang.String getFieldValue(int rowIdx, int colIdx)
          Provides random access to the table values.
abstract  void retrieve()
          Get the table data.
abstract  void setFieldValue(int rowIdx, int colIdx, java.lang.String newValue)
          Set a field value
abstract  void setFieldValue(int colIdx, java.lang.String newValue)
          Set a field value
abstract  void sync()
          Syncs the model with the service response is the xtable has been changed or if the node has timed out.
 
Methods inherited from class net.xoetrope.xui.data.XBaseModel
append, append, get, get, get, getAddByDefault, getAppendByDefault, getAttribFromPath, getAttribName, getAttribute, getAttribValue, getAttribValueAsDouble, getAttribValueAsDouble, getAttribValueAsInt, getBaseFromPath, getChildExists, getId, getModel, getNumAttributes, getNumChildren, getValueAsDouble, getValueAsInt, getValueAsString, hasAutoId, hasAutoId, hashCode, insertChildAt, remove, removeAttributes, removeChild, removeChild, removeChildren, set, set, setAddByDefault, setAppendByDefault, setAttribValue, setAttribValue, setId, setNumAttributes, setNumChildren, swapNodes
 
Methods inherited from class net.xoetrope.xui.data.XModel
addModelListener, clear, fireModelUpdated, getParent, getTagName, prefixOutputPath, reset, resetAttributes, setParent, setTagName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XTableModel

public XTableModel()
Method Detail

getAttribValueAsString

public abstract java.lang.String getAttribValueAsString(int i)
Get an attribute as a String object

Overrides:
getAttribValueAsString in class XBaseModel
Parameters:
i - The index of the attributeValues array whose value we want
Returns:
The string value of the attributeValues array at position i

getFieldValue

public abstract java.lang.String getFieldValue(int colIdx)
Provides iterative access to the table values. The current row in the table is used to index the data. This method does not implicitly retrieve the data so you must call the retrieve method explicitly.

Parameters:
colIdx - the column of field index
Returns:
the data

getFieldValue

public abstract java.lang.String getFieldValue(int rowIdx,
                                               int colIdx)
Provides random access to the table values. This method does not implicitly retrieve the data so you must call the retrieve method explicitly.

Parameters:
rowIdx - the row index
colIdx - the column of field index
Returns:
the data

setFieldValue

public abstract void setFieldValue(int colIdx,
                                   java.lang.String newValue)
Set a field value

Parameters:
colIdx - the field index, zero based
newValue - the new field value

setFieldValue

public abstract void setFieldValue(int rowIdx,
                                   int colIdx,
                                   java.lang.String newValue)
Set a field value

Parameters:
rowIdx - the row index, zero based
colIdx - the field index, zero based
newValue - the new field value

retrieve

public abstract void retrieve()
Get the table data.


sync

public abstract void sync()
Syncs the model with the service response is the xtable has been changed or if the node has timed out.