SPT RWT Application API

com.sptci.rwt
Class ConnectionParameters

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

public class ConnectionParameters
extends Object
implements Serializable

A simple value object used to represent the data required to initiate a connection to a database. T be obtained through DataSource or DriverManager.

© Copyright 2007 Sans Pareil Technologies, Inc.

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

Field Summary
 String database
          The name of the database to connect to.
static String DATABASE
          The encoded value used to represent the database part of a JDBC connection url.
 String databaseType
          The name to use to identify the database engine.
 String driver
          The fully qualified name of the JDBC driver class.
 String host
          The fully qualified hostname of the database server to connect to.
static String HOST
          The encoded value used to represent the host part of a JDBC connection url.
 String password
          The password for the database user to connect as.
 int port
          The port to connect to.
static String PORT
          The encoded value used to represent the port part of a JDBC connection url.
 String urlPattern
          The JDBC connection url pattern to use.
 String userName
          The database user to connect as.
 
Constructor Summary
ConnectionParameters(String userName, String password, String host, int port, String database, String databaseType, String urlPattern, String driver)
          Designated constructor.
 
Method Summary
 String getUrl()
          Return the proper JDBC connection url after replacing place holders in urlPattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOST

public static final String HOST
The encoded value used to represent the host part of a JDBC connection url. "$HOST$"

See Also:
Constant Field Values

PORT

public static final String PORT
The encoded value used to represent the port part of a JDBC connection url. "$PORT$"

See Also:
Constant Field Values

DATABASE

public static final String DATABASE
The encoded value used to represent the database part of a JDBC connection url. "$DATABASE$"

See Also:
Constant Field Values

host

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


database

public final String database
The name of the database to connect to.


port

public final int port
The port to connect to.


userName

public final String userName
The database user to connect as.


password

public final transient String password
The password for the database user to connect as.


databaseType

public final String databaseType
The name to use to identify the database engine.


urlPattern

public final String urlPattern
The JDBC connection url pattern to use. The URL pattern contains encoded values for variables such as $HOST$ etc.


driver

public final String driver
The fully qualified name of the JDBC driver class.

Constructor Detail

ConnectionParameters

public ConnectionParameters(String userName,
                            String password,
                            String host,
                            int port,
                            String database,
                            String databaseType,
                            String urlPattern,
                            String driver)
Designated constructor. Create a new instance with the specified values.

Parameters:
userName - The userName value to use.
password - The password value to use.
host - The host value to use.
port - The port value to use.
database - The database value to use.
urlPattern - The urlPattern value to use.
Method Detail

getUrl

public String getUrl()
Return the proper JDBC connection url after replacing place holders in urlPattern.

Returns:
The proper connection url.

SPT RWT Application API