net.sf.farrago.namespace.jdbc
Class MedJdbcUDR

java.lang.Object
  extended by net.sf.farrago.namespace.jdbc.MedJdbcUDR

public abstract class MedJdbcUDR
extends Object

MedJdbcUDR defines some user-defined routines related to MedJdbc. They are used for testing since MedJdbc is the only code which is always built as a jar, even in development environments.

Version:
$Id: //open/dev/farrago/src/net/sf/farrago/namespace/jdbc/MedJdbcUDR.java#9 $
Author:
John V. Sichi

Constructor Summary
MedJdbcUDR()
           
 
Method Summary
static String getDriverForUrl(String url)
          Attempts to determine the driver class name for a given JDBC URL.
static void testConnection(String driverClassName, String url, String userName, String password)
          Uses parameters to test whether a given JDBC connection can be successfully established.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MedJdbcUDR

public MedJdbcUDR()
Method Detail

testConnection

public static void testConnection(String driverClassName,
                                  String url,
                                  String userName,
                                  String password)
                           throws SQLException,
                                  ClassNotFoundException
Uses parameters to test whether a given JDBC connection can be successfully established.

Parameters:
driverClassName - fully-qualified name of the driver class to load (must be pre-installed on Farrago's classpath)
url - JDBC url to use for connection
userName - name of user to connect as
password - password to connect with
Throws:
SQLException
ClassNotFoundException

getDriverForUrl

public static String getDriverForUrl(String url)
Attempts to determine the driver class name for a given JDBC URL.

Parameters:
url - JDBC url
Returns:
fully-qualified class name of driver to use, or null if none found