The Encog Project

org.encog.util.db
Class RepeatableConnection

java.lang.Object
  extended by org.encog.util.db.RepeatableConnection

public class RepeatableConnection
extends java.lang.Object

RepeatableConnection: Establish a database connection that can be reconnected if it is broken.

Author:
jheaton

Constructor Summary
RepeatableConnection(java.lang.String driver, java.lang.String url, java.lang.String uid, java.lang.String pwd)
          Construct a repeatable statement.
 
Method Summary
 void close()
          Close the connection.
 RepeatableStatement createStatement(java.lang.String sql)
          Create a statement.
 java.sql.Connection getConnection()
           
 java.lang.String getDriver()
           
 java.lang.String getPwd()
           
 java.util.List<RepeatableStatement> getStatements()
           
 java.lang.String getUid()
           
 java.lang.String getUrl()
           
 void open()
          Open a database connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepeatableConnection

public RepeatableConnection(java.lang.String driver,
                            java.lang.String url,
                            java.lang.String uid,
                            java.lang.String pwd)
Construct a repeatable statement.

Parameters:
driver - The driver to use.
url - The URL to connect to.
uid - The user id to use.
pwd - The password to use.
Method Detail

close

public void close()
Close the connection.


createStatement

public RepeatableStatement createStatement(java.lang.String sql)
Create a statement.

Parameters:
sql - The SQL.
Returns:
The new statement.

getConnection

public java.sql.Connection getConnection()
Returns:
the connection

getDriver

public java.lang.String getDriver()
Returns:
the driver

getPwd

public java.lang.String getPwd()
Returns:
the pwd

getStatements

public java.util.List<RepeatableStatement> getStatements()
Returns:
the statements

getUid

public java.lang.String getUid()
Returns:
the uid

getUrl

public java.lang.String getUrl()
Returns:
the url

open

public void open()
Open a database connection.


The Encog Project