TemporaryDatabase
Class TableData

java.lang.Object
  |
  +--TemporaryDatabase.TableData

class TableData
extends Object

Temporary (in memory) database table.

Author:
chris.studholme@utoronto.ca

Field Summary
 ArrayList columns
           
 String name
           
private  int nrows
           
private  int ref_count
           
private  ArrayList rows
           
 long sig
           
 
Constructor Summary
TableData(String name)
           
 
Method Summary
 int access()
           
 int add()
          Add a new row.
 Object[] get(int rowid)
          Get a row of data.
 int maxStringLength(int index)
           
 void release()
          Release access to table data.
 void remove(int rowid)
          Delete a row of data.
 long size()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

name

public String name

columns

public ArrayList columns

rows

private ArrayList rows

nrows

private int nrows

sig

public long sig

ref_count

private int ref_count
Constructor Detail

TableData

public TableData(String name)
Method Detail

access

public int access()

release

public void release()
Release access to table data.

size

public long size()

add

public int add()
Add a new row. The new row is added to the end of the table and the number of row addresses (after adding the row) is returned. The new row can then be accessed with get(returned_value-1).
Returns:
number of row addresses in table

remove

public void remove(int rowid)
Delete a row of data.

get

public Object[] get(int rowid)
Get a row of data. If the row referenced by rowid has been removed, null will be returned.
Returns:
column array or null if row has been removed

maxStringLength

public int maxStringLength(int index)