org.apache.derby.impl.services.hotstandby
Class Database
java.lang.Object
org.apache.derby.impl.services.hotstandby.Database
- public class Database
- extends java.lang.Object
Simple helper class for an internal database connection
- Author:
- Egil S¿rensen
Constructor Summary |
Database(java.lang.String dbName,
java.lang.String username,
java.lang.String password)
Initialize a database |
Method Summary |
java.sql.Connection |
getConnection()
Get the connection for this database |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Database
public Database(java.lang.String dbName,
java.lang.String username,
java.lang.String password)
throws java.sql.SQLException
- Initialize a database
- Parameters:
dbName
- The name of the databaseusername
- The database scheme/username for the databasepassword
- The password needed to connect to this database
- Throws:
java.sql.SQLException
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Get the connection for this database
- Returns:
- A jdbc-connection to this database
- Throws:
java.sql.SQLException