org.apache.derby.impl.services.hotstandby
Class Database

java.lang.Object
  extended byorg.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
 

Constructor Detail

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 database
username - The database scheme/username for the database
password - The password needed to connect to this database
Throws:
java.sql.SQLException
Method Detail

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