com.azalient.api.file.table
Class AbstractTableR

java.lang.Object
  extended by com.azalient.api.file.record.TypeObject
      extended by com.azalient.api.file.record.ReaderUtilities
          extended by com.azalient.api.file.table.AbstractTable
              extended by com.azalient.api.file.table.AbstractTableR
All Implemented Interfaces:
ITable, ITableType, Table, TableR

public abstract class AbstractTableR
extends AbstractTable
implements TableR

a base class for a readable table, in this package to use WorkBook


Method Summary
 Object columnNameObject(String name)
          Map a column header name to a column key.
 void finishedR(Page page)
          The reader is finished with the table
 void invalidate(RecordR record)
          This allows a record to remove itself, commonly from within the finished() method, after checking its own validity
 void notFound(OpeningStatus ps)
          The reader tried to parse the table but didn't find it
 boolean open()
          read the table from model's current open file
 void open(OpeningStatus ps)
          read the store from model's current open file
abstract  RecordR row(Object[] rowKey)
          Return a reference to a Record (a row object).
abstract  boolean rowExists(Object[] rowKey)
          Return true if a record already exists with this key.
 
Methods inherited from class com.azalient.api.file.table.AbstractTable
colNameObjects, destroy, headerRows, keyTypes, newPage, page, pageName, pageType, tableName, toString
 
Methods inherited from class com.azalient.api.file.record.TypeObject
b, c, d, equals, equals, equalsEW, f, i, keyString, keyString, nameFromKeyString, rowKeysFromKeyString, s, t, t
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.azalient.api.file.Table
destroy, headerRows, keyTypes
 
Methods inherited from interface com.azalient.api.a.tables.ITable
page, pageName
 
Methods inherited from interface com.azalient.api.a.tables.ITableType
colNameObjects, pageType, tableName
 

Method Detail

columnNameObject

public Object columnNameObject(String name)
Map a column header name to a column key. The key can be the name itself, or something easier to match (like an integer) if you want to increase the performance

Specified by:
columnNameObject in interface TableR
Parameters:
name - the name of the column
Returns:
the column key, where null means the column does not exist

invalidate

public void invalidate(RecordR record)
This allows a record to remove itself, commonly from within the finished() method, after checking its own validity

Specified by:
invalidate in interface TableR

row

public abstract RecordR row(Object[] rowKey)
Return a reference to a Record (a row object). On reading, the Record may already exist, or it may be created as a result of this call.

Specified by:
row in interface TableR

rowExists

public abstract boolean rowExists(Object[] rowKey)
Description copied from interface: TableR
Return true if a record already exists with this key. This is used to prevent duplicates from being read (particularly on base pages)

Specified by:
rowExists in interface TableR

finishedR

public void finishedR(Page page)
The reader is finished with the table

Specified by:
finishedR in interface TableR

notFound

public void notFound(OpeningStatus ps)
Description copied from interface: TableR
The reader tried to parse the table but didn't find it

Specified by:
notFound in interface TableR

open

public void open(OpeningStatus ps)
Description copied from interface: TableR
read the store from model's current open file

Specified by:
open in interface TableR

open

public boolean open()
Description copied from interface: TableR
read the table from model's current open file

Specified by:
open in interface TableR