org.ujac.util.table
Class BeanTable

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

public class BeanTable
extends DataTable

Name: BeanTable
Description: A table implementation acting as an interface for a list of beans.

Author:
lauerc
See Also:
Serialized Form

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
BeanTable(Class dataType)
          Constructs a BeanTable instance with specific attributes.
BeanTable(Class dataType, ColumnFilter columnFilter)
          Constructs a BeanTable instance with specific attributes.
BeanTable(FormatHelper formatHelper, Class dataType)
          Constructs a BeanTable instance with specific attributes.
BeanTable(FormatHelper formatHelper, Class dataType, ColumnFilter columnFilter)
          Constructs a BeanTable instance with specific attributes.
BeanTable(FormatHelper formatHelper, List itemList)
          Constructs a BeanTable instance with specific attributes.
BeanTable(FormatHelper formatHelper, List itemList, ColumnFilter columnFilter)
          Constructs a BeanTable instance with specific attributes.
BeanTable(List itemList)
          Constructs a BeanTable instance with specific attributes.
BeanTable(List itemList, ColumnFilter columnFilter)
          Constructs a BeanTable instance with specific attributes.
 
Method Summary
 Column addColumn(String name, int type, Method getter)
          Adds a column to the table
 
Methods inherited from class org.ujac.util.table.DataTable
addBoolean, addColumn, 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, main, readData, 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, swapRows, toString, writeData
 
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

BeanTable

public BeanTable(List itemList)
          throws TableException
Constructs a BeanTable instance with specific attributes.

Parameters:
itemList - The list of beans to fill the table with.
Throws:
TableException - In case no bean class could be determined from the given list.

BeanTable

public BeanTable(FormatHelper formatHelper,
                 List itemList)
          throws TableException
Constructs a BeanTable instance with specific attributes.

Parameters:
formatHelper - The format helper to use.
itemList - The list of beans to fill the table with.
Throws:
TableException - In case no bean class could be determined from the given list.

BeanTable

public BeanTable(List itemList,
                 ColumnFilter columnFilter)
          throws TableException
Constructs a BeanTable instance with specific attributes.

Parameters:
itemList - The list of beans to fill the table with.
columnFilter - The column set filter.
Throws:
TableException - In case no bean class could be determined from the given list.

BeanTable

public BeanTable(FormatHelper formatHelper,
                 List itemList,
                 ColumnFilter columnFilter)
          throws TableException
Constructs a BeanTable instance with specific attributes.

Parameters:
formatHelper - The format helper to use.
itemList - The list of beans to fill the table with.
columnFilter - The column set filter.
Throws:
TableException - In case no bean class could be determined from the given list.

BeanTable

public BeanTable(Class dataType)
Constructs a BeanTable instance with specific attributes.

Parameters:
dataType - The type of beans to fill the table with.

BeanTable

public BeanTable(FormatHelper formatHelper,
                 Class dataType)
Constructs a BeanTable instance with specific attributes.

Parameters:
formatHelper - The format helper to use.
dataType - The type of beans to fill the table with.

BeanTable

public BeanTable(Class dataType,
                 ColumnFilter columnFilter)
Constructs a BeanTable instance with specific attributes.

Parameters:
formatHelper - The format helper to use.
dataType - The type of beans to fill the table with.

BeanTable

public BeanTable(FormatHelper formatHelper,
                 Class dataType,
                 ColumnFilter columnFilter)
Constructs a BeanTable instance with specific attributes.

Parameters:
formatHelper - The format helper to use.
dataType - The daty type to use.
columnFilter - The column set filter.
Method Detail

addColumn

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

Parameters:
name - The column name.
type - The column type.
getter - The getter method.
Returns:
The new column.
Throws:
ColumnAlreadyDefinedException - In case the column was already defined.


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