Package org.apache.torque.adapter
Klasse AdapterFactory
java.lang.Object
org.apache.torque.adapter.AdapterFactory
This class creates different
Adapter
objects based on specified JDBC driver name.- Version:
- $Id: AdapterFactory.java 1912475 2023-09-22 06:55:59Z gk $
- Autor:
- Frank Y. Kim, Jon S. Stevens, Brett McLaughlin, Ralf Stranzenbach, Daniel Rall, Henning P. Schmiedehausen
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Adapter
Creates a new instance of the Torque database adapter based on the JDBC meta-datastatic Adapter
Creates a new instance of the Torque database adapter associated with the specified JDBC driver or adapter key.static Adapter
Creates a new instance of the Torque database adapter associated with the specified JDBC driver or adapter key and the class defined.static void
setCapabilities
(Connection con, Adapter adapter) Update static capabilities of the Torque database adapter with actual readings based on the JDBC meta-data
-
Methodendetails
-
autoDetectAdapter
Creates a new instance of the Torque database adapter based on the JDBC meta-data- Parameter:
con
- a database connection- Gibt zurück:
- An instance of a Torque database adapter, or null if no adapter could be detected.
- Löst aus:
InstantiationException
- if the adapter could not be instantiatedSQLException
- if there are problems getting the JDBC meta data
-
setCapabilities
Update static capabilities of the Torque database adapter with actual readings based on the JDBC meta-data- Parameter:
con
- a database connectionadapter
- an adapter- Löst aus:
SQLException
- if there are problems getting the JDBC meta data
-
create
Creates a new instance of the Torque database adapter associated with the specified JDBC driver or adapter key.- Parameter:
key
- The fully-qualified name of the JDBC driver or a shorter form adapter key.- Gibt zurück:
- An instance of a Torque database adapter, or null if no adapter exists for the given key.
- Löst aus:
InstantiationException
- throws if the adapter could not be instantiated
-
create
Creates a new instance of the Torque database adapter associated with the specified JDBC driver or adapter key and the class defined.- Parameter:
key
- The fully-qualified name of the JDBC driver or a shorter form adapter key.className
- The fully qualified name of the adapter class- Gibt zurück:
- An instance of a Torque database adapter.
- Löst aus:
InstantiationException
- throws if the adapter could not be instantiated
-