org.hsqldb
Class CachedRow

java.lang.Object
  extended byorg.hsqldb.Row
      extended byorg.hsqldb.CachedRow

public class CachedRow
extends org.hsqldb.Row

In-memory representation of a disk-based database row object with methods for serialization and de-serialization.
A CachedRow is normally part of a circular double linked list which contians all the Rows currently in the Cache for the database. It is unlinked from this list when it is freed from the Cache to make way for other rows.

Version:
1.7.2

Field Summary
protected  boolean hasChanged
          Flag indicating any change to the Nodes or table row data.
protected  boolean hasDataChanged
          Flag indicating the row data has changed too.
protected  org.hsqldb.Node nPrimaryNode
           
protected  Object[] oData
           
protected  Table tTable
           
 
Constructor Summary
CachedRow(Table t, Object[] o)
          Constructor for new Rows.
CachedRow(Table t, RowInputInterface in)
          constructor when read from the disk into the Cache
 
Method Summary
 Object[] getData()
          Returns the array of fields in the database row.
 Table getTable()
          Returns the table which this Row belongs to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tTable

protected Table tTable

hasChanged

protected boolean hasChanged
Flag indicating any change to the Nodes or table row data.


hasDataChanged

protected boolean hasDataChanged
Flag indicating the row data has changed too.


oData

protected Object[] oData

nPrimaryNode

protected org.hsqldb.Node nPrimaryNode
Constructor Detail

CachedRow

public CachedRow(Table t,
                 Object[] o)
          throws HsqlException
Constructor for new Rows. This is currently the only place where hasDataChanged is set to true as the current implementation of database row updates performs a delete followed by an insert. This means that once a row is created its data cannot change. (correct as of version 1_7_2_alpha_n)


CachedRow

public CachedRow(Table t,
                 RowInputInterface in)
          throws IOException,
                 HsqlException
constructor when read from the disk into the Cache

Method Detail

getTable

public Table getTable()
Returns the table which this Row belongs to.


getData

public Object[] getData()
Returns the array of fields in the database row. If the table has no primary index, an extra internal field is included in the last position of this array.



Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.