org.formaria.data.sql
Class DatabaseRowModel

java.lang.Object
  extended by org.formaria.aria.data.DataModel
      extended by org.formaria.aria.data.table.RowModel
          extended by org.formaria.data.sql.DatabaseRowModel

public class DatabaseRowModel
extends RowModel

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) Formaria Ltd. 2008

$Revision: 2.7 $ License: see license.txt


Field Summary
 
Fields inherited from class org.formaria.aria.data.table.RowModel
rowIdx, sourceData
 
Fields inherited from class org.formaria.aria.data.DataModel
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 org.formaria.aria.data.table.RowModel
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 org.formaria.aria.data.DataModel
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 RowModel
Returns:
the number of fields