edu.jhu.tmaj.database.conn
Class AbstractConnectionFactory

java.lang.Object
  extended by edu.jhu.tmaj.database.conn.AbstractConnectionFactory
All Implemented Interfaces:
ConnectionFactory
Direct Known Subclasses:
MySqlConnectionFactory, OracleConnectionFactory, SQLServerConnectionFactory, SybaseConnectionFactory

abstract class AbstractConnectionFactory
extends java.lang.Object
implements ConnectionFactory

Base Class for ConnectionFactories.


Field Summary
(package private)  DatabaseParameters databaseParameters
           
 
Constructor Summary
AbstractConnectionFactory(DatabaseParameters databaseParameters)
           
 
Method Summary
(package private) abstract  java.lang.String getConnectionString()
           
(package private) abstract  java.lang.String getDriverName()
           
 java.sql.Connection getNewConnection()
          Creates, tests, and returns a new database connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

databaseParameters

final DatabaseParameters databaseParameters
Constructor Detail

AbstractConnectionFactory

AbstractConnectionFactory(DatabaseParameters databaseParameters)
Method Detail

getNewConnection

public final java.sql.Connection getNewConnection()
                                           throws java.sql.SQLException
Creates, tests, and returns a new database connection.

Specified by:
getNewConnection in interface ConnectionFactory
Returns:
new connection to the database
Throws:
java.sql.SQLException - if there is an error connecting to database

getConnectionString

abstract java.lang.String getConnectionString()

getDriverName

abstract java.lang.String getDriverName()