org.outerj.grouping
Class Table

java.lang.Object
  extended byorg.outerj.grouping.Table

public final class Table
extends java.lang.Object

A simple table structure. Upon construction of the Table, id's should be specified for the columns in the table. The number of columns cannot be changed after construction, only the number of rows.

Internally, everything is store in one big long array.


Field Summary
protected  java.util.HashMap columnDefinitionsById
           
protected  java.lang.String[] columnIds
           
 
Constructor Summary
Table(java.lang.String[] columnIds)
           
 
Method Summary
 void addRow()
           
 int getColumnCount()
           
 int getRowCount()
           
 java.lang.Object getValue(int rowIndex, int columnIndex)
           
 java.lang.Object getValue(int rowIndex, java.lang.String columnId)
           
 java.lang.Object[] getValues(int rowIndex, java.lang.String[] selectionColIds)
           
 void setValue(int rowIndex, int columnIndex, java.lang.Object value)
           
 void setValue(int rowIndex, java.lang.String columnId, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columnIds

protected java.lang.String[] columnIds

columnDefinitionsById

protected java.util.HashMap columnDefinitionsById
Constructor Detail

Table

public Table(java.lang.String[] columnIds)
Method Detail

addRow

public final void addRow()

setValue

public final void setValue(int rowIndex,
                           int columnIndex,
                           java.lang.Object value)

getValue

public final java.lang.Object getValue(int rowIndex,
                                       int columnIndex)

getValue

public final java.lang.Object getValue(int rowIndex,
                                       java.lang.String columnId)

getValues

public final java.lang.Object[] getValues(int rowIndex,
                                          java.lang.String[] selectionColIds)

setValue

public final void setValue(int rowIndex,
                           java.lang.String columnId,
                           java.lang.Object value)

getRowCount

public final int getRowCount()

getColumnCount

public final int getColumnCount()