|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.util.table.BaseTable org.ujac.util.table.DataTable
public class DataTable
Name: DataTable
Description: A class holding table data.
Field Summary |
---|
Fields inherited from class org.ujac.util.table.BaseTable |
---|
columnMap, columns |
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 | |
---|---|
DataTable()
Constructs a DataTable instance with no specific arguments. |
|
DataTable(FormatHelper formatHelper)
Constructs a DataTable instance with no specific arguments. |
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. |
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. |
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. |
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. |
boolean |
isEmpty()
Checks if the table is empty. |
Iterator |
iterator()
Returns an iterator over the rows in this table in proper sequence. |
static void |
main(String[] args)
The main method for testing purposes. |
protected void |
readData(ObjectInputStream s)
Reads the object's data from the given stream. |
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 |
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 |
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 |
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. |
void |
swapRows(int a,
int b)
Swaps the rows with the given two indices. |
String |
toString()
Converts the table to String. |
protected void |
writeData(ObjectOutputStream s)
Writes the object's data to the given stream. |
Methods inherited from class org.ujac.util.table.BaseTable |
---|
addColumn, copyTable, getColumn, getColumn, getColumnCount, getColumnIndex, getDistinctValues, getDistinctValues, getFormatHelper, getTypeConverter, getVisibleColumns, getVisibleColumns, orderColumns, renameColumn, setFormatHelper, setTypeConverter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataTable()
public DataTable(FormatHelper formatHelper)
formatHelper
- The format helper to use.Method Detail |
---|
public Column addColumn(String name, int type) throws ColumnAlreadyDefinedException, OperationNotSupportedException
addColumn
in interface Table
addColumn
in class BaseTable
name
- The column name.type
- The column type.
ColumnAlreadyDefinedException
- In case the column was already defined.
OperationNotSupportedException
- In case the operation is not supported.public Column addColumn(String name, int type, LayoutHints layoutHints) throws ColumnAlreadyDefinedException, OperationNotSupportedException
addColumn
in interface Table
name
- The column name.type
- The column type.layoutHints
- The layout hints for the column.
ColumnAlreadyDefinedException
- In case the column was already defined.
OperationNotSupportedException
- In case the operation is not supported.public Table addString(String name, String value) throws TableException
addString
in interface Table
name
- The column name.value
- The initial value at the first row.
TableException
- If an error occured.public Table addInt(String name, int value) throws TableException
addInt
in interface Table
name
- The column name.value
- The initial value at the first row.
TableException
- If an error occured.public Table addLong(String name, long value) throws TableException
addLong
in interface Table
name
- The column name.value
- The initial value at the first row.
TableException
- If an error occured.public Table addFloat(String name, float value) throws TableException
addFloat
in interface Table
name
- The column name.value
- The initial value at the first row.
TableException
- If an error occured.public Table addDouble(String name, double value) throws TableException
addDouble
in interface Table
name
- The column name.value
- The initial value at the first row.
TableException
- If an error occured.public Table addBoolean(String name, boolean value) throws TableException
addBoolean
in interface Table
name
- The column name.value
- The initial value at the first row.
TableException
- If an error occured.public Table addDate(String name, Date value) throws TableException
addDate
in interface Table
name
- The column name.value
- The initial value at the first row.
TableException
- If an error occured.public Table addTime(String name, Date value) throws TableException
addTime
in interface Table
name
- The column name.value
- The initial value at the first row.
TableException
- If an error occured.public Table addTimestamp(String name, Date value) throws TableException
addTimestamp
in interface Table
name
- The column name.value
- The initial value at the first row.
TableException
- If an error occured.public boolean isEmpty()
isEmpty
in interface Table
public int getRowCount()
getRowCount
in interface Table
public Row addRow()
addRow
in interface Table
public Row addRow(Row srcRow) throws OperationNotSupportedException
addRow
in interface Table
srcRow
- The row to copy.
OperationNotSupportedException
- In case the operation is not supported.public Row getRow(int rowIdx) throws RowNotDefinedException
getRow
in interface Table
rowIdx
- The index of the desired row.
RowNotDefinedException
- In case the requested row does not exist.public void removeRow(int rowIdx) throws RowNotDefinedException
removeRow
in interface Table
rowIdx
- The index of the row to remove.
RowNotDefinedException
- In case the requested row does not exist.public Row getHeaderRow()
getHeaderRow
in interface Table
public Iterator iterator()
iterator
in interface Table
public String getString(int rowIdx, int columnIdx) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getString
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.
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.public String getString(int rowIdx, String columnName) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getString
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.
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.public void setString(int rowIdx, int columnIdx, String value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setString
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.value
- The new value.
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.public void setString(int rowIdx, String columnName, String value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setString
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.value
- The new value.
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.public int getInt(int rowIdx, int columnIdx) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getInt
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.
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.public int getInt(int rowIdx, String columnName) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getInt
in interface Table
rowIdx
- The index of the desired row.columnName
- The index of the desired column.
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.public void setInt(int rowIdx, int columnIdx, int value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setInt
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.value
- The new value.
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.public void setInt(int rowIdx, String columnName, int value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setInt
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.value
- The new value.
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.public long getLong(int rowIdx, int columnIdx) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getLong
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.
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.public long getLong(int rowIdx, String columnName) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getLong
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.
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.public void setLong(int rowIdx, int columnIdx, long value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setLong
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.value
- The new value.
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.public void setLong(int rowIdx, String columnName, long value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setLong
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.value
- The new value.
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.public float getFloat(int rowIdx, int columnIdx) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getFloat
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.
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.public float getFloat(int rowIdx, String columnName) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getFloat
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.
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.public void setFloat(int rowIdx, int columnIdx, float value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setFloat
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.value
- The new value.
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.public void setFloat(int rowIdx, String columnName, float value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setFloat
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.value
- The new value.
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.public double getDouble(int rowIdx, int columnIdx) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getDouble
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.
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.public double getDouble(int rowIdx, String columnName) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getDouble
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.
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.public void setDouble(int rowIdx, int columnIdx, double value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setDouble
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.value
- The new value.
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.public void setDouble(int rowIdx, String columnName, double value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setDouble
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.value
- The new value.
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.public boolean getBoolean(int rowIdx, int columnIdx) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getBoolean
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.
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.public boolean getBoolean(int rowIdx, String columnName) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getBoolean
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.
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.public void setBoolean(int rowIdx, int columnIdx, boolean value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setBoolean
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.value
- The new value.
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.public void setBoolean(int rowIdx, String columnName, boolean value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setBoolean
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.value
- The new value.
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.public Date getDate(int rowIdx, int columnIdx) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getDate
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.
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.public Date getDate(int rowIdx, String columnName) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getDate
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.
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.public void setDate(int rowIdx, int columnIdx, Date value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setDate
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.value
- The new value.
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.public void setDate(int rowIdx, String columnName, Date value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setDate
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.value
- The new value.
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.public Date getTime(int rowIdx, int columnIdx) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getTime
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.
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.public Date getTime(int rowIdx, String columnName) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getTime
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.
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.public void setTime(int rowIdx, int columnIdx, Date value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setTime
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.value
- The new value.
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.public void setTime(int rowIdx, String columnName, Date value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setTime
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.value
- The new value.
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.public Date getTimestamp(int rowIdx, int columnIdx) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getTimestamp
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.
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.public Date getTimestamp(int rowIdx, String columnName) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
getTimestamp
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.
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.public void setTimestamp(int rowIdx, int columnIdx, Date value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setTimestamp
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.value
- The new value.
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.public void setTimestamp(int rowIdx, String columnName, Date value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setTimestamp
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.value
- The new value.
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.public Object getObject(int rowIdx, int columnIdx) throws RowNotDefinedException, ColumnNotDefinedException
getObject
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.
RowNotDefinedException
- In case the requested row does not exist.
ColumnNotDefinedException
- In case the requested column does not exist.public Object getObject(int rowIdx, String columnName) throws RowNotDefinedException, ColumnNotDefinedException
getObject
in interface Table
rowIdx
- The index of the desired row.columnName
- The index of the desired column.
RowNotDefinedException
- In case the requested row does not exist.
ColumnNotDefinedException
- In case the requested column does not exist.public void setObject(int rowIdx, int columnIdx, Object value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setObject
in interface Table
rowIdx
- The index of the desired row.columnIdx
- The index of the desired column.value
- The new value.
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.public void setObject(int rowIdx, String columnName, Object value) throws RowNotDefinedException, ColumnNotDefinedException, TypeMismatchException
setObject
in interface Table
rowIdx
- The index of the desired row.columnName
- The name of the desired column.value
- The new value.
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.public void sort(CompareItem[] compareColumns)
sort
in interface Table
compareColumns
- The column definition for the sort process.public void sort(int columnIdx, int direction)
sort
in interface Table
columnIdx
- The column to sort by.direction
- The sort directon.public void swapRows(int a, int b)
a
- The index of the first row.b
- The index of the second row.public void setColumnType(int columnIdx, int typeId) throws ColumnNotDefinedException, TypeConverterException
setColumnType
in interface Table
columnIdx
- The index of the column which has been changed.typeId
- The new column type ID.
ColumnNotDefinedException
- In case the desired column does not exist.
TypeConverterException
- In case the object conversion failed.public void setColumnType(String columnName, int typeId) throws ColumnNotDefinedException, TypeConverterException
setColumnType
in interface Table
columnName
- The name of the column which has been changed.typeId
- The new column type ID.
ColumnNotDefinedException
- In case the desired column does not exist.
TypeConverterException
- In case the object conversion failed.public String toString()
toString
in class Object
public static final void main(String[] args)
args
- The command line arguments.protected void writeData(ObjectOutputStream s) throws IOException
writeData
in class BaseTable
s
- The stream to write to
IOException
- In case the data output failed.protected void readData(ObjectInputStream s) throws IOException, ClassNotFoundException
readData
in class BaseTable
s
- The stream to read from.
IOException
- In case the data reading failed.
ClassNotFoundException
- In case the class to deserialize could not be found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |