org.jfree.data.jdbc
public class JDBCXYDataset extends AbstractXYDataset implements XYDataset, TableXYDataset, RangeInfo
Constructor Summary | |
---|---|
JDBCXYDataset(String url, String driverName, String user, String password)
Creates a new dataset (initially empty) and establishes a new database
connection.
| |
JDBCXYDataset(Connection con)
Creates a new dataset (initially empty) using the specified database
connection.
| |
JDBCXYDataset(Connection con, String query)
Creates a new dataset using the specified database connection, and
populates it using data obtained with the supplied query.
|
Method Summary | |
---|---|
void | close()
Close the database connection |
void | executeQuery(String query)
ExecuteQuery will attempt execute the query passed to it against the
existing database connection. |
void | executeQuery(Connection con, String query)
ExecuteQuery will attempt execute the query passed to it against the
provided database connection. |
int | getItemCount(int seriesIndex)
Returns the number of items in the specified series.
|
int | getItemCount()
Returns the number of items in all series. |
int | getLegendItemCount()
Returns the number of items that should be displayed in the legend.
|
String[] | getLegendItemLabels()
Returns the legend item labels.
|
Range | getRangeBounds(boolean includeInterval)
Returns the range of the values in this dataset's range.
|
double | getRangeLowerBound(boolean includeInterval)
Returns the minimum y-value in the dataset.
|
double | getRangeUpperBound(boolean includeInterval)
Returns the maximum y-value in the dataset.
|
int | getSeriesCount()
Returns the number of series in the dataset.
|
Comparable | getSeriesKey(int seriesIndex)
Returns the key for the specified series.
|
Number | getX(int seriesIndex, int itemIndex)
Returns the x-value for the specified series and item. |
Number | getY(int seriesIndex, int itemIndex)
Returns the y-value for the specified series and item.
|
boolean | isTimeSeries()
Returns true if the dataset represents time series data,
and false otherwise.
|
void | setTimeSeries(boolean timeSeries)
Sets a flag that indicates whether or not the data represents a time
series.
|
Parameters: url URL of the database connection. driverName the database driver class name. user the database user. password the database user's password.
Throws: ClassNotFoundException if the driver cannot be found. SQLException if there is a problem connecting to the database.
Parameters: con the database connection.
Throws: SQLException if there is a problem connecting to the database.
Parameters: con the connection. query the SQL query.
Throws: SQLException if there is a problem executing the query.
Parameters: query the query to be executed.
Throws: SQLException if there is a problem executing the query.
Parameters: query the query to be executed. con the connection the query is to be executed against.
Throws: SQLException if there is a problem executing the query.
Parameters: seriesIndex the series (zero-based index).
Returns: The itemCount value
See Also: XYDataset
Returns: The item count.
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.Returns: The legendItemCount value
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 legend item labels.
Parameters: includeInterval a flag that determines whether or not the y-interval is taken into account.
Returns: The range.
Parameters: includeInterval a flag that determines whether or not the y-interval is taken into account.
Returns: The minimum value.
Parameters: includeInterval a flag that determines whether or not the y-interval is taken into account.
Returns: The maximum value.
Returns: The seriesCount value
Parameters: seriesIndex the series (zero-based index).
Returns: The seriesName value
Parameters: seriesIndex the series (zero-based index). itemIndex the item (zero-based index).
Returns: The x-value
See Also: XYDataset
Parameters: seriesIndex the series (zero-based index). itemIndex the item (zero-based index).
Returns: The yValue value
See Also: XYDataset
true
if the dataset represents time series data,
and false
otherwise.
Returns: A boolean.
Parameters: timeSeries the new value of the flag.