org.radrails.db.core.ibmdb2
Class IBMDB2DatabaseConnection
java.lang.Object
org.radrails.db.core.DatabaseConnection
org.radrails.db.core.ibmdb2.IBMDB2DatabaseConnection
- public class IBMDB2DatabaseConnection
- extends DatabaseConnection
Verifies a connection can be made with the database.
- Version:
- 0.2.0
- Author:
- mbaumbach
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DB2_LOCALHOST
public static final java.lang.String DB2_LOCALHOST
- See Also:
- Constant Field Values
DB2_DEFAULT_PORT
public static final java.lang.String DB2_DEFAULT_PORT
- See Also:
- Constant Field Values
JDBC_DB2_URL
public static final java.lang.String JDBC_DB2_URL
- See Also:
- Constant Field Values
CONNECTION_URL
public static final java.lang.String CONNECTION_URL
- See Also:
- Constant Field Values
IBMDB2DatabaseConnection
public IBMDB2DatabaseConnection()
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)