net.xoetrope.optional.data.sql
Class DatabaseRowModel

java.lang.Object
  extended by net.xoetrope.xui.data.XModel
      extended by net.xoetrope.xui.data.table.XRowModel
          extended by net.xoetrope.optional.data.sql.DatabaseRowModel

public class DatabaseRowModel
extends XRowModel

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.

The class is not intended to be used directly except in rare circumstances, instead most access will be via the model and bindings or via the DatabaseTableModel class

Copyright (c) Xoetrope Ltd. 2001-2003

$Revision: 2.7 $ License: see license.txt


Field Summary
 
Fields inherited from class net.xoetrope.xui.data.table.XRowModel
rowIdx, sourceData
 
Fields inherited from class net.xoetrope.xui.data.XModel
parentModel, tagName
 
Constructor Summary
DatabaseRowModel()
          Default constructor, no table or row is referenced
DatabaseRowModel(DatabaseTableModel table, int row)
          Construct a model node for a table
 
Method Summary
 int getNumChildren()
          Gets the number of fields for this row
 
Methods inherited from class net.xoetrope.xui.data.table.XRowModel
append, append, get, get, get, getAttribName, getAttribute, getAttribValue, getAttribValueAsDouble, getAttribValueAsDouble, getAttribValueAsInt, getAttribValueAsString, getDouble, getFieldValue, getId, getInt, getString, getTable, getTagName, getValue, getValue, getValueAsDouble, getValueAsInt, getValueAsString, hashCode, remove, set, set, setAttribValue, setAttribValue, setFieldValue, setRowReference
 
Methods inherited from class net.xoetrope.xui.data.XModel
addModelListener, clear, fireModelUpdated, getNumAttributes, getParent, hasAutoId, hasAutoId, prefixOutputPath, removeChildren, reset, resetAttributes, setId, setNumAttributes, setNumChildren, setParent, setTagName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseRowModel

public DatabaseRowModel()
Default constructor, no table or row is referenced


DatabaseRowModel

public DatabaseRowModel(DatabaseTableModel table,
                        int row)
Construct a model node for a table

Parameters:
table - the table to reference
row - the row to reference
Method Detail

getNumChildren

public int getNumChildren()
Gets the number of fields for this row

Overrides:
getNumChildren in class XRowModel
Returns:
the number of fields