Class symantec.itools.db.beans.sqleditor.ResultSetTableModel
All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.db.beans.sqleditor.ResultSetTableModel
Object
|
+----AbstractTableModel
|
+----symantec.itools.db.beans.sqleditor.ResultSetTableModel
- public class ResultSetTableModel
- extends AbstractTableModel
- implements Serializable
A TableModel based on a JDBC ResultSet
- Version:
- 1.0 06/18/97
- Author:
- Hristo Tonev
-
columnClasses
-
-
columnNames
-
-
data
- The Vector of Vector of Object values
-
metaData
-
-
moreRows
-
-
resultSet
-
-
symantec.itools.db.beans.sqleditor.ResultSetTableModel()
-
-
symantec.itools.db.beans.sqleditor.ResultSetTableModel(ResultSet)
-
-
fetchData(int)
- Fetch the asking number of rows.
-
getColumnClass(int)
-
-
getColumnCount()
-
-
getColumnName(int)
-
-
getMoreRows()
-
-
getResultSet()
-
-
getResultSetMetaData()
- This method must be called AFTER setResultSet()
-
getRowCount()
-
-
getValueAsObject(int)
-
-
getValueAt(int, int)
-
-
isCellEditable(int, int)
-
-
mapColumnClass(int)
-
-
setColumnNames(String[])
- Set new names for all existing columns.
-
setResultSet(ResultSet)
-
columnClasses
protected java.lang.Class[] columnClasses
columnNames
protected java.lang.String[] columnNames
data
protected java.util.Vector data
- The Vector of Vector of Object values
metaData
protected java.sql.ResultSetMetaData metaData
moreRows
protected boolean moreRows
resultSet
protected java.sql.ResultSet resultSet
ResultSetTableModel
public ResultSetTableModel()
ResultSetTableModel
public ResultSetTableModel(ResultSet rs) throws SQLException
fetchData
public synchronized int fetchData(int maxRowsToFecth) throws SQLException
- Fetch the asking number of rows.
- Parameters:
- maxRowsToFecth - is the number of rows to be fetched.
If
rowsToFecth <= 0
all rows will be fetched.
- Returns:
- the number of fetched rows.
getColumnClass
public synchronized java.lang.Class getColumnClass(int column)
- Overrides:
- getColumnClass in class AbstractTableModel
getColumnCount
public synchronized int getColumnCount()
- Overrides:
- getColumnCount in class AbstractTableModel
getColumnName
public synchronized java.lang.String getColumnName(int column)
- Overrides:
- getColumnName in class AbstractTableModel
getMoreRows
public synchronized boolean getMoreRows()
-
- Returns:
- if there are still more rows in the result set
getResultSet
public synchronized java.sql.ResultSet getResultSet()
getResultSetMetaData
public synchronized java.sql.ResultSetMetaData getResultSetMetaData()
- This method must be called AFTER setResultSet()
- Returns:
- the result set meta data
getRowCount
public synchronized int getRowCount()
- Overrides:
- getRowCount in class AbstractTableModel
getValueAsObject
protected synchronized java.lang.Object getValueAsObject(int columnIndex) throws SQLException
getValueAt
public synchronized java.lang.Object getValueAt(int row,
int column)
- Overrides:
- getValueAt in class AbstractTableModel
isCellEditable
public boolean isCellEditable(int row,
int column)
- Overrides:
- isCellEditable in class AbstractTableModel
mapColumnClass
protected synchronized java.lang.Class mapColumnClass(int column)
setColumnNames
public synchronized void setColumnNames(String[] newColumnNames)
- Set new names for all existing columns. This method
CANNOT change the number of columns.
setResultSet
public synchronized void setResultSet(ResultSet rs) throws SQLException
All Packages Class Hierarchy This Package Previous Next Index