|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.agmodel.dbUtility.InternetHost
net.agmodel.dbUtility.JDBC
Provides access to JDBC databases by wrapping java.sql.
Addresses differences between vendor implementations of JDBC drivers.
| Constructor Summary | |
JDBC(String host,
int port,
String databaseName)
|
|
| Method Summary | |
void |
checkForDatabaseUpdates()
connect to database and check the metadata |
boolean |
connect(String username,
String password)
Establishes a JDBC connection to the remote database, using the supplied username and password. |
boolean |
connectForData(String username,
String password)
Called before data is retrieved from the AccessMechanism |
boolean |
connectForMetaData(String username,
String password)
Called before metadata is retrieved from the AccessMechanism |
void |
disconnectFromData()
Called after data is retrieved from the AccessMechanism using connectForData. |
void |
disconnectFromMetaData()
Called after meta data is retrieved from the AccessMechanism using connectForMetaData. |
Connection |
getConn()
Returns the database connection object created by DriverManager.getConnection() Uses the form of DriverManager.getConnection where the usercode and password are passed as separate parameters. |
| Methods inherited from class net.agmodel.dbUtility.InternetHost |
getHost, getPort |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JDBC(String host,
int port,
String databaseName)
| Method Detail |
public boolean connect(String username,
String password)
throws ConnectionException
ConnectionException
public boolean connectForData(String username,
String password)
throws ConnectionException
DBAccessMechanism
connectForData in interface DBAccessMechanismusername - a valid username for the database if it requires it, or null otherwise.password - the corresponding password (not encrypted) if required, or null otherwise.
ConnectionException - if a connection could not be established
public void disconnectFromData()
throws ConnectionException
DBAccessMechanism
disconnectFromData in interface DBAccessMechanismConnectionException - if a connection could not be disconnected
public boolean connectForMetaData(String username,
String password)
throws ConnectionException
DBAccessMechanism
connectForMetaData in interface DBAccessMechanismusername - a valid username for the database if it requires it, or null otherwise.password - the corresponding password (not encrypted) if required, or null otherwise.
ConnectionException - if a connection could not be established
public void disconnectFromMetaData()
throws ConnectionException
DBAccessMechanism
disconnectFromMetaData in interface DBAccessMechanismConnectionException - if a connection could not be disconnectedpublic Connection getConn()
public void checkForDatabaseUpdates()
throws ConnectionException
DBAccessMechanism
checkForDatabaseUpdates in interface DBAccessMechanismConnectionException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||