java.lang.Object | |||
↳ | org.jfree.data.general.AbstractDataset | ||
↳ | org.jfree.data.general.DefaultPieDataset | ||
↳ | org.jfree.data.jdbc.JDBCPieDataset |
A PieDataset
that reads data from a database via JDBC.
A query should be supplied that returns data in two columns, the first containing VARCHAR data, and the second containing numerical data. The data is cached in-memory and can be refreshed at any time.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new JDBCPieDataset and establishes a new database connection.
| |||||||||||
Creates a new JDBCPieDataset using a pre-existing database connection.
| |||||||||||
Creates a new JDBCPieDataset using a pre-existing database connection.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Close the database connection
| |||||||||||
ExecuteQuery will attempt execute the query passed to it against the
existing database connection.
| |||||||||||
ExecuteQuery will attempt execute the query passed to it against the
existing database connection.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new JDBCPieDataset and establishes a new database connection.
url | the URL of the database connection. |
---|---|
driverName | the database driver class name. |
user | the database user. |
password | the database users password. |
ClassNotFoundException | if the driver cannot be found. |
---|---|
SQLException | if there is a problem obtaining a database connection. |
Creates a new JDBCPieDataset using a pre-existing database connection.
The dataset is initially empty, since no query has been supplied yet.
con | the database connection. |
---|
Creates a new JDBCPieDataset using a pre-existing database connection.
The dataset is initialised with the supplied query.
con | the database connection. |
---|---|
query | the database connection. |
SQLException | if there is a problem executing the query. |
---|
Close the database connection
ExecuteQuery will attempt execute the query passed to it 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 the query is to be executed against |
---|---|
query | the query to be executed |
SQLException | if there is a problem executing the query. |
---|
ExecuteQuery will attempt execute the query passed to it 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 to be executed. |
---|
SQLException | if there is a problem executing the query. |
---|