com.azalient.api.file
Interface TableR

All Superinterfaces:
ITable, ITableType, Table
All Known Subinterfaces:
IMatrix, IPastableStore<I>, IStore<I>, TableRW
All Known Implementing Classes:
AbstractTableR, AbstractTableRW

public interface TableR
extends Table

An interface to a table that can be read from the file (but not necessarily written back to the file).

A table of this type is created by reading a file and then "Setting" the data in each field in a record.

This does not mean that the records in the table are readable.


Method Summary
 Object columnNameObject(String name)
          Map a column name to a column name object.
 void finishedR(Page page)
          The reader is finished
 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
 RecordR row(Object[] rowKey)
          Return a reference to a Record (a row object).
 boolean rowExists(Object[] rowKey)
          Return true if a record already exists with this key.
 
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

Object columnNameObject(String name)
Map a column name to a column name object. The object can be the name itself, or something easier to match (like an integer) if you want to increase the performance. However, improvements in Java 1.5/1.6 with String.equals() mean that this is probably not required.

Parameters:
name - the name of the column
Returns:
the column name object, null means column does not exist

row

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.


rowExists

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


invalidate

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


finishedR

void finishedR(Page page)
The reader is finished


notFound

void notFound(OpeningStatus ps)
The reader tried to parse the table but didn't find it


open

boolean open()
read the table from model's current open file


open

void open(OpeningStatus ps)
read the store from model's current open file