|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.data.AbstractDataset | +--org.jfree.data.DefaultCategoryDataset | +--org.jfree.data.JDBCCategoryDataset
A CategoryDataset implementation over a database JDBC result set. The dataset is populated via a call to executeQuery with the string sql query. The sql query must return at least two columns. The first column will be the catagory name and remaining columns values. executeQuery can be called a number of times. The database connection is read-only and no write back facility exists.
Constructor Summary | |
JDBCCategoryDataset(java.sql.Connection connection)
Create a new dataset with the given database connection. |
|
JDBCCategoryDataset(java.sql.Connection connection,
java.lang.String query)
Creates a new dataset with the given database connection, and executes the supplied query to populate the dataset. |
|
JDBCCategoryDataset(java.lang.String url,
java.lang.String driverName,
java.lang.String user,
java.lang.String passwd)
Creates a new dataset with a database connection. |
Method Summary | |
void |
executeQuery(java.lang.String query)
Populates the dataset by executing the supplied query against the existing database connection. |
Methods inherited from class org.jfree.data.DefaultCategoryDataset |
addValue, addValue, equals, getColumnCount, getColumnIndex, getColumnKey, getColumnKeys, getRowCount, getRowIndex, getRowKey, getRowKeys, getValue, getValue, removeColumn, removeColumn, removeRow, removeRow, removeValue, setValue, setValue |
Methods inherited from class org.jfree.data.AbstractDataset |
addChangeListener, fireDatasetChanged, getGroup, notifyListeners, removeChangeListener, setGroup |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.data.Dataset |
addChangeListener, getGroup, removeChangeListener, setGroup |
Constructor Detail |
public JDBCCategoryDataset(java.lang.String url, java.lang.String driverName, java.lang.String user, java.lang.String passwd)
url
- the URL of the database connection.driverName
- the database driver class name.user
- the database user.passwd
- the database user's password.public JDBCCategoryDataset(java.sql.Connection connection)
connection
- the database connection.public JDBCCategoryDataset(java.sql.Connection connection, java.lang.String query)
connection
- the connection.query
- the query.Method Detail |
public void executeQuery(java.lang.String query)
The results from the query are extracted and cached locally, thus applying an upper limit on how many rows can be retrieved successfully.
query
- the query.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |