|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.util.db.adapter.DBFactory
This class creates different DB objects based on the database driver that is provided.
Field Summary | |
private static java.util.Hashtable |
adapters
A table of Class objects for registered adapters,
keyed by the fully qualified class name of their associated
JDBC driver. |
Constructor Summary | |
DBFactory()
|
Method Summary | |
(package private) static void |
|
static DB |
create(java.lang.String driver)
Creates an instance of the Turbine database adapter associated with the specified JDBC driver. |
private static void |
registerAdapter(java.lang.String driver,
java.lang.Class adapterClass)
Registers the Class of a database adapter at the
factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Field Detail |
private static java.util.Hashtable adapters
Class
objects for registered adapters,
keyed by the fully qualified class name of their associated
JDBC driver.Constructor Detail |
public DBFactory()
Method Detail |
static void()
private static void registerAdapter(java.lang.String driver, java.lang.Class adapterClass)
Class
of a database adapter at the
factory. This concept allows for dynamically adding new
database adapters using the configuration files instead of
changing the codebase.driver
- The fully-qualified class name of the JDBC driver
to associate with an adapter.adapterClass
- The Class
of the database
adapter associated with driver
.public static DB create(java.lang.String driver) throws java.lang.InstantiationException
driver
- The fully-qualified name of the JDBC driver to
create a new adapter instance for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |