java.lang.Object | |||
↳ | org.jfree.data.general.AbstractDataset | ||
↳ | org.jfree.data.category.DefaultCategoryDataset | ||
↳ | org.jfree.data.jdbc.JDBCCategoryDataset |
A CategoryDataset
implementation over a database JDBC result set.
The dataset is populated via a call to executeQuery(String)
with
the string SQL query. The SQL query must return at least two columns. The
first column will be the category name and remaining columns values (each
column represents a series). Subsequent calls to
executeQuery(String)
will refresh the dataset.
The database connection is read-only and no write back facility exists.
NOTE: Many people have found this class too restrictive in general use.
For the greatest flexibility, please consider writing your own code to read
data from a ResultSet
and populate a
DefaultCategoryDataset
directly.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new dataset with a database connection.
| |||||||||||
Create a new dataset with the given database connection.
| |||||||||||
Creates a new dataset with the given database connection, and executes
the supplied query to populate the dataset.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Populates the dataset by executing the supplied query against the
existing database connection.
| |||||||||||
Populates the dataset by executing the supplied query against the
existing database connection.
| |||||||||||
Returns a flag that controls whether or not the table values are
transposed when added to the dataset.
| |||||||||||
Sets a flag that controls whether or not the table values are transposed
when added to the dataset.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new dataset with a database connection.
url | the URL of the database connection. |
---|---|
driverName | the database driver class name. |
user | the database user. |
passwd | the database user's password. |
ClassNotFoundException | if the driver cannot be found. |
---|---|
SQLException | if there is an error obtaining a connection to the database. |
Create a new dataset with the given database connection.
connection | the database connection. |
---|
Creates a new dataset with the given database connection, and executes the supplied query to populate the dataset.
connection | the connection. |
---|---|
query | the query. |
SQLException | if there is a problem executing the query. |
---|
Populates the dataset by executing the supplied query against the existing database connection. If no connection exists then no action is taken.
The results from the query are extracted and cached locally, thus applying an upper limit on how many rows can be retrieved successfully.
con | the connection. |
---|---|
query | the query. |
SQLException | if there is a problem executing the query. |
---|
Populates the dataset by executing the supplied query against the existing database connection. If no connection exists then no action is taken.
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. |
---|
SQLException | if there is a problem executing the query. |
---|
Returns a flag that controls whether or not the table values are transposed when added to the dataset.
Sets a flag that controls whether or not the table values are transposed when added to the dataset.
transpose | the flag. |
---|