Java Doc for JDBCXYDataset.java in  » Chart » jfreechart » org » jfree » data » jdbc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Chart » jfreechart » org.jfree.data.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jfree.data.xy.AbstractXYDataset
   org.jfree.data.jdbc.JDBCXYDataset

JDBCXYDataset
public class JDBCXYDataset extends AbstractXYDataset implements XYDataset,TableXYDataset,RangeInfo(Code)
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.



Constructor Summary
public  JDBCXYDataset(String url, String driverName, String user, String password)
     Creates a new dataset (initially empty) and establishes a new database connection.
public  JDBCXYDataset(Connection con)
     Creates a new dataset (initially empty) using the specified database connection.
public  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
public  voidclose()
    
public  voidexecuteQuery(String query)
     ExecuteQuery will attempt execute the query passed to it against the existing database connection.
public  voidexecuteQuery(Connection con, String query)
     ExecuteQuery will attempt execute the query passed to it against the provided database connection.
public  intgetItemCount(int seriesIndex)
     Returns the number of items in the specified series.
Parameters:
  seriesIndex - the series (zero-based index).
public  intgetItemCount()
     Returns the number of items in all series.
public  intgetLegendItemCount()
     Returns the number of items that should be displayed in the legend.
public  String[]getLegendItemLabels()
     Returns the legend item labels.
public  RangegetRangeBounds(boolean includeInterval)
     Returns the range of the values in this dataset's range.
Parameters:
  includeInterval - a flag that determines whether or not they-interval is taken into account.
public  doublegetRangeLowerBound(boolean includeInterval)
     Returns the minimum y-value in the dataset.
Parameters:
  includeInterval - a flag that determines whether or not they-interval is taken into account.
public  doublegetRangeUpperBound(boolean includeInterval)
     Returns the maximum y-value in the dataset.
Parameters:
  includeInterval - a flag that determines whether or not they-interval is taken into account.
public  intgetSeriesCount()
     Returns the number of series in the dataset.
public  ComparablegetSeriesKey(int seriesIndex)
     Returns the key for the specified series.
Parameters:
  seriesIndex - the series (zero-based index).
public  NumbergetX(int seriesIndex, int itemIndex)
     Returns the x-value for the specified series and item.
public  NumbergetY(int seriesIndex, int itemIndex)
     Returns the y-value for the specified series and item.
Parameters:
  seriesIndex - the series (zero-based index).
Parameters:
  itemIndex - the item (zero-based index).
public  booleanisTimeSeries()
     Returns true if the dataset represents time series data, and false otherwise.
public  voidsetTimeSeries(boolean timeSeries)
     Sets a flag that indicates whether or not the data represents a time series.


Constructor Detail
JDBCXYDataset
public JDBCXYDataset(String url, String driverName, String user, String password) throws SQLException, ClassNotFoundException(Code)
Creates a new dataset (initially empty) and establishes a new database connection.
Parameters:
  url - URL of the database connection.
Parameters:
  driverName - the database driver class name.
Parameters:
  user - the database user.
Parameters:
  password - the database user's password.
throws:
  ClassNotFoundException - if the driver cannot be found.
throws:
  SQLException - if there is a problem connecting to the database.



JDBCXYDataset
public JDBCXYDataset(Connection con) throws SQLException(Code)
Creates a new dataset (initially empty) using the specified database connection.
Parameters:
  con - the database connection.
throws:
  SQLException - if there is a problem connecting to the database.



JDBCXYDataset
public JDBCXYDataset(Connection con, String query) throws SQLException(Code)
Creates a new dataset using the specified database connection, and populates it using data obtained with the supplied query.
Parameters:
  con - the connection.
Parameters:
  query - the SQL query.
throws:
  SQLException - if there is a problem executing the query.




Method Detail
close
public void close()(Code)
Close the database connection



executeQuery
public void executeQuery(String query) throws SQLException(Code)
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.
Parameters:
  query - the query to be executed.
throws:
  SQLException - if there is a problem executing the query.



executeQuery
public void executeQuery(Connection con, String query) throws SQLException(Code)
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.
Parameters:
  query - the query to be executed.
Parameters:
  con - the connection the query is to be executed against.
throws:
  SQLException - if there is a problem executing the query.



getItemCount
public int getItemCount(int seriesIndex)(Code)
Returns the number of items in the specified series.
Parameters:
  seriesIndex - the series (zero-based index). The itemCount value
See Also:   XYDataset



getItemCount
public int getItemCount()(Code)
Returns the number of items in all series. This method is defined by the TableXYDataset interface. The item count.



getLegendItemCount
public int getLegendItemCount()(Code)
Returns the number of items that should be displayed in the legend. The legendItemCount value



getLegendItemLabels
public String[] getLegendItemLabels()(Code)
Returns the legend item labels. The legend item labels.



getRangeBounds
public Range getRangeBounds(boolean includeInterval)(Code)
Returns the range of the values in this dataset's range.
Parameters:
  includeInterval - a flag that determines whether or not they-interval is taken into account. The range.



getRangeLowerBound
public double getRangeLowerBound(boolean includeInterval)(Code)
Returns the minimum y-value in the dataset.
Parameters:
  includeInterval - a flag that determines whether or not they-interval is taken into account. The minimum value.



getRangeUpperBound
public double getRangeUpperBound(boolean includeInterval)(Code)
Returns the maximum y-value in the dataset.
Parameters:
  includeInterval - a flag that determines whether or not they-interval is taken into account. The maximum value.



getSeriesCount
public int getSeriesCount()(Code)
Returns the number of series in the dataset. The seriesCount value
See Also:   XYDataset
See Also:   Dataset



getSeriesKey
public Comparable getSeriesKey(int seriesIndex)(Code)
Returns the key for the specified series.
Parameters:
  seriesIndex - the series (zero-based index). The seriesName value
See Also:   XYDataset
See Also:   Dataset



getX
public Number getX(int seriesIndex, int itemIndex)(Code)
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.
Parameters:
  seriesIndex - the series (zero-based index).
Parameters:
  itemIndex - the item (zero-based index). The x-value
See Also:   XYDataset



getY
public Number getY(int seriesIndex, int itemIndex)(Code)
Returns the y-value for the specified series and item.
Parameters:
  seriesIndex - the series (zero-based index).
Parameters:
  itemIndex - the item (zero-based index). The yValue value
See Also:   XYDataset



isTimeSeries
public boolean isTimeSeries()(Code)
Returns true if the dataset represents time series data, and false otherwise. A boolean.



setTimeSeries
public void setTimeSeries(boolean timeSeries)(Code)
Sets a flag that indicates whether or not the data represents a time series.
Parameters:
  timeSeries - the new value of the flag.



Methods inherited from org.jfree.data.xy.AbstractXYDataset
public DomainOrder getDomainOrder()(Code)(Java Doc)
public double getXValue(int series, int item)(Code)(Java Doc)
public double getYValue(int series, int item)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.