com.rapidminer.tools.jdbc
Class DriverAdapter

java.lang.Object
  extended by com.rapidminer.tools.jdbc.DriverAdapter
All Implemented Interfaces:
java.sql.Driver

public class DriverAdapter
extends java.lang.Object
implements java.sql.Driver

This adaptor is needed for dynamical loading of JDBC drivers. It is not possible to use an URLClassLoader and overload class.forName() specifying the ClassLoader for the driver management necessary for creating drivers by Class.forName(). The DriverManager will refuse to use a driver not loaded by the system ClassLoader in this case. Therefore this adapter was implemented. See http://www.kfu.com/~nsayer/Java/dyn-jdbc.html

Author:
Ingo Mierswa

Constructor Summary
DriverAdapter(java.sql.Driver d)
           
 
Method Summary
 boolean acceptsURL(java.lang.String u)
           
 java.sql.Connection connect(java.lang.String u, java.util.Properties p)
           
 boolean equals(java.lang.Object o)
           
 int getMajorVersion()
           
 int getMinorVersion()
           
 java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String u, java.util.Properties p)
           
 int hashCode()
           
 boolean jdbcCompliant()
           
 java.lang.String toLongString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DriverAdapter

public DriverAdapter(java.sql.Driver d)
Method Detail

acceptsURL

public boolean acceptsURL(java.lang.String u)
                   throws java.sql.SQLException
Specified by:
acceptsURL in interface java.sql.Driver
Throws:
java.sql.SQLException

connect

public java.sql.Connection connect(java.lang.String u,
                                   java.util.Properties p)
                            throws java.sql.SQLException
Specified by:
connect in interface java.sql.Driver
Throws:
java.sql.SQLException

getMajorVersion

public int getMajorVersion()
Specified by:
getMajorVersion in interface java.sql.Driver

getMinorVersion

public int getMinorVersion()
Specified by:
getMinorVersion in interface java.sql.Driver

getPropertyInfo

public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String u,
                                                     java.util.Properties p)
                                              throws java.sql.SQLException
Specified by:
getPropertyInfo in interface java.sql.Driver
Throws:
java.sql.SQLException

jdbcCompliant

public boolean jdbcCompliant()
Specified by:
jdbcCompliant in interface java.sql.Driver

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toLongString

public java.lang.String toLongString()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2001-2009 by Rapid-I