com.azalient.api.file.table
Class AbstractTableW

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.AbstractTableW
All Implemented Interfaces:
ITable, ITableType, Table, TableW
Direct Known Subclasses:
AbstractResultsTable, AbstractTableRW

public abstract class AbstractTableW
extends AbstractTable
implements TableW

A base class for a write-only table, in this package to use WorkBook. This type of table might be used for logging results which do not need to be read back in.


Method Summary
 String columnName(Object key)
          Map a column key to a printable name.
 void finishedW(PageW page)
          The writer is finished with the table
 CellF format(Object colKey, int row)
          Return the format for (column, row) cell.
abstract  RecordW[] recordArray()
          Return an array all records.
 boolean save()
          save the table to current open file
 void save(SavingStatus ss)
          save the table to current open file
 int width(Object col)
          Return -1 to get the default width for a column
 
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.TableW
newPage
 
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

recordArray

public abstract RecordW[] recordArray()
Return an array all records. Each record is then queried (in sequential order) to extract the data from each field. The data in each field should be one of the primitive types described in RecordW

Specified by:
recordArray in interface TableW
Returns:
An array of all records, giving access to each field

columnName

public String columnName(Object key)
Map a column key to a printable name. The key may be a string and may just be the name, but this part of the interface allows you to use integers or other objects for better performance, which might be important on large pages.

Specified by:
columnName in interface TableW
Parameters:
key - the column key, which may be the same as the name
Returns:
the name of this column

format

public CellF format(Object colKey,
                    int row)
Return the format for (column, row) cell. Null means appply default format

Specified by:
format in interface TableW
Parameters:
colKey - The key specifying the column of the cell to be formatted
row - The row index for the cell to be formatted
Returns:
the cell format, which can be null

width

public int width(Object col)
Return -1 to get the default width for a column

Specified by:
width in interface TableW

finishedW

public void finishedW(PageW page)
The writer is finished with the table

Specified by:
finishedW in interface TableW

save

public void save(SavingStatus ss)
Description copied from interface: TableW
save the table to current open file

Specified by:
save in interface TableW

save

public boolean save()
Description copied from interface: TableW
save the table to current open file

Specified by:
save in interface TableW