Package org.bridgedb.mysql
Class MySQLAccess
- java.lang.Object
-
- org.bridgedb.mysql.MySQLAccess
-
-
Constructor Summary
Constructors Constructor Description MySQLAccess(String dbUrl, String username, String password)Instantiate a connection to the database
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection()Retrieve an active connection to the database
-
-
-
Constructor Detail
-
MySQLAccess
public MySQLAccess(String dbUrl, String username, String password) throws BridgeDBException
Instantiate a connection to the database- Parameters:
dbUrl- - URL of the databaseusername- - usernamepassword- - password- Throws:
BridgeDBException- - if there is a problem connecting to the database.
-
-
Method Detail
-
getConnection
public Connection getConnection() throws BridgeDBException
Retrieve an active connection to the database- Specified by:
getConnectionin interfaceSQLAccess- Returns:
- database connection
- Throws:
BridgeDBException- - if there is a problem establishing a connection
-
-