org.jfree.report.modules.misc.tablemodel
public class ScrollableResultSetTableModel extends AbstractTableModel implements CloseableTableModel
ResultSetTableModelFactory.generateDefaultTableModel (ResultSet rs)
. That
implementation will read all data from the given ResultSet and keep that data in
memory.
Use the close() function to close the ResultSet contained in this model.
Constructor Summary | |
---|---|
ScrollableResultSetTableModel(ResultSet resultset, boolean labelMapMode)
Constructs the model.
| |
protected | ScrollableResultSetTableModel(boolean labelMapMode)
Creates a new scrollable result set with no resultset assigned and the specified
label map mode.
|
Method Summary | |
---|---|
void | close()
Clears the model of the current result set. |
Class | getColumnClass(int column)
Returns the class of the resultset column. |
String | getColumnClassName(int column)
Returns the classname of the resultset column. |
int | getColumnCount()
Returns the number of columns in the ResultSet. |
String | getColumnName(int column)
Returns the columnLabel or column name for the given column. |
int | getRowCount()
Get a rowCount. |
Object | getValueAt(int row, int column)
Returns the value of the specified row and the specified column from within the
resultset.
|
boolean | isLabelMapMode()
Returns the column name mode used to map column names into column indices. |
void | updateResultSet(ResultSet resultset)
Updates the result set in this model with the given ResultSet object.
|
Parameters: resultset the result set. labelMapMode defines, whether to use column names or column labels to compute the column index.
Throws: SQLException if there is a problem with the result set.
Parameters: labelMapMode defines, whether to use column names or column labels to compute the column index.
Parameters: column the column index.
Returns: the column class.
Parameters: column the column index.
Returns: the column class name.
Returns: the column count.
See Also: java.sql.ResultSetMetaData#getColumnCount()
Parameters: column the column index.
Returns: the column name.
See Also: java.sql.ResultSetMetaData#getColumnLabel(int)
Returns: the row count.
Parameters: row the row index. column the column index.
Returns: the value.
Returns: true, if the column label is used for the mapping, false otherwise.
See Also: ResultSetMetaData#getColumnLabel ResultSetMetaData#getColumnName
Parameters: resultset the new result set.
Throws: SQLException if there is a problem with the result set.