|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.torque.adapter.AdapterFactory
public final class AdapterFactory
This class creates different Adapter
objects based on specified JDBC driver name.
| Method Summary | |
|---|---|
static Adapter |
autoDetectAdapter(Connection con)
Creates a new instance of the Torque database adapter based on the JDBC meta-data |
static Adapter |
create(String key)
Creates a new instance of the Torque database adapter associated with the specified JDBC driver or adapter key. |
static Adapter |
create(String key,
String className)
Creates a new instance of the Torque database adapter associated with the specified JDBC driver or adapter key and the class defined. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Adapter autoDetectAdapter(Connection con)
throws InstantiationException,
SQLException
con - a database connection
InstantiationException - if the adapter could not be
instantiated
SQLException - if there are problems getting the JDBC meta data
public static Adapter create(String key)
throws InstantiationException
key - The fully-qualified name of the JDBC driver
or a shorter form adapter key.
InstantiationException - throws if the adapter could not be
instantiated
public static Adapter create(String key,
String className)
throws InstantiationException
key - The fully-qualified name of the JDBC driver
or a shorter form adapter key.className - The fully qualified name of the adapter class
InstantiationException - throws if the adapter could not be
instantiated
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||