com.croftsoft.core.sql
Class ConnectionInit

java.lang.Object
  extended by com.croftsoft.core.sql.ConnectionInit
All Implemented Interfaces:
Serializable

public final class ConnectionInit
extends Object
implements Serializable

Initializer object for creating JDBC Connections.

Java 1.1 compatible.

Since:
2001-06-13
Version:
2001-06-13
See Also:
Serialized Form
Author:
David W. Croft

Field Summary
 String jdbcDriverClassName
           
 String jdbcUrlString
           
 String password
           
 String username
           
 
Constructor Summary
ConnectionInit(String[] args)
          Convenience constructor that takes an array of String arguments.
ConnectionInit(String jdbcDriverClassName, String jdbcUrlString, String username, String password)
          Main constructor method.
 
Method Summary
 Connection createConnection()
          Convenience method for creating connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jdbcDriverClassName

public final String jdbcDriverClassName

jdbcUrlString

public final String jdbcUrlString

username

public final String username

password

public final String password
Constructor Detail

ConnectionInit

public ConnectionInit(String jdbcDriverClassName,
                      String jdbcUrlString,
                      String username,
                      String password)
Main constructor method.

Throws:
NullArgumentException - If any of the arguments is null.

ConnectionInit

public ConnectionInit(String[] args)
Convenience constructor that takes an array of String arguments.

The argument ordering is the same as the main constructor method.

Throws:
NullArgumentException - If the args is null or any of its elements is null.
IllegalArgumentException - If args.length != 4.
Method Detail

createConnection

public Connection createConnection()
                            throws ClassNotFoundException,
                                   SQLException
Convenience method for creating connections.

Does not retain reference to newly created Connection.

Throws:
ClassNotFoundException
SQLException

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)