BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.jdbc.informix4
Class BaseDriver

java.lang.Object
  |
  +--weblogic.jdbc.informix4.BaseDriver

public abstract class BaseDriver
extends java.lang.Object
implements java.sql.Driver

Author:
Copyright © 2001 BEA Systems, Inc. All Rights Reserved.

Field Summary
protected static boolean useConnectLicense
           
 
Constructor Summary
BaseDriver()
           
 
Method Summary
 boolean acceptsURL(java.lang.String url)
          Returns true if the driver thinks it can open a connection to the given URL.
 java.sql.Connection connect(java.lang.String url, java.util.Properties info)
          Try to make a database connection to the given URL.
 int getMajorVersion()
          Get the driver's major version number.
 int getMinorVersion()
          Get the driver's minor version number.
 java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties properties)
          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.
 boolean handlesSubprotocol(java.lang.String protocol)
           
 boolean jdbcCompliant()
          This driver is jdbc compliant
 java.sql.Connection newConnection(ConnectionInfo info)
           
protected abstract  java.lang.String urlBase()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

useConnectLicense

protected static boolean useConnectLicense
Constructor Detail

BaseDriver

public BaseDriver()
Method Detail

connect

public java.sql.Connection connect(java.lang.String url,
                                   java.util.Properties info)
                            throws java.sql.SQLException
Try to make a database connection to the given URL. The driver should return "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 should raise 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. Normally at least a "user" and "password" properties should be included in the Properties.

Specified by:
connect in interface java.sql.Driver

Parameters:
url - The URL of the database to connect to
info - a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included
Returns:
a Connection to the URL

newConnection

public java.sql.Connection newConnection(ConnectionInfo info)
                                  throws java.sql.SQLException


acceptsURL

public boolean acceptsURL(java.lang.String url)
                   throws java.sql.SQLException
Returns true if the driver thinks 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.
Specified by:
acceptsURL in interface java.sql.Driver

Parameters:
url - The URL of the database.
Returns:
True if this driver can connect to the given URL.

getPropertyInfo

public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url,
                                                     java.util.Properties properties)
                                              throws java.sql.SQLException

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.

Specified by:
getPropertyInfo in interface java.sql.Driver

Parameters:
url - The URL of the database to connect to.
info - A proposed list of tag/value pairs that will be sent on connect open.
Returns:
An array of DriverPropertyInfo objects describing possible properties. This array may be an empty array if no properties are required.

getMajorVersion

public int getMajorVersion()
Get the driver's major version number.
Specified by:
getMajorVersion in interface java.sql.Driver


getMinorVersion

public int getMinorVersion()
Get the driver's minor version number.
Specified by:
getMinorVersion in interface java.sql.Driver


jdbcCompliant

public boolean jdbcCompliant()
This driver is jdbc compliant
Specified by:
jdbcCompliant in interface java.sql.Driver


handlesSubprotocol

public boolean handlesSubprotocol(java.lang.String protocol)


urlBase

protected abstract java.lang.String urlBase()


Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.