|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfc.jdbc.ConnectionMgr
public abstract class ConnectionMgr
This class implements the gateway to a Database. It should be used to request connections.
| Constructor Summary | |
|---|---|
ConnectionMgr(Log log,
PropertyMgr props)
Constructs a new ConnectionMgr. |
|
ConnectionMgr(PropertyMgr props)
Delegates to ConnectionMgr(Log, PropertyMgr) with
logging to Log.getDefault(). |
|
ConnectionMgr(String jdbc_url,
String jdbc_driver,
String jdbc_user,
String jdbc_password,
String jdbc_catalog)
Creates a new ConnectionMgr with logging to logging to Log.getDefault(). |
|
| Method Summary | |
|---|---|
boolean |
close()
Closes the ConnectionMgr. |
Connection |
getConnection()
Returns a connection if successful, otherwise throws a SQLException. |
DBName |
getDBName()
Returns the dbname corresponding that the database connected to by this connection manager. |
Driver |
getDriver()
Returns the Driver that this connection manager
is using to connect to the database. |
String |
getURL()
Returns the jdbc url that this connection manager is using, |
void |
setCatalog(String name)
If set, the ConnectionMgr will always return connections set to the specified catalog. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionMgr(String jdbc_url,
String jdbc_driver,
String jdbc_user,
String jdbc_password,
String jdbc_catalog)
throws Exception
Log.getDefault().
jdbc.url - jdbc.driver - jdbc.user - jdbc.password - jdbc.catalog - optional, sets the default and can be
null
Exception
public ConnectionMgr(PropertyMgr props)
throws Exception
ConnectionMgr(Log, PropertyMgr) with
logging to Log.getDefault().
Exception
public ConnectionMgr(Log log,
PropertyMgr props)
throws Exception
fc.app.PropertyMgr.
Exception| Method Detail |
|---|
public Driver getDriver()
Driver that this connection manager
is using to connect to the database.
public DBName getDBName()
throws SQLException
SQLExceptionpublic void setCatalog(String name)
public Connection getConnection()
throws SQLException
SQLExceptionpublic boolean close()
handleMgrShutdown() method inside a
synchronized block.
public String getURL()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||