| java.lang.Object net.xoetrope.xui.data.XModel net.xoetrope.optional.data.sql.DatabaseRowModel
DatabaseRowModel | public class DatabaseRowModel extends XModel (Code) | | Provides a model for table rows. The attributes are equivalent to the row
fields. The row will have no children. As a Java object the fields and rows
indices are zero based in contrast to the JDBC indexing setup.
Copyright (c) Xoetrope Ltd. 2001-2003
$Revision: 1.1 $
|
rowIdx | protected int rowIdx(Code) | | |
DatabaseRowModel | public DatabaseRowModel()(Code) | | Default constructor, no table or row is referenced
|
DatabaseRowModel | public DatabaseRowModel(DatabaseTableModel table, int row)(Code) | | Construct a model node for a table
Parameters: table - the table to reference Parameters: row - the row to reference |
append | public void append(XModel newObject)(Code) | | Append a node
Parameters: childNode - the child node |
get | public Object get(String attribName)(Code) | | Get a field value
Parameters: attribName - the field name |
getAttribValue | public Object getAttribValue(int i)(Code) | | Get the value of an attribute
Parameters: i - |
getAttribValueAsDouble | public double getAttribValueAsDouble(int i)(Code) | | Parameters: i - The index of the attributeValues array whose value we want The double value of the attributeValues array at position i |
getAttribValueAsInt | public int getAttribValueAsInt(int i)(Code) | | Parameters: i - The index of the attributeValues array whose value we want The int value of the attributeValues array at position i |
getAttribValueAsString | public String getAttribValueAsString(int i)(Code) | | |
getAttribute | public int getAttribute(String attribName)(Code) | | |
getDouble | public double getDouble(String attribName)(Code) | | Get a field value as an double
Parameters: attribName - the fieldName the value |
getFieldValue | public String getFieldValue(int fieldIdx)(Code) | | Gets an individual field value
Parameters: fieldIdx - the field index the value |
getInt | public int getInt(String attribName)(Code) | | Get a field value as an int
Parameters: attribName - the fieldName the value |
getNumChildren | public int getNumChildren()(Code) | | Gets the number of fields for this row
the number of fields |
getString | public String getString(String attribName)(Code) | | Get a field value as an String
Parameters: attribName - the fieldName the value |
getTagName | public String getTagName()(Code) | | Gets the model element tag name, e.g. 'Component' from the XML fragment
|
getValue | public String getValue()(Code) | | Get the value of the first field in this row
|
getValue | public XModel getValue(int i)(Code) | | Get the value of a field as a model node
Parameters: i - the field index the new field model node |
getValueAsDouble | public double getValueAsDouble(String elementName)(Code) | | Get a field as a double value
Parameters: elementName - the field name |
getValueAsInt | public int getValueAsInt(String elementName)(Code) | | |
getValueAsString | public String getValueAsString(String elementName)(Code) | | Gets the value attribute of the specified node as a string.
Parameters: elementName - the value as a string |
hashCode | public int hashCode()(Code) | | Get the hashcode for this row
the row id |
remove | public void remove(XModel node)(Code) | | Remove a node
Parameters: childnode - node to be removed |
setAttribValue | public void setAttribValue(int i, Object value)(Code) | | |
setFieldValue | public void setFieldValue(int colIdx, String newValue)(Code) | | Set the value of a field
Parameters: colIdx - the field index Parameters: newValue - the new field value |
setRowReference | public void setRowReference(DatabaseTableModel table, int row)(Code) | | Set the row to reference
Parameters: table - the table to reference Parameters: row - the row to reference |
|
|