edu.jhu.tmaj.database.conn
Class DatabaseParameters

java.lang.Object
  extended by edu.jhu.tmaj.database.conn.DatabaseParameters

public final class DatabaseParameters
extends java.lang.Object

Represents parameters used to connect to a database, such as IP address and login information.


Constructor Summary
DatabaseParameters(java.net.InetSocketAddress socketAddress, java.lang.String dbName, UserCredentials credentials, DatabaseType databaseType, java.lang.String testSQL)
           
 
Method Summary
 DatabaseType getDatabaseType()
           
 java.lang.String getDbName()
          Returns the name of the database.
 java.lang.String getIpAddress()
           
 java.lang.String getPassword()
          Gets the Password used to connect to the database, e.g.
 int getPort()
           
 java.net.InetSocketAddress getSocketAddress()
          Returns the IP Address and port on which the database runs.
 java.lang.String getTestSQL()
           
 java.lang.String getUsername()
          Gets the Username used to connect to the database, e.g.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatabaseParameters

public DatabaseParameters(java.net.InetSocketAddress socketAddress,
                          java.lang.String dbName,
                          UserCredentials credentials,
                          DatabaseType databaseType,
                          java.lang.String testSQL)
Method Detail

getSocketAddress

public java.net.InetSocketAddress getSocketAddress()
Returns the IP Address and port on which the database runs.


getIpAddress

public java.lang.String getIpAddress()

getPort

public int getPort()

getDbName

public java.lang.String getDbName()
Returns the name of the database. A database server may have multiple databases running on it.


getUsername

public java.lang.String getUsername()
Gets the Username used to connect to the database, e.g. "dba".


getPassword

public java.lang.String getPassword()
Gets the Password used to connect to the database, e.g. "sql123"


getDatabaseType

public DatabaseType getDatabaseType()

getTestSQL

public java.lang.String getTestSQL()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object