Java Doc for jdbcDriver.java in  » Database-DBMS » hsql » org » hsqldb » 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 » Database DBMS » hsql » org.hsqldb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.hsqldb.jdbcDriver

jdbcDriver
public class jdbcDriver implements Driver(Code)
Each JDBC driver must supply a class that implements the Driver interface.

The Java SQL framework allows for multiple database drivers.

The DriverManager will try to load as many drivers as it can find and then for any given connection request, it will ask each driver in turn to try to connect to the target URL.

The application developer will normally not need to call any function of the Driver directly. All required calls are made by the DriverManager.

HSQLDB-Specific Information:

When the HSQL Database Engine Driver class is loaded, it creates an instance of itself and register it with the DriverManager. This means that a user can load and register the HSQL Database Engine driver by calling

 Class.forName("org.hsqldb.jdbcDriver") 
For more information about how to connect to a HSQL Database Engine database, please see jdbcConnection.

As of version 1.7.0 all JDBC 2 methods can be called with jdk 1.1.x. Some of these method calls require int values that are defined in JDBC 2 version of ResultSet. These values are defined in the jdbcResultSet class when it is compiled with jdk 1.1.x. When using the JDBC 2 methods that require those values as parameters or return one of those values, refer to them as follows: (The code will not be compatible with other JDBC 2 driver, which require ResultSet to be used instead of jdbcResultSet) (fredt@users)

jdbcResultSet.FETCH_FORWARD
jdbcResultSet.TYPE_FORWARD_ONLY
jdbcResultSet TYPE_SCROLL_INSENSITIVE
jdbcResultSet.CONCUR_READ_ONLY


See Also:   jdbcConnection





Method Summary
public  booleanacceptsURL(String url)
     Returns true if the driver thinks that it can open a connection to the given URL.
public  Connectionconnect(String url, Properties info)
     Attempts to make a database connection to the given URL.
public static  ConnectiongetConnection(String url, Properties info)
    
public  intgetMajorVersion()
     Gets the driver's major version number.
public  intgetMinorVersion()
     Gets the driver's minor version number.
public  DriverPropertyInfo[]getPropertyInfo(String url, Properties info)
     Gets information about the possible properties for this driver.
public  booleanjdbcCompliant()
     Reports whether this driver is a genuine JDBC COMPLIANTTM driver.



Method Detail
acceptsURL
public boolean acceptsURL(String url)(Code)
Returns true if the driver thinks that it can open a connection to the given URL. Typically drivers will return true if they understand the subprotocol specified in the URL and false if they don't.
Parameters:
  url - the URL of the database true if this driver can connect to the given URL



connect
public Connection connect(String url, Properties info) throws SQLException(Code)
Attempts to make a database connection to the given URL. The driver returns "null" if it realizes it is the wrong kind of driver to connect to the given URL. This will be common, as when the JDBC driver manager is asked to connect to a given URL it passes the URL to each loaded driver in turn.

The driver raises a SQLException if it is the right driver to connect to the given URL, but has trouble connecting to the database.

The java.util.Properties argument can be used to passed arbitrary string tag/value pairs as connection arguments.

HSQLDB-Specific Information:

For HSQL Database Engine, at least "user" and "password" properties must be included in the Properties. From version 1.7.1 two optional properties are supported:

get_column_name if set to false, a ResultSetMetaData.getColumnName() call will return the user defined label instead of the column name. strict_md if set to true, some ResultSetMetaData methods return more strict values for compatibility reasons.


Parameters:
  url - the URL of the database to which to connect
Parameters:
  info - a list of arbitrary string tag/value pairs as connectionarguments. Normally at least a "user" and "password" propertyshould be included. a Connection object that represents aconnection to the URL
exception:
  SQLException - if a database access error occurs



getConnection
public static Connection getConnection(String url, Properties info) throws SQLException(Code)



getMajorVersion
public int getMajorVersion()(Code)
Gets the driver's major version number. this driver's major version number



getMinorVersion
public int getMinorVersion()(Code)
Gets the driver's minor version number. this driver's minor version number



getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)(Code)
Gets information about the possible properties for this driver.

The getPropertyInfo method is intended to allow a generic GUI tool to discover what properties it should prompt a human for in order to get enough information to connect to a database. Note that depending on the values the human has supplied so far, additional values may become necessary, so it may be necessary to iterate though several calls to getPropertyInfo.

HSQLDB-Specific Information:

HSQLDB 1.7.2 uses the values submitted in info to set the value for each DriverPropertyInfo object returned. It does not use the default value that it would use for the property if the value is null.


Parameters:
  url - the URL of the database to which to connect
Parameters:
  info - a proposed list of tag/value pairs that will be sent onconnect open an array of DriverPropertyInfo objects describing possibleproperties. This array may be an empty array if no propertiesare required.



jdbcCompliant
public boolean jdbcCompliant()(Code)
Reports whether this driver is a genuine JDBC COMPLIANTTM driver. A driver may only report true here if it passes the JDBC compliance tests; otherwise it is required to return false. JDBC compliance requires full support for the JDBC API and full support for SQL 92 Entry Level. It is expected that JDBC compliant drivers will be available for all the major commercial databases.

HSQLDB-Specific Information:

HSQL Database Engine currently does not yet support all required SQL 92 Entry Level functionality and thus returns false. It looks like other drivers return true but do not support all features.

This method is not intended to encourage the development of non-JDBC compliant drivers, but is a recognition of the fact that some vendors are interested in using the JDBC API and framework for lightweight databases that do not support full database functionality, or for special databases such as document information retrieval where a SQL implementation may not be feasible. Description of the Return Value



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.