org.radrails.db.core.oracle
Class OracleDatabaseConnection

java.lang.Object
  extended byorg.radrails.db.core.DatabaseConnection
      extended byorg.radrails.db.core.oracle.OracleDatabaseConnection

public class OracleDatabaseConnection
extends DatabaseConnection

Verifies a connection can be made with the database.

Version:
0.2.0
Author:
mbaumbach

Field Summary
static java.lang.String CONNECTION_URL
           
static java.lang.String JDBC_ORACLE_URL
           
static java.lang.String ORACLE_DEFAULT_PORT
           
static java.lang.String ORACLE_LOCALHOST
           
 
Constructor Summary
OracleDatabaseConnection()
           
 
Method Summary
 java.sql.Connection connect(DatabaseDescriptor desc)
          Gets a connection to a database.
 java.lang.String getDefaultPort()
          Gets the default port for the specified database connection.
 
Methods inherited from class org.radrails.db.core.DatabaseConnection
testConnect
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORACLE_LOCALHOST

public static final java.lang.String ORACLE_LOCALHOST
See Also:
Constant Field Values

ORACLE_DEFAULT_PORT

public static final java.lang.String ORACLE_DEFAULT_PORT
See Also:
Constant Field Values

JDBC_ORACLE_URL

public static final java.lang.String JDBC_ORACLE_URL
See Also:
Constant Field Values

CONNECTION_URL

public static final java.lang.String CONNECTION_URL
See Also:
Constant Field Values
Constructor Detail

OracleDatabaseConnection

public OracleDatabaseConnection()
Method Detail

getDefaultPort

public java.lang.String getDefaultPort()
Description copied from class: DatabaseConnection
Gets the default port for the specified database connection.

Specified by:
getDefaultPort in class DatabaseConnection
Returns:
The default port, or null if no default is known.
See Also:
DatabaseConnection.getDefaultPort()

connect

public java.sql.Connection connect(DatabaseDescriptor desc)
                            throws java.sql.SQLException,
                                   java.lang.InstantiationException,
                                   java.lang.IllegalAccessException
Description copied from class: DatabaseConnection
Gets a connection to a database.

Specified by:
connect in class DatabaseConnection
Parameters:
desc - The DatabaseDescriptor to obtain information from.
Returns:
A java.sql.Connection to the database.
Throws:
java.sql.SQLException - If an error occurs while connecting to the database
java.lang.IllegalAccessException - If an error occurs while getting the driver class.
java.lang.InstantiationException - If the driver class cannot be instantiated.
See Also:
DatabaseConnection.connect(org.radrails.db.core.DatabaseDescriptor)