Package ca.phon.query.report.datasource
Class DefaultTableDataSource
java.lang.Object
ca.phon.query.report.datasource.DefaultTableDataSource
- All Implemented Interfaces:
TableDataSource
Basic implementation of a
TableDataSource
. Data
is stored in a list of arrays.-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
append
(DefaultTableDataSource otherTable) void
deleteRow
(int row) Get all rows which match the given key values for the given key columns.int
Number of columns (not including column header)int
getColumnIndex
(String columnName) getColumnTitle
(int col) Get the name of the specified columngetDefaultColumnTitle
(int col) Object[]
getRow
(int row) int
Number of rows (not including column header)getValueAt
(int[] keyCols, String[] rowKey, String colName) getValueAt
(int[] keyCols, String[] rowKey, String colName, boolean ignoreDiacritics, boolean caseSensitive) getValueAt
(int row, int col) Return the value at the given row+col.getValueAt
(int row, String columnName) getValueAt
(int keyCol, String rowKey, String colName) getValueAt
(String rowKey, String colName) Return the value at cell for given rowKey, colName.getValueAt
(String keyCol, String rowKey, String colName) Class<?>
inferColumnType
(int col) Return the type of the first non-null value encountered in the specified column.void
protected void
setColumnCount
(int columns) void
setColumnTitle
(int col, String title) void
setValueAt
(int[] keyCols, String[] rowKey, String colName, boolean ignoreDiacritics, boolean caseSensitive, Object value) void
setValueAt
(int[] keyCols, String[] rowKey, String colName, Object value) void
setValueAt
(int row, int col, Object newVal) void
setValueAt
(int row, String colname, Object newVal)
-
Constructor Details
-
DefaultTableDataSource
public DefaultTableDataSource() -
DefaultTableDataSource
-
-
Method Details
-
getRowData
-
getRow
-
deleteRow
public void deleteRow(int row) -
insertRow
-
addRow
-
setColumnCount
protected void setColumnCount(int columns) -
getColumnCount
public int getColumnCount()Description copied from interface:TableDataSource
Number of columns (not including column header)- Specified by:
getColumnCount
in interfaceTableDataSource
-
getRowCount
public int getRowCount()Description copied from interface:TableDataSource
Number of rows (not including column header)- Specified by:
getRowCount
in interfaceTableDataSource
-
getColumnIndex
- Specified by:
getColumnIndex
in interfaceTableDataSource
-
findRows
Get all rows which match the given key values for the given key columns.- Parameters:
keycols
-keyvals
-- Returns:
- list of rows which match
-
findRows
-
getValueAt
-
getValueAt
Description copied from interface:TableDataSource
Return the value at the given row+col.- Specified by:
getValueAt
in interfaceTableDataSource
- Returns:
- the value at the given pos
-
getValueAt
Return the value at cell for given rowKey, colName. This method assumes that each row begins with a unique key.- Parameters:
rowKey
-colName
-- Returns:
- cellValue at given rowKey, colName intersection.
-
getValueAt
-
getValueAt
-
getValueAt
-
getValueAt
-
setValueAt
-
setValueAt
-
setValueAt
-
setValueAt
-
getDefaultColumnTitle
-
getColumnTitle
Description copied from interface:TableDataSource
Get the name of the specified column- Specified by:
getColumnTitle
in interfaceTableDataSource
- Returns:
- the column title
-
setColumnTitle
-
inferColumnType
Return the type of the first non-null value encountered in the specified column.- Parameters:
col
-- Returns:
- class of the first real value in the columm
-
append
-