java.lang.Object | ||||
↳ | org.jfree.data.general.AbstractDataset | |||
↳ | org.jfree.data.general.AbstractSeriesDataset | |||
↳ | org.jfree.data.xy.AbstractXYDataset | |||
↳ | org.jfree.data.jdbc.JDBCXYDataset |
This class provides an XYDataset
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 x-axis and remaining columns y-axis values.
executeQuery can be called a number of times.
The database connection is read-only and no write back facility exists.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new dataset (initially empty) and establishes a new database
connection.
| |||||||||||
Creates a new dataset (initially empty) using the specified database
connection.
| |||||||||||
Creates a new dataset using the specified database connection, and
populates it using data obtained with the supplied query.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Close the database connection
| |||||||||||
ExecuteQuery will attempt execute the query passed to it against the
provided database connection.
| |||||||||||
ExecuteQuery will attempt execute the query passed to it against the
existing database connection.
| |||||||||||
Returns the number of items in the specified series.
| |||||||||||
Returns the number of items in all series.
| |||||||||||
This method is deprecated.
This method is not used in JFreeChart 1.0.x (it was left in
the API by mistake and is officially deprecated from version 1.0.3
onwards).
| |||||||||||
This method is deprecated.
This method is not used in JFreeChart 1.0.x (it was left in
the API by mistake and is officially deprecated from version 1.0.3
onwards).
| |||||||||||
Returns the range of the values in this dataset's range.
| |||||||||||
Returns the minimum y-value in the dataset.
| |||||||||||
Returns the maximum y-value in the dataset.
| |||||||||||
Returns the number of series in the dataset.
| |||||||||||
Returns the key for the specified series.
| |||||||||||
Returns the x-value for the specified series and item.
| |||||||||||
Returns the y-value for the specified series and item.
| |||||||||||
Returns
true if the dataset represents time series data,
and false otherwise. | |||||||||||
Sets a flag that indicates whether or not the data represents a time
series.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new dataset (initially empty) and establishes a new database connection.
url | URL of the database connection. |
---|---|
driverName | the database driver class name. |
user | the database user. |
password | the database user's password. |
ClassNotFoundException | if the driver cannot be found. |
---|---|
SQLException | if there is a problem connecting to the database. |
Creates a new dataset (initially empty) using the specified database connection.
con | the database connection. |
---|
SQLException | if there is a problem connecting to the database. |
---|
Creates a new dataset using the specified database connection, and populates it using data obtained with the supplied query.
con | the connection. |
---|---|
query | the SQL query. |
SQLException | if there is a problem executing the query. |
---|
Close the database connection
ExecuteQuery will attempt execute the query passed to it against the provided database connection. If connection is null 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. |
---|
Returns the number of items in the specified series.
seriesIndex | the series (zero-based index). |
---|
Returns the number of items in all series. This method is defined by
the TableXYDataset
interface.
This method is deprecated.
This method is not used in JFreeChart 1.0.x (it was left in
the API by mistake and is officially deprecated from version 1.0.3
onwards).
Returns the number of items that should be displayed in the legend.
This method is deprecated.
This method is not used in JFreeChart 1.0.x (it was left in
the API by mistake and is officially deprecated from version 1.0.3
onwards).
Returns the legend item labels.
Returns the range of the values in this dataset's range.
includeInterval | a flag that determines whether or not the y-interval is taken into account. |
---|
Returns the minimum y-value in the dataset.
includeInterval | a flag that determines whether or not the y-interval is taken into account. |
---|
Returns the maximum y-value in the dataset.
includeInterval | a flag that determines whether or not the y-interval is taken into account. |
---|
Returns the x-value for the specified series and item. The implementation is responsible for ensuring that the x-values are presented in ascending order.
seriesIndex | the series (zero-based index). |
---|---|
itemIndex | the item (zero-based index). |
Returns the y-value for the specified series and item.
seriesIndex | the series (zero-based index). |
---|---|
itemIndex | the item (zero-based index). |
Returns true
if the dataset represents time series data,
and false
otherwise.
Sets a flag that indicates whether or not the data represents a time series.
timeSeries | the new value of the flag. |
---|