Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## toolkit.db.queryoptimization
Class ConnectionInfo

    java.lang.Object
      toolkit.db.queryoptimization.ConnectionInfo

    public class ConnectionInfo

extends java.lang.Object

Class ConnectionInfo wraps all information used to create the connection to a database by JDBC driver.

Field Summary
`static int` | `CONNECTION_TYPE_JDBC`
`static int` | `CONNECTION_TYPE_JNDI`

Constructor Summary
`ConnectionInfo(java.lang.String sJndiDatasource, java.lang.String sUser, java.lang.String sPassword)` Constructs a ConnectionInfo with the specified parameters.
`ConnectionInfo(java.lang.String sDriver, java.lang.String sURL, java.lang.String sUser, java.lang.String sPassword)` Constructs a ConnectionInfo with the specified parameters.

Method Summary
`int` | `getConnectionType()` Get current connection type, which should only return “CONNECTION_TYPE_JNDI” or “CONNECTION_TYPE_JDBC”
`java.lang.String` | `getDriver()` Gets the jdbc runtime driver name.
`java.lang.String` | `getJNDIDataSource()`
`java.lang.String` | `getPassword()` Gets the runtime user's password.
`java.lang.String` | `getURL()` Gets the jdbc runtime URL.
`java.lang.String` | `getUser()` Gets the runtime user name used to connect to the database.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CONNECTION_TYPE_JNDI

    public static final int CONNECTION_TYPE_JNDI

See Also:
  Constant Field Values

### CONNECTION_TYPE_JDBC

    public static final int CONNECTION_TYPE_JDBC

See Also:
  Constant Field Values

Constructor Detail

### ConnectionInfo

    public ConnectionInfo(java.lang.String sDriver,
                          java.lang.String sURL,
                          java.lang.String sUser,
                          java.lang.String sPassword)

  Constructs a ConnectionInfo with the specified parameters.

  Parameters:
    `sDriver` - Name of the driver used to connect to the database.
    `sURL` - A jdbc url.
    `sUser` - User name used to connect to the database.
    `sPassword` - User's password.

### ConnectionInfo

    public ConnectionInfo(java.lang.String sJndiDatasource,
                          java.lang.String sUser,
                          java.lang.String sPassword)

  Constructs a ConnectionInfo with the specified parameters.

  Parameters:
    `sJndiDatasource` - Name of the JNDI Datasource
    `sUser` - User name used to connect to the database.
    `sPassword` - User's password.

Method Detail

### getDriver

    public java.lang.String getDriver()

  Gets the jdbc runtime driver name.

  Returns:
    the jdbc driver name.

### getURL

    public java.lang.String getURL()

  Gets the jdbc runtime URL.

  Returns:
    the jdbc URL.

### getUser

    public java.lang.String getUser()

  Gets the runtime user name used to connect to the database.

  Returns:
    the user name.

### getPassword

    public java.lang.String getPassword()

  Gets the runtime user's password.

  Returns:
    the user's password.

### getConnectionType

    public int getConnectionType()

  Get current connection type, which should only return “CONNECTION_TYPE_JNDI” or “CONNECTION_TYPE_JDBC”

### getJNDIDataSource

    public java.lang.String getJNDIDataSource()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD