net.sourceforge.jdbcimporter.connection
Class JDBCConnectionDef

java.lang.Object
  extended bynet.sourceforge.jdbcimporter.connection.JDBCConnectionDef
All Implemented Interfaces:
ConnectionDef

public class JDBCConnectionDef
extends java.lang.Object
implements ConnectionDef

The JDBCConnectionDef class defines the attributes to use to retrieve a connection from the DriverManager.

Version:
0.6
Author:
Chris Nagy

Field Summary
protected  java.lang.String driver
          The JDBC Driver classname.
protected static org.apache.commons.logging.Log LOG
          The log for debug information.
protected  java.lang.String password
          The password.
protected  java.util.Properties properties
          The properties for the connection.
protected  java.lang.String url
          The connection url.
protected  java.lang.String username
          The username.
 
Constructor Summary
JDBCConnectionDef()
           
 
Method Summary
 java.sql.Connection getConnection()
          Returns the connection.
 java.lang.String getDriver()
          Returns the driver classname.
 java.lang.String getPassword()
          Return the password.
 java.util.Properties getProperties()
          Returns the properties.
 java.lang.String getUrl()
          Returns the connection url.
 java.lang.String getUsername()
          Returns the username.
 void releaseConnection(java.sql.Connection con)
          Releases the connection specified.
 void setDriver(java.lang.String newDriver)
          Sets the driver classname.
 void setPassword(java.lang.String newPassword)
          Sets the password.
 void setProperties(java.util.Properties newProperties)
          Sets the properties.
 void setUrl(java.lang.String newUrl)
          Sets the connection url.
 void setUsername(java.lang.String newUsername)
          Sets the username.
 java.lang.String toString()
          Overrides Object.toString()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG

protected static org.apache.commons.logging.Log LOG
The log for debug information.


driver

protected java.lang.String driver
The JDBC Driver classname.


url

protected java.lang.String url
The connection url.


username

protected java.lang.String username
The username.


password

protected java.lang.String password
The password.


properties

protected java.util.Properties properties
The properties for the connection.

Constructor Detail

JDBCConnectionDef

public JDBCConnectionDef()
Method Detail

setDriver

public void setDriver(java.lang.String newDriver)
Sets the driver classname.

Parameters:
newDriver - the driver classname.

getDriver

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

Returns:
the driver classname

setUrl

public void setUrl(java.lang.String newUrl)
Sets the connection url.

Parameters:
newUrl - the connection url

getUrl

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

Returns:
the connection url

setUsername

public void setUsername(java.lang.String newUsername)
Sets the username.

Parameters:
newUsername - the username

getUsername

public java.lang.String getUsername()
Returns the username.

Returns:
the username

setPassword

public void setPassword(java.lang.String newPassword)
Sets the password.

Parameters:
newPassword - the password

getPassword

public java.lang.String getPassword()
Return the password.

Returns:
the password

setProperties

public void setProperties(java.util.Properties newProperties)
Sets the properties.

Parameters:
newProperties - the properties

getProperties

public java.util.Properties getProperties()
Returns the properties.

Returns:
the properties

getConnection

public java.sql.Connection getConnection()
Description copied from interface: ConnectionDef
Returns the connection.

Specified by:
getConnection in interface ConnectionDef
Returns:
the connection.
See Also:
ConnectionDef.getConnection()

releaseConnection

public void releaseConnection(java.sql.Connection con)
Description copied from interface: ConnectionDef
Releases the connection specified. This method is called when the import is complete and the connection is no longer needed.

Specified by:
releaseConnection in interface ConnectionDef
Parameters:
con - the connection.
See Also:
ConnectionDef.releaseConnection(Connection)

toString

public java.lang.String toString()
Overrides Object.toString()