org.radrails.db.core.sqlite
Class SQLiteDatabaseConnection

java.lang.Object
  extended byorg.radrails.db.core.DatabaseConnection
      extended byorg.radrails.db.core.sqlite.SQLiteDatabaseConnection

public class SQLiteDatabaseConnection
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_SQLITE_URL
           
static java.lang.String SQLITE_DBFILE
           
static java.lang.String SQLITE_DEFAULT_PORT
           
 
Constructor Summary
SQLiteDatabaseConnection()
           
 
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

SQLITE_DBFILE

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

SQLITE_DEFAULT_PORT

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

JDBC_SQLITE_URL

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

CONNECTION_URL

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

SQLiteDatabaseConnection

public SQLiteDatabaseConnection()
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)