org.apache.torque.adapter
Class DBFactory

java.lang.Object
  extended byorg.apache.torque.adapter.DBFactory

public class DBFactory
extends java.lang.Object

This class creates different DB objects based on specified JDBC driver name.

Version:
$Id: DBFactory.java,v 1.34 2002/11/11 11:38:24 mpoeschl Exp $
Author:
Frank Y. Kim, Jon S. Stevens, Brett McLaughlin, Ralf Stranzenbach, Daniel Rall

Field Summary
private static java.util.Map adapters
          JDBC driver to Torque Adapter map.
 
Constructor Summary
DBFactory()
           
 
Method Summary
static DB create(java.lang.String driver)
          Creates a new instance of the Turbine database adapter associated with the specified JDBC driver or adapter key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

adapters

private static java.util.Map adapters
JDBC driver to Torque Adapter map.

Constructor Detail

DBFactory

public DBFactory()
Method Detail

create

public static DB create(java.lang.String driver)
                 throws java.lang.InstantiationException
Creates a new instance of the Turbine database adapter associated with the specified JDBC driver or adapter key.

Parameters:
driver - The fully-qualified name of the JDBC driver to create a new adapter instance for or a shorter form adapter key.
Returns:
An instance of a Turbine database adapter.
Throws:
java.lang.InstantiationException - throws if the JDBC driver could not be instantiated


Copyright © 1999-2003 Apache Software Foundation. All Rights Reserved.