org.ujac.util.table
Class FilteredTable

java.lang.Object
  extended by org.ujac.util.table.BaseTable
      extended by org.ujac.util.table.FilteredTable
All Implemented Interfaces:
Table, TableConstants, UjacTypes

public class FilteredTable
extends BaseTable
implements Table

Name: FilteredTable
Description: A table implementation filtering nested tables according to a given table definition.

Author:
lauerc

Field Summary
 
Fields inherited from class org.ujac.util.table.BaseTable
columnMap
 
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
 
Constructor Summary
FilteredTable(Table dataTable)
          Constructs a FilteredTable instance with specific attributes.
FilteredTable(Table dataTable, RowFilterRule filterRule)
          Constructs a FilteredTable instance with specific attributes.
 
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.
 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.
protected  Table getDataTable()
          Getter method for the the property dataTable.
 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.
 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.
 RowFilterRule getFilterRule()
          Gets the filter rule.
 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 of this report in proper sequence.
 void orderColumns(String[] columnNames)
          Sets the new order for the report columns according to the list of given column names.
 void removeRow(int rowIdx)
          Removes a row from the table
 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 setFilterRule(RowFilterRule filterRule)
          Sets the filter rule.
 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.
 
Methods inherited from class org.ujac.util.table.BaseTable
addColumn, copyTable, getDistinctValues, getDistinctValues, readData, renameColumn, writeData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ujac.util.table.Table
copyTable, getDistinctValues, getDistinctValues, renameColumn
 

Constructor Detail

FilteredTable

public FilteredTable(Table dataTable)
              throws TableException
Constructs a FilteredTable instance with specific attributes.

Parameters:
dataTable - The data table.
Throws:
TableException - In case a table handling failure occurred.

FilteredTable

public FilteredTable(Table dataTable,
                     RowFilterRule filterRule)
              throws TableException
Constructs a FilteredTable instance with specific attributes.

Parameters:
dataTable - The data table.
filterRule - The filter rule to apply
Throws:
TableException - In case a table handling failure occurred.
Method Detail

setFilterRule

public void setFilterRule(RowFilterRule filterRule)
                   throws TableException
Sets the filter rule.

Parameters:
filterRule - The row filter rule to set.
Throws:
TableException - In case a table handling failure occurred.

getFilterRule

public RowFilterRule getFilterRule()
Gets the filter rule.

Returns:
rowFilter The current filter rule.

getFormatHelper

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

Specified by:
getFormatHelper in interface Table
Overrides:
getFormatHelper in class BaseTable
Returns:
The current value of property formatHelper.

setFormatHelper

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

Specified by:
setFormatHelper in interface Table
Overrides:
setFormatHelper in class BaseTable
Parameters:
formatHelper - The value to set for the property formatHelper.

getTypeConverter

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

Specified by:
getTypeConverter in interface Table
Overrides:
getTypeConverter in class BaseTable
Returns:
The current value of property typeConverter.

setTypeConverter

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

Specified by:
setTypeConverter in interface Table
Overrides:
setTypeConverter in class BaseTable
Parameters:
typeConverter - The value to set for the property typeConverter.

getColumn

public Column getColumn(int index)
                 throws ColumnNotDefinedException
Description copied from class: BaseTable
Gets the column at the given index.

Specified by:
getColumn in interface Table
Overrides:
getColumn in class BaseTable
Parameters:
index - The column index.
Returns:
The desired column.
Throws:
ColumnNotDefinedException - If the column does not exist.
See Also:
Table.getColumn(int)

getColumn

public Column getColumn(String name)
                 throws ColumnNotDefinedException
Description copied from class: BaseTable
Gets the column with the given name.

Specified by:
getColumn in interface Table
Overrides:
getColumn in class BaseTable
Parameters:
name - The column name.
Returns:
The desired column.
Throws:
ColumnNotDefinedException - If the column does not exist.
See Also:
Table.getColumn(java.lang.String)

getColumnIndex

public int getColumnIndex(String name)
                   throws ColumnNotDefinedException
Description copied from class: BaseTable
Gets the index of the given column name.

Specified by:
getColumnIndex in interface Table
Overrides:
getColumnIndex in class BaseTable
Parameters:
name - The column name
Returns:
int The index of the column.
Throws:
ColumnNotDefinedException - If the column does not exist.
See Also:
Table.getColumnIndex(java.lang.String)

orderColumns

public void orderColumns(String[] columnNames)
                  throws ColumnNotDefinedException,
                         ColumnAlreadyDefinedException
Sets the new order for the report columns according to the list of given column names.

Specified by:
orderColumns in interface Table
Overrides:
orderColumns in class BaseTable
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

public Column[] getVisibleColumns()
Gets all visible columns.

Specified by:
getVisibleColumns in interface Table
Overrides:
getVisibleColumns in class BaseTable
Returns:
An array holding all visible columns.

getVisibleColumns

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

Specified by:
getVisibleColumns in interface Table
Overrides:
getVisibleColumns in class BaseTable
Parameters:
levelFilter - The maximum level of importance to support.
Returns:
An array holding all visible columns.

getHeaderRow

public Row getHeaderRow()
Description copied from interface: Table
Gets the header row.

Specified by:
getHeaderRow in interface Table
Returns:
The header row for the table.
See Also:
Table.getHeaderRow()

iterator

public Iterator iterator()
Returns an iterator over the rows of this report in proper sequence.

Specified by:
iterator in interface Table
Returns:
an iterator over the rows of this report in proper sequence.

getColumnCount

public int getColumnCount()
Gets the current number of columns.

Specified by:
getColumnCount in interface Table
Overrides:
getColumnCount in class BaseTable
Returns:
The number of columns.

getDataTable

protected Table getDataTable()
Getter method for the the property dataTable.

Returns:
The current value of property dataTable.

addColumn

public Column addColumn(String name,
                        int type)
                 throws OperationNotSupportedException
Description copied from class: BaseTable
Adds a column to the table

Specified by:
addColumn in interface Table
Overrides:
addColumn in class BaseTable
Parameters:
name - The column name.
type - The column type.
Returns:
The new column.
Throws:
OperationNotSupportedException - In case the operation is not supported.
See Also:
Table.addColumn(java.lang.String, int)

addColumn

public Column addColumn(String name,
                        int type,
                        LayoutHints layoutHints)
                 throws OperationNotSupportedException
Description copied from interface: Table
Adds a column to the table

Specified by:
addColumn in interface Table
Parameters:
name - The column name.
type - The column type.
layoutHints - The layout hints for the column.
Returns:
The new column.
Throws:
OperationNotSupportedException - In case the operation is not supported.
See Also:
Table.addColumn(java.lang.String, int, LayoutHints)

addString

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

Specified by:
addString in interface Table
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.
See Also:
Table.addString(java.lang.String, java.lang.String)

addInt

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

Specified by:
addInt in interface Table
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.
See Also:
Table.addInt(java.lang.String, int)

addLong

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

Specified by:
addLong in interface Table
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.
See Also:
Table.addLong(java.lang.String, long)

addFloat

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

Specified by:
addFloat in interface Table
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.
See Also:
Table.addFloat(java.lang.String, float)

addDouble

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

Specified by:
addDouble in interface Table
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.
See Also:
Table.addDouble(java.lang.String, double)

addBoolean

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

Specified by:
addBoolean in interface Table
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.
See Also:
Table.addBoolean(java.lang.String, boolean)

addDate

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

Specified by:
addDate in interface Table
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.
See Also:
Table.addDate(java.lang.String, java.util.Date)

addTime

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

Specified by:
addTime in interface Table
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.
See Also:
Table.addTime(java.lang.String, java.util.Date)

addTimestamp

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

Specified by:
addTimestamp in interface Table
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.
See Also:
Table.addTimestamp(java.lang.String, java.util.Date)

isEmpty

public boolean isEmpty()
Checks if the table is empty.

Specified by:
isEmpty in interface Table
Returns:
true if the table has no rows, else false.

getRowCount

public int getRowCount()
                throws OperationNotSupportedException
Description copied from interface: Table
Gets the current number of rows.

Specified by:
getRowCount in interface Table
Returns:
The number of rows.
Throws:
OperationNotSupportedException - In case the operation is not supported.
See Also:
Table.getRowCount()

addRow

public Row addRow()
           throws OperationNotSupportedException
Description copied from interface: Table
Adds a row to the table

Specified by:
addRow in interface Table
Returns:
The new row.
Throws:
OperationNotSupportedException - In case the operation is not supported.
See Also:
Table.addRow()

addRow

public Row addRow(Row srcRow)
           throws OperationNotSupportedException
Description copied from interface: Table
Adds a row to the table

Specified by:
addRow in interface Table
Parameters:
srcRow - The row to copy.
Returns:
The new row.
Throws:
OperationNotSupportedException - In case the operation is not supported.
See Also:
Table.addRow(org.ujac.util.table.Row)

getRow

public Row getRow(int rowIdx)
           throws RowNotDefinedException,
                  OperationNotSupportedException
Description copied from interface: Table
Gets a row from the table

Specified by:
getRow in interface 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.
See Also:
Table.getRow(int)

removeRow

public void removeRow(int rowIdx)
               throws RowNotDefinedException,
                      OperationNotSupportedException
Description copied from interface: Table
Removes a row from the table

Specified by:
removeRow in interface 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.
See Also:
Table.removeRow(int)

getString

public String getString(int rowIdx,
                        int columnIdx)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException,
                        TypeMismatchException
Description copied from interface: Table
Gets the String value from the given row at the given column.

Specified by:
getString in interface Table
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.
See Also:
Table.getString(int, int)

getString

public String getString(int rowIdx,
                        String columnName)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException,
                        TypeMismatchException
Description copied from interface: Table
Gets the String value from the given row at the given column.

Specified by:
getString in interface Table
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.
See Also:
Table.getString(int, java.lang.String)

setString

public void setString(int rowIdx,
                      int columnIdx,
                      String value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Table
Sets the String value at the given row.

Specified by:
setString in interface Table
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.
See Also:
Table.setString(int, int, java.lang.String)

setString

public void setString(int rowIdx,
                      String columnName,
                      String value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Table
Sets the String value at the given row.

Specified by:
setString in interface Table
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.
See Also:
Table.setString(int, java.lang.String, java.lang.String)

getInt

public int getInt(int rowIdx,
                  int columnIdx)
           throws RowNotDefinedException,
                  ColumnNotDefinedException,
                  TypeMismatchException
Description copied from interface: Table
Gets the integer value from the given row.

Specified by:
getInt in interface Table
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.
See Also:
Table.getInt(int, int)

getInt

public int getInt(int rowIdx,
                  String columnName)
           throws RowNotDefinedException,
                  ColumnNotDefinedException,
                  TypeMismatchException
Description copied from interface: Table
Gets the integer value from the given row.

Specified by:
getInt in interface Table
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.
See Also:
Table.getInt(int, java.lang.String)

setInt

public void setInt(int rowIdx,
                   int columnIdx,
                   int value)
            throws RowNotDefinedException,
                   ColumnNotDefinedException,
                   TypeMismatchException
Description copied from interface: Table
Sets the integer value at the given row.

Specified by:
setInt in interface Table
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.
See Also:
Table.setInt(int, int, int)

setInt

public void setInt(int rowIdx,
                   String columnName,
                   int value)
            throws RowNotDefinedException,
                   ColumnNotDefinedException,
                   TypeMismatchException
Description copied from interface: Table
Sets the integer value at the given row.

Specified by:
setInt in interface Table
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.
See Also:
Table.setInt(int, java.lang.String, int)

getLong

public long getLong(int rowIdx,
                    int columnIdx)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Gets the long value from the given row.

Specified by:
getLong in interface Table
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.
See Also:
Table.getLong(int, int)

getLong

public long getLong(int rowIdx,
                    String columnName)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Gets the long value from the given row.

Specified by:
getLong in interface Table
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.
See Also:
Table.getLong(int, java.lang.String)

setLong

public void setLong(int rowIdx,
                    int columnIdx,
                    long value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Sets the long value at the given row.

Specified by:
setLong in interface Table
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.
See Also:
Table.setLong(int, int, long)

setLong

public void setLong(int rowIdx,
                    String columnName,
                    long value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Sets the integer value at the given row.

Specified by:
setLong in interface Table
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.
See Also:
Table.setLong(int, java.lang.String, long)

getFloat

public float getFloat(int rowIdx,
                      int columnIdx)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Table
Gets the float value from the given row.

Specified by:
getFloat in interface Table
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.
See Also:
Table.getFloat(int, int)

getFloat

public float getFloat(int rowIdx,
                      String columnName)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Table
Gets the float value from the given row.

Specified by:
getFloat in interface Table
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.
See Also:
Table.getFloat(int, java.lang.String)

setFloat

public void setFloat(int rowIdx,
                     int columnIdx,
                     float value)
              throws RowNotDefinedException,
                     ColumnNotDefinedException,
                     TypeMismatchException
Description copied from interface: Table
Sets the float value at the given row.

Specified by:
setFloat in interface Table
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.
See Also:
Table.setFloat(int, int, float)

setFloat

public void setFloat(int rowIdx,
                     String columnName,
                     float value)
              throws RowNotDefinedException,
                     ColumnNotDefinedException,
                     TypeMismatchException
Description copied from interface: Table
Sets the float value at the given row.

Specified by:
setFloat in interface Table
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.
See Also:
Table.setFloat(int, java.lang.String, float)

getDouble

public double getDouble(int rowIdx,
                        int columnIdx)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException,
                        TypeMismatchException
Description copied from interface: Table
Gets the double value from the given row.

Specified by:
getDouble in interface Table
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.
See Also:
Table.getDouble(int, int)

getDouble

public double getDouble(int rowIdx,
                        String columnName)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException,
                        TypeMismatchException
Description copied from interface: Table
Gets the double value from the given row.

Specified by:
getDouble in interface Table
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.
See Also:
Table.getDouble(int, java.lang.String)

setDouble

public void setDouble(int rowIdx,
                      int columnIdx,
                      double value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Table
Sets the double value at the given row.

Specified by:
setDouble in interface Table
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.
See Also:
Table.setDouble(int, int, double)

setDouble

public void setDouble(int rowIdx,
                      String columnName,
                      double value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Table
Sets the double value at the given row.

Specified by:
setDouble in interface Table
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.
See Also:
Table.setDouble(int, java.lang.String, double)

getBoolean

public boolean getBoolean(int rowIdx,
                          int columnIdx)
                   throws RowNotDefinedException,
                          ColumnNotDefinedException,
                          TypeMismatchException
Description copied from interface: Table
Gets the boolean value from the given row.

Specified by:
getBoolean in interface Table
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.
See Also:
Table.getBoolean(int, int)

getBoolean

public boolean getBoolean(int rowIdx,
                          String columnName)
                   throws RowNotDefinedException,
                          ColumnNotDefinedException,
                          TypeMismatchException
Description copied from interface: Table
Gets the boolean value from the given row.

Specified by:
getBoolean in interface Table
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.
See Also:
Table.getBoolean(int, java.lang.String)

setBoolean

public void setBoolean(int rowIdx,
                       int columnIdx,
                       boolean value)
                throws RowNotDefinedException,
                       ColumnNotDefinedException,
                       TypeMismatchException
Description copied from interface: Table
Sets the boolean value at the given row.

Specified by:
setBoolean in interface Table
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.
See Also:
Table.setBoolean(int, int, boolean)

setBoolean

public void setBoolean(int rowIdx,
                       String columnName,
                       boolean value)
                throws RowNotDefinedException,
                       ColumnNotDefinedException,
                       TypeMismatchException
Description copied from interface: Table
Sets the boolean value at the given row.

Specified by:
setBoolean in interface Table
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.
See Also:
Table.setBoolean(int, java.lang.String, boolean)

getDate

public Date getDate(int rowIdx,
                    int columnIdx)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Gets the Date value from the given row.

Specified by:
getDate in interface Table
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.
See Also:
Table.getDate(int, int)

getDate

public Date getDate(int rowIdx,
                    String columnName)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Gets the Date value from the given row.

Specified by:
getDate in interface Table
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.
See Also:
Table.getDate(int, java.lang.String)

setDate

public void setDate(int rowIdx,
                    int columnIdx,
                    Date value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Sets the Date value at the given row.

Specified by:
setDate in interface Table
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.
See Also:
Table.setDate(int, int, java.util.Date)

setDate

public void setDate(int rowIdx,
                    String columnName,
                    Date value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Sets the Time value at the given row.

Specified by:
setDate in interface Table
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.
See Also:
Table.setDate(int, java.lang.String, java.util.Date)

getTime

public Date getTime(int rowIdx,
                    int columnIdx)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Gets the Time value from the given row.

Specified by:
getTime in interface Table
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.
See Also:
Table.getTime(int, int)

getTime

public Date getTime(int rowIdx,
                    String columnName)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Gets the Date value from the given row.

Specified by:
getTime in interface Table
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.
See Also:
Table.getTime(int, java.lang.String)

setTime

public void setTime(int rowIdx,
                    int columnIdx,
                    Date value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Sets the Date value at the given row.

Specified by:
setTime in interface Table
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.
See Also:
Table.setTime(int, int, java.util.Date)

setTime

public void setTime(int rowIdx,
                    String columnName,
                    Date value)
             throws RowNotDefinedException,
                    ColumnNotDefinedException,
                    TypeMismatchException
Description copied from interface: Table
Sets the Time value at the given row.

Specified by:
setTime in interface Table
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.
See Also:
Table.setTime(int, java.lang.String, java.util.Date)

getTimestamp

public Date getTimestamp(int rowIdx,
                         int columnIdx)
                  throws RowNotDefinedException,
                         ColumnNotDefinedException,
                         TypeMismatchException
Description copied from interface: Table
Gets the Timestamp value from the given row.

Specified by:
getTimestamp in interface Table
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.
See Also:
Table.getTimestamp(int, int)

getTimestamp

public Date getTimestamp(int rowIdx,
                         String columnName)
                  throws RowNotDefinedException,
                         ColumnNotDefinedException,
                         TypeMismatchException
Description copied from interface: Table
Gets the Timestamp value from the given row.

Specified by:
getTimestamp in interface Table
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.
See Also:
Table.getTimestamp(int, java.lang.String)

setTimestamp

public void setTimestamp(int rowIdx,
                         int columnIdx,
                         Date value)
                  throws RowNotDefinedException,
                         ColumnNotDefinedException,
                         TypeMismatchException
Description copied from interface: Table
Sets the Timestamp value at the given row.

Specified by:
setTimestamp in interface Table
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.
See Also:
Table.setTimestamp(int, int, java.util.Date)

setTimestamp

public void setTimestamp(int rowIdx,
                         String columnName,
                         Date value)
                  throws RowNotDefinedException,
                         ColumnNotDefinedException,
                         TypeMismatchException
Description copied from interface: Table
Sets the Timestamp value at the given row.

Specified by:
setTimestamp in interface Table
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.
See Also:
Table.setTimestamp(int, java.lang.String, java.util.Date)

getObject

public Object getObject(int rowIdx,
                        int columnIdx)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException
Description copied from interface: Table
Gets the Object value from the given row at the given column.

Specified by:
getObject in interface Table
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.
See Also:
Table.getObject(int, int)

getObject

public Object getObject(int rowIdx,
                        String columnName)
                 throws RowNotDefinedException,
                        ColumnNotDefinedException
Description copied from interface: Table
Gets the Object value from the given row at the given column.

Specified by:
getObject in interface Table
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.
See Also:
Table.getObject(int, java.lang.String)

setObject

public void setObject(int rowIdx,
                      int columnIdx,
                      Object value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Table
Sets the Object value at the given row.

Specified by:
setObject in interface Table
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.
See Also:
Table.setObject(int, int, java.lang.Object)

setObject

public void setObject(int rowIdx,
                      String columnName,
                      Object value)
               throws RowNotDefinedException,
                      ColumnNotDefinedException,
                      TypeMismatchException
Description copied from interface: Table
Sets the Object value at the given row.

Specified by:
setObject in interface Table
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.
See Also:
Table.setObject(int, java.lang.String, java.lang.Object)

sort

public void sort(CompareItem[] compareColumns)
          throws OperationNotSupportedException
Description copied from interface: Table
Sorts the table according to the given compare item definitions.

Specified by:
sort in interface Table
Parameters:
compareColumns - The column definition for the sort process.
Throws:
OperationNotSupportedException - In case the operation is not supported.
See Also:
Table.sort(org.ujac.util.table.CompareItem[])

sort

public void sort(int columnIdx,
                 int direction)
          throws OperationNotSupportedException
Description copied from interface: Table
Sorts the table according to the given column and direction.

Specified by:
sort in interface Table
Parameters:
columnIdx - The column to sort by.
direction - The sort directon.
Throws:
OperationNotSupportedException - In case the operation is not supported.
See Also:
Table.sort(int, int)

setColumnType

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

Specified by:
setColumnType in interface Table
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

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

Specified by:
setColumnType in interface Table
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.


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