org.ujac.util.table
Class PivotTable

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

public class PivotTable
extends DataTable

Name: PivotTable
Description: A table implementation, generating pivot tables out of ordered data tables.

Author:
lauerc
See Also:
Serialized Form

Field Summary
static int FUNCTION_COUNT
          Constant for function type 'COUNT'.
static int FUNCTION_SUM
          Constant for function type 'SUM'.
 
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
PivotTable(Table dataTable, String[] groupColumns, String columnKey, String dataKey, FunctionExecutor function)
          Constructs a PivotTable instance with specific attributes.
 
Method Summary
 
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
 

Field Detail

FUNCTION_SUM

public static final int FUNCTION_SUM
Constant for function type 'SUM'.

See Also:
Constant Field Values

FUNCTION_COUNT

public static final int FUNCTION_COUNT
Constant for function type 'COUNT'.

See Also:
Constant Field Values
Constructor Detail

PivotTable

public PivotTable(Table dataTable,
                  String[] groupColumns,
                  String columnKey,
                  String dataKey,
                  FunctionExecutor function)
           throws TableException
Constructs a PivotTable instance with specific attributes.

Parameters:
dataTable - The data table.
groupColumns - The group column list.
columnKey - The column key.
dataKey - The data key.
function - The function to use.
Throws:
TableException - In case a table access failure occurs.


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