|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.adfnmc.java.sql.DriverManager
public class DriverManager
Field Summary | |
---|---|
static java.lang.Class |
CLASS_INSTANCE
|
static java.lang.String |
CREATEIFMISSING_PROPERTY
|
static java.lang.String |
PASSWORD_PROPERTY
|
static java.lang.String |
READONLY_PROPERTY
|
static java.lang.String |
SHAREDCACHE_PROPERTY
|
static java.lang.String |
SQLITE_DRIVER_NAME
|
static java.lang.String |
USER_PROPERTY
|
Constructor Summary | |
---|---|
DriverManager()
|
Method Summary | |
---|---|
static void |
deregisterDriver(Driver driver)
Removes a driver from the DriverManager's registered driver list. |
static Connection |
getConnection(java.lang.String url)
Attempts to establish a connection to the given database URL. |
static Connection |
getConnection(java.lang.String url,
Properties info)
Attempts to establish a connection to the given database URL. |
static Connection |
getConnection(java.lang.String url,
java.lang.String user,
java.lang.String password)
Attempts to establish a connection to the given database URL. |
static void |
registerDriver(Driver driver)
Registers a given JDBC driver with the DriverManager. |
static void |
setLogWriter(PrintWriter out)
Sets the PrintWriter that will be used by all loaded drivers, and also the DriverManager. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Class CLASS_INSTANCE
public static final java.lang.String SQLITE_DRIVER_NAME
public static final java.lang.String USER_PROPERTY
public static final java.lang.String PASSWORD_PROPERTY
public static final java.lang.String CREATEIFMISSING_PROPERTY
public static final java.lang.String SHAREDCACHE_PROPERTY
public static final java.lang.String READONLY_PROPERTY
Constructor Detail |
---|
public DriverManager()
Method Detail |
---|
public static void registerDriver(Driver driver) throws SQLException
A newly loaded JDBC driver class should register itself with the DriverManager by calling this method.
driver
- the Driver to register with the DriverManager
SQLException
- if a database access error occurs.public static void deregisterDriver(Driver driver) throws SQLException
If the removal succeeds, the DriverManager will not in future use this driver when asked to get a Connection.
driver
-
SQLException
- if there is an exception accessing the database.public static Connection getConnection(java.lang.String url) throws SQLException
url
- a URL string representing the database target to connect with
SQLException
- if there is an error while attempting to connect to the database identified by the URLpublic static Connection getConnection(java.lang.String url, Properties info) throws SQLException
url
- a URL string representing the database target to connect withinfo
- a set of Properties to use as arguments to set up the connection. Properties are arbitrary string/value
pairs. Normally, at least the properties "user" and "password" should be passed, with appropriate settings
for the userid and its corresponding password to get access to the database concerned.
SQLException
- if there is an error while attempting to connect to the database identified by the URLpublic static Connection getConnection(java.lang.String url, java.lang.String user, java.lang.String password) throws SQLException
url
- a URL string representing the database target to connect withuser
- a userid used to login to the databasepassword
- a password for the userid to login to the database
SQLException
- if there is an error while attempting to connect to the database identified by the URLpublic static void setLogWriter(PrintWriter out)
out
- the PrintWriter to be used
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |