org.ujac.util.table
Interface Table

All Superinterfaces:
TableConstants, UjacTypes
All Known Implementing Classes:
BaseTable, BeanTable, DataTable, FilteredTable, PivotTable, ReportTable, ResultSetTable

public interface Table
extends TableConstants

Name: Table
Description: A common interface for tables.

Author:
lauerc

Field Summary
 
Fields inherited from interface org.ujac.util.table.TableConstants
DEFAULT_DATE_FORMAT, DEFAULT_DOUBLE_FORMAT, DEFAULT_INTEGER_FORMAT, DEFAULT_TIME_FORMAT, DEFAULT_TIMESTAMP_FORMAT, ROW_TYPE_FOOTER, ROW_TYPE_GROUP, ROW_TYPE_GROUP_TITLE, ROW_TYPE_HEADER, ROW_TYPE_NORMAL
 
Fields inherited from interface org.ujac.util.UjacTypes
TYPE_BOOLEAN, TYPE_DATE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_NAME_BOOLEAN, TYPE_NAME_DATE, TYPE_NAME_DOUBLE, TYPE_NAME_FLOAT, TYPE_NAME_INT, TYPE_NAME_LONG, TYPE_NAME_OBJECT, TYPE_NAME_SHORT, TYPE_NAME_STRING, TYPE_NAME_TABLE, TYPE_NAME_TIME, TYPE_NAME_TIMESTAMP, TYPE_OBJECT, TYPE_SHORT, TYPE_STRING, TYPE_TABLE, TYPE_TIME, TYPE_TIMESTAMP
 
Method Summary
 Table addBoolean(String name, boolean value)
          Adds a column of type boolean to the table and sets its initial value at the first row.
 Column addColumn(String name, int type)
          Adds a column to the table
 Column addColumn(String name, int type, LayoutHints layoutHints)
          Adds a column to the table
 Table addDate(String name, Date value)
          Adds a column of type Date to the table and sets its initial value at the first row.
 Table addDouble(String name, double value)
          Adds a column of type double to the table and sets its initial value at the first row.
 Table addFloat(String name, float value)
          Adds a column of type float to the table and sets its initial value at the first row.
 Table addInt(String name, int value)
          Adds a column of type int to the table and sets its initial value at the first row.
 Table addLong(String name, long value)
          Adds a column of type long to the table and sets its initial value at the first row.
 Row addRow()
          Adds a row to the table
 Row addRow(Row srcRow)
          Adds a row to the table
 Table addString(String name, String value)
          Adds a column of type String to the table and sets its initial value at the first row.
 Table addTime(String name, Date value)
          Adds a column of type Date to the table and sets its initial value at the first row.
 Table addTimestamp(String name, Date value)
          Adds a column of type Date to the table and sets its initial value at the first row.
 Table copyTable()
          Copies the table.
 boolean getBoolean(int rowIdx, int columnIdx)
          Gets the boolean value from the given row.
 boolean getBoolean(int rowIdx, String columnName)
          Gets the boolean value from the given row.
 Column getColumn(int index)
          Gets the column at the given index.
 Column getColumn(String name)
          Gets the column with the given name.
 int getColumnCount()
          Gets the current number of columns.
 int getColumnIndex(String name)
          Gets the index of the given column name.
 Date getDate(int rowIdx, int columnIdx)
          Gets the Date value from the given row.
 Date getDate(int rowIdx, String columnName)
          Gets the Date value from the given row.
 Set getDistinctValues(int columnIdx)
          Gets the distinct values of the specified column.
 Set getDistinctValues(String columnName)
          Gets the distinct values of the specified column.
 double getDouble(int rowIdx, int columnIdx)
          Gets the double value from the given row.
 double getDouble(int rowIdx, String columnName)
          Gets the double value from the given row.
 float getFloat(int rowIdx, int columnIdx)
          Gets the float value from the given row.
 float getFloat(int rowIdx, String columnName)
          Gets the float value from the given row.
 FormatHelper getFormatHelper()
          Getter method for the the property formatHelper.
 Row getHeaderRow()
          Gets the header row.
 int getInt(int rowIdx, int columnIdx)
          Gets the integer value from the given row.
 int getInt(int rowIdx, String columnName)
          Gets the integer value from the given row.
 long getLong(int rowIdx, int columnIdx)
          Gets the long value from the given row.
 long getLong(int rowIdx, String columnName)
          Gets the long value from the given row.
 Object getObject(int rowIdx, int columnIdx)
          Gets the Object value from the given row at the given column.
 Object getObject(int rowIdx, String columnName)
          Gets the Object value from the given row at the given column.
 Row getRow(int rowIdx)
          Gets a row from the table
 int getRowCount()
          Gets the current number of rows.
 String getString(int rowIdx, int columnIdx)
          Gets the String value from the given row at the given column.
 String getString(int rowIdx, String columnName)
          Gets the String value from the given row at the given column.
 Date getTime(int rowIdx, int columnIdx)
          Gets the Time value from the given row.
 Date getTime(int rowIdx, String columnName)
          Gets the Date value from the given row.
 Date getTimestamp(int rowIdx, int columnIdx)
          Gets the Timestamp value from the given row.
 Date getTimestamp(int rowIdx, String columnName)
          Gets the Timestamp value from the given row.
 TypeConverter getTypeConverter()
          Getter method for the the property typeConverter.
 Column[] getVisibleColumns()
          Gets all visible columns.
 Column[] getVisibleColumns(int levelFilter)
          Gets all visible columns.
 boolean isEmpty()
          Checks if the table is empty.
 Iterator iterator()
          Returns an iterator over the rows in this table in proper sequence.
 void orderColumns(String[] columnNames)
          Orders the sequence of report columns according to the list of given column names.
 void removeRow(int rowIdx)
          Removes a row from the table
 void renameColumn(Column column, String name)
          Renames a column.
 void setBoolean(int rowIdx, int columnIdx, boolean value)
          Sets the boolean value at the given row.
 void setBoolean(int rowIdx, String columnName, boolean value)
          Sets the boolean value at the given row.
 void setColumnType(int columnIdx, int typeId)
          Changes the type of the given column.
 void setColumnType(String columnName, int typeId)
          Changes the type of the given column.
 void setDate(int rowIdx, int columnIdx, Date value)
          Sets the Date value at the given row.
 void setDate(int rowIdx, String columnName, Date value)
          Sets the Time value at the given row.
 void setDouble(int rowIdx, int columnIdx, double value)
          Sets the double value at the given row.
 void setDouble(int rowIdx, String columnName, double value)
          Sets the double value at the given row.
 void setFloat(int rowIdx, int columnIdx, float value)
          Sets the float value at the given row.
 void setFloat(int rowIdx, String columnName, float value)
          Sets the float value at the given row.
 void setFormatHelper(FormatHelper formatHelper)
          Setter method for the the property formatHelper.
 void setInt(int rowIdx, int columnIdx, int value)
          Sets the integer value at the given row.
 void setInt(int rowIdx, String columnName, int value)
          Sets the integer value at the given row.
 void setLong(int rowIdx, int columnIdx, long value)
          Sets the long value at the given row.
 void setLong(int rowIdx, String columnName, long value)
          Sets the integer value at the given row.
 void setObject(int rowIdx, int columnIdx, Object value)
          Sets the Object value at the given row.
 void setObject(int rowIdx, String columnName, Object value)
          Sets the Object value at the given row.
 void setString(int rowIdx, int columnIdx, String value)
          Sets the String value at the given row.
 void setString(int rowIdx, String columnName, String value)
          Sets the String value at the given row.
 void setTime(int rowIdx, int columnIdx, Date value)
          Sets the Date value at the given row.
 void setTime(int rowIdx, String columnName, Date value)
          Sets the Time value at the given row.
 void setTimestamp(int rowIdx, int columnIdx, Date value)
          Sets the Timestamp value at the given row.
 void setTimestamp(int rowIdx, String columnName, Date value)
          Sets the Timestamp value at the given row.
 void setTypeConverter(TypeConverter typeConverter)
          Setter method for the the property typeConverter.
 void sort(CompareItem[] compareColumns)
          Sorts the table according to the given compare item definitions.
 void sort(int columnIdx, int direction)
          Sorts the table according to the given column and direction.
 

Method Detail

getFormatHelper

FormatHelper getFormatHelper()
Getter method for the the property formatHelper.

Returns:
The current value of property formatHelper.

setFormatHelper

void setFormatHelper(FormatHelper formatHelper)
Setter method for the the property formatHelper.

Parameters:
formatHelper - The value to set for the property formatHelper.

getTypeConverter

TypeConverter getTypeConverter()
Getter method for the the property typeConverter.

Returns:
The current value of property typeConverter.

setTypeConverter

void setTypeConverter(TypeConverter typeConverter)
Setter method for the the property typeConverter.

Parameters:
typeConverter - The value to set for the property typeConverter.

getColumnCount

int getColumnCount()
Gets the current number of columns.

Returns:
The number of columns.

getColumn

Column getColumn(int index)
                 throws ColumnNotDefinedException
Gets the column at the given index.

Parameters:
index - The column index.
Returns:
The desired column.
Throws:
ColumnNotDefinedException - If the column does not exist.

getColumn

Column getColumn(String name)
                 throws ColumnNotDefinedException
Gets the column with the given name.

Parameters:
name - The column name.
Returns:
The desired column.
Throws:
ColumnNotDefinedException - If the column does not exist.

getColumnIndex

int getColumnIndex(String name)
                   throws ColumnNotDefinedException
Gets the index of the given column name.

Parameters:
name - The column name
Returns:
int The index of the column.
Throws:
ColumnNotDefinedException - If the column does not exist.

renameColumn

void renameColumn(Column column,
                  String name)
                  throws ColumnAlreadyDefinedException
Renames a column.

Parameters:
column - The column to rename.
name - The column name to set.
Throws:
ColumnAlreadyDefinedException - In case a column with that name already exists.

orderColumns

void orderColumns(String[] columnNames)
                  throws ColumnNotDefinedException,
                         ColumnAlreadyDefinedException
Orders the sequence of report columns according to the list of given column names.

Parameters:
columnNames - The list of column names after which to order the columns.
Throws:
ColumnNotDefinedException - In case a column from the given order list does not exist.
ColumnAlreadyDefinedException - In case a column was defined more than once at the given order list.

getVisibleColumns

Column[] getVisibleColumns()
Gets all visible columns.

Returns:
An array holding all visible columns.

getVisibleColumns

Column[] getVisibleColumns(int levelFilter)
Gets all visible columns.

Parameters:
levelFilter - The maximum level of importance to support.
Returns:
An array holding all visible columns.

getHeaderRow

Row getHeaderRow()
Gets the header row.

Returns:
The header row for the table.

iterator

Iterator iterator()
Returns an iterator over the rows in this table in proper sequence.

Returns:
an iterator over the rows in this table in proper sequence.

addColumn

Column addColumn(String name,
                 int type)
                 throws ColumnAlreadyDefinedException,
                        OperationNotSupportedException
Adds a column to the table

Parameters:
name - The column name.
type - The column type.
Returns:
The new column.
Throws:
ColumnAlreadyDefinedException - In case the column was already defined.
OperationNotSupportedException - In case the operation is not supported.

addColumn

Column addColumn(String name,
                 int type,
                 LayoutHints layoutHints)
                 throws ColumnAlreadyDefinedException,
                        OperationNotSupportedException
Adds a column to the table

Parameters:
name - The column name.
type - The column type.
layoutHints - The layout hints for the column.
Returns:
The new column.
Throws:
ColumnAlreadyDefinedException - In case the column was already defined.
OperationNotSupportedException - In case the operation is not supported.

addString

Table addString(String name,
                String value)
                throws TableException
Adds a column of type String to the table and sets its initial value at the first row.

Parameters:
name - The column name.
value - The initial value at the first row.
Returns:
A reference to this table.
Throws:
TableException - If an error occured.

addInt

Table addInt(String name,
             int value)
             throws TableException
Adds a column of type int to the table and sets its initial value at the first row.

Parameters:
name - The column name.
value - The initial value at the first row.
Returns:
A reference to this table.
Throws:
TableException - If an error occured.

addLong

Table addLong(String name,
              long value)
              throws TableException
Adds a column of type long to the table and sets its initial value at the first row.

Parameters:
name - The column name.
value - The initial value at the first row.
Returns:
A reference to this table.
Throws:
TableException - If an error occured.

addFloat

Table addFloat(String name,
               float value)
               throws TableException
Adds a column of type float to the table and sets its initial value at the first row.

Parameters:
name - The column name.
value - The initial value at the first row.
Returns:
A reference to this table.
Throws:
TableException - If an error occured.

addDouble

Table addDouble(String name,
                double value)
                throws TableException
Adds a column of type double to the table and sets its initial value at the first row.

Parameters:
name - The column name.
value - The initial value at the first row.
Returns:
A reference to this table.
Throws:
TableException - If an error occured.

addBoolean

Table addBoolean(String name,
                 boolean value)
                 throws TableException
Adds a column of type boolean to the table and sets its initial value at the first row.

Parameters:
name - The column name.
value - The initial value at the first row.
Returns:
A reference to this table.
Throws:
TableException - If an error occured.

addDate

Table addDate(String name,
              Date value)
              throws TableException
Adds a column of type Date to the table and sets its initial value at the first row.

Parameters:
name - The column name.
value - The initial value at the first row.
Returns:
A reference to this table.
Throws:
TableException - If an error occured.

addTime

Table addTime(String name,
              Date value)
              throws TableException
Adds a column of type Date to the table and sets its initial value at the first row.

Parameters:
name - The column name.
value - The initial value at the first row.
Returns:
A reference to this table.
Throws:
TableException - If an error occured.

addTimestamp

Table addTimestamp(String name,
                   Date value)
                   throws TableException
Adds a column of type Date to the table and sets its initial value at the first row.

Parameters:
name - The column name.
value - The initial value at the first row.
Returns:
A reference to this table.
Throws:
TableException - If an error occured.

isEmpty

boolean isEmpty()
Checks if the table is empty.

Returns:
true if the table has no rows, else false.

getRowCount

int getRowCount()
                throws OperationNotSupportedException
Gets the current number of rows.

Returns:
The number of rows.
Throws:
OperationNotSupportedException - In case the operation is not supported.

addRow

Row addRow()
           throws OperationNotSupportedException
Adds a row to the table

Returns:
The new row.
Throws:
OperationNotSupportedException - In case the operation is not supported.

addRow

Row addRow(Row srcRow)
           throws OperationNotSupportedException
Adds a row to the table

Parameters:
srcRow - The row to copy.
Returns:
The new row.
Throws:
OperationNotSupportedException - In case the operation is not supported.

getRow

Row getRow(int rowIdx)
           throws RowNotDefinedException,
                  OperationNotSupportedException
Gets a row from the table

Parameters:
rowIdx - The index of the desired row.
Returns:
The new row.
Throws:
RowNotDefinedException - In case the requested row does not exist.
OperationNotSupportedException - In case the operation is not supported.

removeRow

void removeRow(int rowIdx)
               throws RowNotDefinedException,
                      OperationNotSupportedException
Removes a row from the table

Parameters:
rowIdx - The index of the row to remove.
Throws:
RowNotDefinedException - In case the requested row does not exist.
OperationNotSupportedException - In case the operation is not supported.

getString

String getString(int rowIdx,
                 int columnIdx)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException,
                        TypeMismatchException
Gets the String value from the given row at the given column.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the String conversion failed.

getString

String getString(int rowIdx,
                 String columnName)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException,
                        TypeMismatchException
Gets the String value from the given row at the given column.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the String conversion failed.

setString

void setString(int rowIdx,
               int columnIdx,
               String value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Sets the String value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the String conversion failed.

setString

void setString(int rowIdx,
               String columnName,
               String value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Sets the String value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the String conversion failed.

getInt

int getInt(int rowIdx,
           int columnIdx)
           throws RowNotDefinedException,
                  ColumnNotDefinedException,
                  TypeMismatchException
Gets the integer value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the int conversion failed.

getInt

int getInt(int rowIdx,
           String columnName)
           throws RowNotDefinedException,
                  ColumnNotDefinedException,
                  TypeMismatchException
Gets the integer value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the int conversion failed.

setInt

void setInt(int rowIdx,
            int columnIdx,
            int value)
            throws RowNotDefinedException,
                   ColumnNotDefinedException,
                   TypeMismatchException
Sets the integer value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the int conversion failed.

setInt

void setInt(int rowIdx,
            String columnName,
            int value)
            throws RowNotDefinedException,
                   ColumnNotDefinedException,
                   TypeMismatchException
Sets the integer value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the int conversion failed.

getLong

long getLong(int rowIdx,
             int columnIdx)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Gets the long value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the long conversion failed.

getLong

long getLong(int rowIdx,
             String columnName)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Gets the long value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the long conversion failed.

setLong

void setLong(int rowIdx,
             int columnIdx,
             long value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Sets the long value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the long conversion failed.

setLong

void setLong(int rowIdx,
             String columnName,
             long value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Sets the integer value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the long conversion failed.

getFloat

float getFloat(int rowIdx,
               int columnIdx)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Gets the float value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.

getFloat

float getFloat(int rowIdx,
               String columnName)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Gets the float value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.

setFloat

void setFloat(int rowIdx,
              int columnIdx,
              float value)
              throws RowNotDefinedException,
                     ColumnNotDefinedException,
                     TypeMismatchException
Sets the float value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.

setFloat

void setFloat(int rowIdx,
              String columnName,
              float value)
              throws RowNotDefinedException,
                     ColumnNotDefinedException,
                     TypeMismatchException
Sets the float value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the float conversion failed.

getDouble

double getDouble(int rowIdx,
                 int columnIdx)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException,
                        TypeMismatchException
Gets the double value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the double conversion failed.

getDouble

double getDouble(int rowIdx,
                 String columnName)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException,
                        TypeMismatchException
Gets the double value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the double conversion failed.

setDouble

void setDouble(int rowIdx,
               int columnIdx,
               double value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Sets the double value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the double conversion failed.

setDouble

void setDouble(int rowIdx,
               String columnName,
               double value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Sets the double value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the double conversion failed.

getBoolean

boolean getBoolean(int rowIdx,
                   int columnIdx)
                   throws RowNotDefinedException,
                          ColumnNotDefinedException,
                          TypeMismatchException
Gets the boolean value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the boolean conversion failed.

getBoolean

boolean getBoolean(int rowIdx,
                   String columnName)
                   throws RowNotDefinedException,
                          ColumnNotDefinedException,
                          TypeMismatchException
Gets the boolean value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the boolean conversion failed.

setBoolean

void setBoolean(int rowIdx,
                int columnIdx,
                boolean value)
                throws RowNotDefinedException,
                       ColumnNotDefinedException,
                       TypeMismatchException
Sets the boolean value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the boolean conversion failed.

setBoolean

void setBoolean(int rowIdx,
                String columnName,
                boolean value)
                throws RowNotDefinedException,
                       ColumnNotDefinedException,
                       TypeMismatchException
Sets the boolean value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the boolean conversion failed.

getDate

Date getDate(int rowIdx,
             int columnIdx)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Gets the Date value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the date conversion failed.

getDate

Date getDate(int rowIdx,
             String columnName)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Gets the Date value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the date conversion failed.

setDate

void setDate(int rowIdx,
             int columnIdx,
             Date value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Sets the Date value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the date conversion failed.

setDate

void setDate(int rowIdx,
             String columnName,
             Date value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Sets the Time value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the date conversion failed.

getTime

Date getTime(int rowIdx,
             int columnIdx)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Gets the Time value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the date conversion failed.

getTime

Date getTime(int rowIdx,
             String columnName)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Gets the Date value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the time conversion failed.

setTime

void setTime(int rowIdx,
             int columnIdx,
             Date value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Sets the Date value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the time conversion failed.

setTime

void setTime(int rowIdx,
             String columnName,
             Date value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Sets the Time value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the time conversion failed.

getTimestamp

Date getTimestamp(int rowIdx,
                  int columnIdx)
                  throws RowNotDefinedException,
                         ColumnNotDefinedException,
                         TypeMismatchException
Gets the Timestamp value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the timestamp conversion failed.

getTimestamp

Date getTimestamp(int rowIdx,
                  String columnName)
                  throws RowNotDefinedException,
                         ColumnNotDefinedException,
                         TypeMismatchException
Gets the Timestamp value from the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the timestamp conversion failed.

setTimestamp

void setTimestamp(int rowIdx,
                  int columnIdx,
                  Date value)
                  throws RowNotDefinedException,
                         ColumnNotDefinedException,
                         TypeMismatchException
Sets the Timestamp value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the timestamp conversion failed.

setTimestamp

void setTimestamp(int rowIdx,
                  String columnName,
                  Date value)
                  throws RowNotDefinedException,
                         ColumnNotDefinedException,
                         TypeMismatchException
Sets the Timestamp value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the timestamp conversion failed.

getObject

Object getObject(int rowIdx,
                 int columnIdx)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException
Gets the Object value from the given row at the given column.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.

getObject

Object getObject(int rowIdx,
                 String columnName)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException
Gets the Object value from the given row at the given column.

Parameters:
rowIdx - The index of the desired row.
columnName - The index of the desired column.
Returns:
The detected value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.

setObject

void setObject(int rowIdx,
               int columnIdx,
               Object value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Sets the Object value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnIdx - The index of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the object conversion failed.

setObject

void setObject(int rowIdx,
               String columnName,
               Object value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Sets the Object value at the given row.

Parameters:
rowIdx - The index of the desired row.
columnName - The name of the desired column.
value - The new value.
Throws:
RowNotDefinedException - In case the requested row does not exist.
ColumnNotDefinedException - In case the requested column does not exist.
TypeMismatchException - In case the object conversion failed.

sort

void sort(CompareItem[] compareColumns)
          throws OperationNotSupportedException
Sorts the table according to the given compare item definitions.

Parameters:
compareColumns - The column definition for the sort process.
Throws:
OperationNotSupportedException - In case the operation is not supported.

sort

void sort(int columnIdx,
          int direction)
          throws OperationNotSupportedException
Sorts the table according to the given column and direction.

Parameters:
columnIdx - The column to sort by.
direction - The sort directon.
Throws:
OperationNotSupportedException - In case the operation is not supported.

setColumnType

void setColumnType(int columnIdx,
                   int typeId)
                   throws ColumnNotDefinedException,
                          TypeConverterException
Changes the type of the given column.

Parameters:
columnIdx - The index of the column which has been changed.
typeId - The new column type ID.
Throws:
ColumnNotDefinedException - In case the desired column does not exist.
TypeConverterException - In case the object conversion failed.

setColumnType

void setColumnType(String columnName,
                   int typeId)
                   throws ColumnNotDefinedException,
                          TypeConverterException
Changes the type of the given column.

Parameters:
columnName - The name of the column which has been changed.
typeId - The new column type ID.
Throws:
ColumnNotDefinedException - In case the desired column does not exist.
TypeConverterException - In case the object conversion failed.

copyTable

Table copyTable()
                throws TableException
Copies the table.

Returns:
A copy holding the filtered contents of the handled table.
Throws:
TableException - In case an unexpected failure occurred.

getDistinctValues

Set getDistinctValues(int columnIdx)
                      throws TableException
Gets the distinct values of the specified column.

Parameters:
columnIdx - The index of the desired column.
Returns:
A set of distinct values.
Throws:
TableException - In case an unexpected failure occurred.

getDistinctValues

Set getDistinctValues(String columnName)
                      throws TableException
Gets the distinct values of the specified column.

Parameters:
columnName - The name of the desired column.
Returns:
A set of distinct values.
Throws:
TableException - In case an unexpected failure occurred.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.