org.oddjob.sql
Class ConnectionType

java.lang.Object
  extended by org.oddjob.sql.ConnectionType
All Implemented Interfaces:
Serializable, ArooaValue, ValueFactory<Connection>

public class ConnectionType
extends Object
implements ValueFactory<Connection>, Serializable

Description

Definition for a Database connection.

Example

See SQLJob for an example.
See Also:
Serialized Form
Author:
Rob Gordon.

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.oddjob.arooa.types.ValueFactory
ValueFactory.Conversions
 
Constructor Summary
ConnectionType()
           
 
Method Summary
 ClassLoader getClassLoader()
           
 String getDriver()
          Get this connections driver class name.
 String getPassword()
          Get the password.
 String getUrl()
          Get the url.
 String getUsername()
          Get the username.
 void setClassLoader(ClassLoader classLoader)
           
 void setDriver(String driver)
          Set this connections dirver class name.
 void setPassword(String password)
          Set the password.
 void setUrl(String url)
          Set the url.
 void setUsername(String username)
          Set the username.
 String toString()
           
 Connection toValue()
          Provide an instance of the type this is a factory for.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConnectionType

public ConnectionType()
Method Detail

toValue

public Connection toValue()
                   throws ArooaConversionException
Description copied from interface: ValueFactory
Provide an instance of the type this is a factory for.

Specified by:
toValue in interface ValueFactory<Connection>
Returns:
An instance of the type. May be null.
Throws:
ArooaConversionException - If unable to provide a value.

getDriver

public String getDriver()
Get this connections driver class name.

Returns:
The driver class name.

setDriver

public void setDriver(String driver)
Set this connections dirver class name.

Parameters:
driver - The driver class name.

getPassword

public String getPassword()
Get the password.

Returns:
The password.

setPassword

public void setPassword(String password)
Set the password.

Parameters:
password - The password.

getUrl

public String getUrl()
Get the url.

Returns:
The url.

setUrl

public void setUrl(String url)
Set the url.

Parameters:
url - The url

getUsername

public String getUsername()
Get the username.

Returns:
The username.

setUsername

public void setUsername(String username)
Set the username.

Parameters:
username - The username.

getClassLoader

public ClassLoader getClassLoader()

setClassLoader

@Inject
public void setClassLoader(ClassLoader classLoader)

toString

public String toString()
Overrides:
toString in class Object