org.gridbus.broker.persistence.db
Class DBConnection

java.lang.Object
  extended by org.gridbus.broker.persistence.db.DBConnection

public class DBConnection
extends java.lang.Object

Author:
krishna This is the static class that is accessed by the DBWriter and DBReader to get DB connections.

Constructor Summary
DBConnection()
           
 
Method Summary
 void closeConnection()
           
 java.sql.Connection getConnection()
           
 java.sql.Connection getConnection(java.lang.String driver, java.lang.String connectionString, java.lang.String username, java.lang.String password)
           
 java.lang.String getConnectionString()
           
 java.lang.String getDriver()
           
 java.lang.String getHost()
           
 java.lang.String getPassword()
           
 int getPort()
           
 java.lang.String getUsername()
           
 void setConnectionString(java.lang.String connectionString)
           
 void setDriver(java.lang.String driver)
           
 void setHost(java.lang.String host)
           
 void setPassword(java.lang.String passwd)
           
 void setPort(int port)
           
 void setUsername(java.lang.String username)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBConnection

public DBConnection()
Method Detail

getConnection

public java.sql.Connection getConnection(java.lang.String driver,
                                         java.lang.String connectionString,
                                         java.lang.String username,
                                         java.lang.String password)
                                  throws java.lang.Exception
Parameters:
driver -
connectionString -
username -
password -
Returns:
a Connection object
Throws:
java.lang.Exception

getConnection

public java.sql.Connection getConnection()
                                  throws java.lang.Exception
Returns:
a Connection object
Throws:
java.lang.Exception

closeConnection

public void closeConnection()
                     throws java.lang.Exception
Throws:
java.lang.Exception

getConnectionString

public java.lang.String getConnectionString()
Returns:
Returns the connectionString.

setConnectionString

public void setConnectionString(java.lang.String connectionString)
Parameters:
connectionString - The connectionString to set.

getPassword

public java.lang.String getPassword()
Returns:
Returns the password.

setPassword

public void setPassword(java.lang.String passwd)
Parameters:
passwd - The password to set.

getUsername

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

setUsername

public void setUsername(java.lang.String username)
Parameters:
username - The username to set.

getHost

public java.lang.String getHost()
Returns:
Returns the host.

setHost

public void setHost(java.lang.String host)
Parameters:
host - The host to set.

getPort

public int getPort()
Returns:
Returns the port.

setPort

public void setPort(int port)
Parameters:
port - The port to set.

getDriver

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

setDriver

public void setDriver(java.lang.String driver)
Parameters:
driver - The driver to set.