Java Doc for JDBCCategoryDataset.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.category.DefaultCategoryDataset
   org.jfree.data.jdbc.JDBCCategoryDataset

JDBCCategoryDataset
public class JDBCCategoryDataset extends DefaultCategoryDataset (Code)
A CategoryDataset implementation over a database JDBC result set. The dataset is populated via a call to JDBCCategoryDataset.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 JDBCCategoryDataset.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.




Constructor Summary
public  JDBCCategoryDataset(String url, String driverName, String user, String passwd)
     Creates a new dataset with a database connection.
public  JDBCCategoryDataset(Connection connection)
     Create a new dataset with the given database connection.
public  JDBCCategoryDataset(Connection connection, String query)
     Creates a new dataset with the given database connection, and executes the supplied query to populate the dataset.

Method Summary
public  voidexecuteQuery(String query)
     Populates the dataset by executing the supplied query against the existing database connection.
public  voidexecuteQuery(Connection con, String query)
     Populates the dataset by executing the supplied query against the existing database connection.
public  booleangetTranspose()
     Returns a flag that controls whether or not the table values are transposed when added to the dataset.
public  voidsetTranspose(boolean transpose)
     Sets a flag that controls whether or not the table values are transposed when added to the dataset.


Constructor Detail
JDBCCategoryDataset
public JDBCCategoryDataset(String url, String driverName, String user, String passwd) throws ClassNotFoundException, SQLException(Code)
Creates a new dataset with a database connection.
Parameters:
  url - the URL of the database connection.
Parameters:
  driverName - the database driver class name.
Parameters:
  user - the database user.
Parameters:
  passwd - the database user's password.
throws:
  ClassNotFoundException - if the driver cannot be found.
throws:
  SQLException - if there is an error obtaining a connection to the database.



JDBCCategoryDataset
public JDBCCategoryDataset(Connection connection)(Code)
Create a new dataset with the given database connection.
Parameters:
  connection - the database connection.



JDBCCategoryDataset
public JDBCCategoryDataset(Connection connection, String query) throws SQLException(Code)
Creates a new dataset with the given database connection, and executes the supplied query to populate the dataset.
Parameters:
  connection - the connection.
Parameters:
  query - the query.
throws:
  SQLException - if there is a problem executing the query.




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




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




getTranspose
public boolean getTranspose()(Code)
Returns a flag that controls whether or not the table values are transposed when added to the dataset. A boolean.



setTranspose
public void setTranspose(boolean transpose)(Code)
Sets a flag that controls whether or not the table values are transposed when added to the dataset.
Parameters:
  transpose - the flag.



Methods inherited from org.jfree.data.category.DefaultCategoryDataset
public void addValue(Number value, Comparable rowKey, Comparable columnKey)(Code)(Java Doc)
public void addValue(double value, Comparable rowKey, Comparable columnKey)(Code)(Java Doc)
public void clear()(Code)(Java Doc)
public Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
public int getColumnCount()(Code)(Java Doc)
public int getColumnIndex(Comparable key)(Code)(Java Doc)
public Comparable getColumnKey(int column)(Code)(Java Doc)
public List getColumnKeys()(Code)(Java Doc)
public int getRowCount()(Code)(Java Doc)
public int getRowIndex(Comparable key)(Code)(Java Doc)
public Comparable getRowKey(int row)(Code)(Java Doc)
public List getRowKeys()(Code)(Java Doc)
public Number getValue(int row, int column)(Code)(Java Doc)
public Number getValue(Comparable rowKey, Comparable columnKey)(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public void incrementValue(double value, Comparable rowKey, Comparable columnKey)(Code)(Java Doc)
public void removeColumn(int columnIndex)(Code)(Java Doc)
public void removeColumn(Comparable columnKey)(Code)(Java Doc)
public void removeRow(int rowIndex)(Code)(Java Doc)
public void removeRow(Comparable rowKey)(Code)(Java Doc)
public void removeValue(Comparable rowKey, Comparable columnKey)(Code)(Java Doc)
public void setValue(Number value, Comparable rowKey, Comparable columnKey)(Code)(Java Doc)
public void setValue(double value, Comparable rowKey, Comparable columnKey)(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.