|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujac.util.table.BaseTable
public abstract class BaseTable
Name: BaseTable
Description: Basic table implementation.
| Field Summary | |
|---|---|
protected Map |
columnMap
The columns of the table. |
protected List |
columns
The columns of the table. |
| 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 | |
|---|---|
BaseTable()
Constructs a BaseTable instance with no specific arguments. |
|
BaseTable(FormatHelper formatHelper)
Constructs a BaseTable instance with no specific arguments. |
|
| Method Summary | |
|---|---|
Column |
addColumn(String name,
boolean key,
int type)
Adds a column to the table |
Column |
addColumn(String name,
int type)
Adds a column to the table |
Table |
copyTable()
Copies the table. |
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. |
Set |
getDistinctValues(int columnIdx)
Gets the distinct values of the specified column. |
Set |
getDistinctValues(String columnName)
Gets the distinct values of the specified column. |
FormatHelper |
getFormatHelper()
Getter method for the the property formatHelper. |
TypeConverter |
getTypeConverter()
Getter method for the the property typeConverter. |
Column[] |
getVisibleColumns()
Gets all visible columns. |
Column[] |
getVisibleColumns(int levelFilter)
Gets all visible columns. |
void |
orderColumns(String[] columnNames)
Orders the sequence of report columns according to the list of given column names. |
protected void |
readData(ObjectInputStream s)
Reads the object's data from the given stream. |
void |
renameColumn(Column column,
String name)
Renames a column. |
void |
setFormatHelper(FormatHelper formatHelper)
Setter method for the the property formatHelper. |
void |
setTypeConverter(TypeConverter typeConverter)
Setter method for the the property typeConverter. |
protected void |
writeData(ObjectOutputStream s)
Writes the object's data to the given stream. |
| 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 |
|---|
addBoolean, addColumn, addDate, addDouble, addFloat, addInt, addLong, addRow, addRow, addString, addTime, addTimestamp, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getHeaderRow, getInt, getInt, getLong, getLong, getObject, getObject, getRow, getRowCount, getString, getString, getTime, getTime, getTimestamp, getTimestamp, isEmpty, iterator, removeRow, setBoolean, setBoolean, setColumnType, setColumnType, setDate, setDate, setDouble, setDouble, setFloat, setFloat, setInt, setInt, setLong, setLong, setObject, setObject, setString, setString, setTime, setTime, setTimestamp, setTimestamp, sort, sort |
| Field Detail |
|---|
protected List columns
protected Map columnMap
| Constructor Detail |
|---|
public BaseTable()
public BaseTable(FormatHelper formatHelper)
formatHelper - The format helper to use.| Method Detail |
|---|
public FormatHelper getFormatHelper()
getFormatHelper in interface Tablepublic void setFormatHelper(FormatHelper formatHelper)
setFormatHelper in interface TableformatHelper - The value to set for the property formatHelper.public TypeConverter getTypeConverter()
getTypeConverter in interface Tablepublic void setTypeConverter(TypeConverter typeConverter)
setTypeConverter in interface TabletypeConverter - The value to set for the property typeConverter.public int getColumnCount()
getColumnCount in interface Table
public Column addColumn(String name,
int type)
throws ColumnAlreadyDefinedException,
OperationNotSupportedException
addColumn in interface Tablename - 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,
boolean key,
int type)
throws ColumnAlreadyDefinedException
name - The column name.key - Tells whether or not the column defines a key value.type - The column type.
ColumnAlreadyDefinedException - In case the column was already defined.
public Column getColumn(int index)
throws ColumnNotDefinedException
getColumn in interface Tableindex - The column index.
ColumnNotDefinedException - If the column does not exist.
public Column getColumn(String name)
throws ColumnNotDefinedException
getColumn in interface Tablename - The column name.
ColumnNotDefinedException - If the column does not exist.
public int getColumnIndex(String name)
throws ColumnNotDefinedException
getColumnIndex in interface Tablename - The column name
ColumnNotDefinedException - If the column does not exist.
public void renameColumn(Column column,
String name)
throws ColumnAlreadyDefinedException
renameColumn in interface Tablecolumn - The column to rename.name - The column name to set.
ColumnAlreadyDefinedException - In case a column with that name already exists.
public void orderColumns(String[] columnNames)
throws ColumnNotDefinedException,
ColumnAlreadyDefinedException
orderColumns in interface TablecolumnNames - The list of column names after which to order the columns.
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.public Column[] getVisibleColumns()
getVisibleColumns in interface Tablepublic Column[] getVisibleColumns(int levelFilter)
getVisibleColumns in interface TablelevelFilter - The maximum level of importance to support.
public Table copyTable()
throws TableException
copyTable in interface TableTableException - In case an unexpected failure occurred.
public Set getDistinctValues(int columnIdx)
throws TableException
getDistinctValues in interface TablecolumnIdx - The index of the desired column.
TableException - In case an unexpected failure occurred.
public Set getDistinctValues(String columnName)
throws TableException
getDistinctValues in interface TablecolumnName - The name of the desired column.
TableException - In case an unexpected failure occurred.
protected void writeData(ObjectOutputStream s)
throws IOException
s - The stream to write to
IOException - In case the data output failed.
protected void readData(ObjectInputStream s)
throws IOException,
ClassNotFoundException
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 | |||||||||