SPT RWT Application API

com.sptci.rwt
Class ConnectionData

java.lang.Object
  extended by com.sptci.rwt.ConnectionData
All Implemented Interfaces:
Serializable

public class ConnectionData
extends Object
implements Serializable

A simple bean used to represent different types of database engines that the application can connect to.

© Copyright 2007 Sans Pareil Technologies, Inc.

Version:
$Id: ConnectionData.java 4123 2008-05-25 21:49:01Z rakesh $
Author:
Rakesh Vidyadharan 2007-09-24
See Also:
Serialized Form

Field Summary
private  String database
          The name of the database to connect to.
private  String host
          The fully qualified hostname of the database server to connect to.
private  byte[] password
          The password for the database user to connect as.
private static String PASSWORD_KEY
          The key used to encrypt password.
private  int port
          The port to connect to.
private  String userName
          The database user to connect as.
 
Constructor Summary
protected ConnectionData()
          Default constructor.
 
Method Summary
 String getDatabase()
          Returns database.
 String getHost()
          Returns host.
 String getPassword()
          Returns password.
 int getPort()
          Returns port.
 String getUserName()
          Returns userName.
protected  void setDatabase(String database)
          Set database.
protected  void setHost(String host)
          Set host.
protected  void setPassword(String password)
          Set password.
protected  void setPort(int port)
          Set port.
protected  void setUserName(String userName)
          Set userName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PASSWORD_KEY

private static final String PASSWORD_KEY
The key used to encrypt password.

See Also:
Constant Field Values

host

private String host
The fully qualified hostname of the database server to connect to.


database

private String database
The name of the database to connect to.


port

private int port
The port to connect to.


userName

private String userName
The database user to connect as.


password

private byte[] password
The password for the database user to connect as.

Constructor Detail

ConnectionData

protected ConnectionData()
Default constructor. Not publicly instantiable.

Method Detail

getHost

public String getHost()
Returns host.

Returns:
The value/reference of/to host.

setHost

protected void setHost(String host)
Set host.

Parameters:
host - The value to set.

getDatabase

public String getDatabase()
Returns database.

Returns:
The value/reference of/to database.

setDatabase

protected void setDatabase(String database)
Set database.

Parameters:
database - The value to set.

getPort

public int getPort()
Returns port.

Returns:
The value/reference of/to port.

setPort

protected void setPort(int port)
Set port.

Parameters:
port - The value to set.

getUserName

public String getUserName()
Returns userName.

Returns:
The value/reference of/to userName.

setUserName

protected void setUserName(String userName)
Set userName.

Parameters:
userName - The value to set.

getPassword

public String getPassword()
                   throws RuntimeException
Returns password.

Returns:
The value/reference of/to password.
Throws:
RuntimeException - If the password value cannot be decrypted.

setPassword

protected void setPassword(String password)
                    throws RuntimeException
Set password.

Parameters:
password - The value to set.
Throws:
RuntimeException - If errors are encountered while encrypting the password value.

SPT RWT Application API