com.nec.tdd.tools.dbMapper
Class DBConnectionInfo

java.lang.Object
  |
  +--com.nec.tdd.tools.dbMapper.DBConnectionInfo

public class DBConnectionInfo
extends java.lang.Object

This class encapsulates a database connection information, such as JDBC url, JDBC driver class, user name & password, that is used to create a DBConnection object from a connection manager.

DBConnectionInfo constructor takes a database connection config xml file as input, and initializes itself with properties defined in xml file.


Constructor Summary
DBConnectionInfo()
           
DBConnectionInfo(java.net.URL dbInfoXMLURL)
          Constructs a DBConnectionInfo object with given database connection config xml.
 
Method Summary
 java.lang.String getDBName()
          Returns data-source identifier.
 java.lang.String getDBUrl()
          Get the data-source's database url (of the form jdbc:subprotocol:subname).
 java.lang.String getDriver()
          Get the data-source's JDBC driver class.
 java.lang.String getPassword()
          Get the database user's password.
 java.lang.String getUserName()
          Get the database user on whose behalf the connection will be made.
 void setDBName(java.lang.String dbName)
          Set data-source identifier.
 void setDBUrl(java.lang.String dbUrl)
          Set the database url (of the form jdbc:subprotocol:subname) that is used by the data-source to establish a databse connection.
 void setDriver(java.lang.String driver)
          Set the JDBC driver class that is used by the data-source to establish a databse connection.
 void setPassword(java.lang.String password)
          Set the database user's password.
 void setUserName(java.lang.String userName)
          Set the database user on whose behalf the connection will be made.
 java.lang.String toString()
          Returns string representation of DBConnectionInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBConnectionInfo

public DBConnectionInfo()

DBConnectionInfo

public DBConnectionInfo(java.net.URL dbInfoXMLURL)
                 throws java.lang.Exception
Constructs a DBConnectionInfo object with given database connection config xml. It parses the input xml and initializes itself with properties defined in the xml.
Parameters:
dbInfoXMLURL - a database connection config (xml).
Throws:
java.lang.Exception - if a xml parsing error occurs.
Method Detail

getDBName

public java.lang.String getDBName()
Returns data-source identifier.

setDBName

public void setDBName(java.lang.String dbName)
Set data-source identifier.

getDriver

public java.lang.String getDriver()
Get the data-source's JDBC driver class.

setDriver

public void setDriver(java.lang.String driver)
Set the JDBC driver class that is used by the data-source to establish a databse connection.

getDBUrl

public java.lang.String getDBUrl()
Get the data-source's database url (of the form jdbc:subprotocol:subname).

setDBUrl

public void setDBUrl(java.lang.String dbUrl)
Set the database url (of the form jdbc:subprotocol:subname) that is used by the data-source to establish a databse connection.

getUserName

public java.lang.String getUserName()
Get the database user on whose behalf the connection will be made.

setUserName

public void setUserName(java.lang.String userName)
Set the database user on whose behalf the connection will be made.

getPassword

public java.lang.String getPassword()
Get the database user's password.

setPassword

public void setPassword(java.lang.String password)
Set the database user's password.

toString

public java.lang.String toString()
Returns string representation of DBConnectionInfo.
Overrides:
toString in class java.lang.Object