|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.db.base.DatabaseConnectionSpec
Field Summary | |
private java.lang.String |
alias
|
private int |
connectionPoolType
|
private static java.lang.String |
copyright
|
private java.lang.String |
dataSourceName
|
private java.lang.String |
driverName
|
private java.lang.String |
initialContext
|
private java.lang.String |
jndiDataSource
|
private DatabaseLogonSpec |
logonSpec
|
static int |
POOL_TYPE_NONE
|
static int |
POOL_TYPE_WEBSPHERE
|
private boolean |
promptUID
|
private java.util.Properties |
props
|
private java.lang.String |
providerURL
|
(package private) static long |
serialVersionUID
|
Constructor Summary | |
DatabaseConnectionSpec(java.lang.String aDriverName,
java.lang.String aDataSourceName)
Constructs a new DatabaseConnectionSpec and sets the driver and data source name |
|
DatabaseConnectionSpec(java.lang.String anAlias,
java.lang.String aDriverName,
java.lang.String aDataSourceName)
Constructs a new DatabaseConnectionSPec and sets the driver, data source name, and alias. |
Method Summary | |
java.lang.Object |
clone()
Returns a clone of the DatabaseConnectionSpec. |
DatabaseConnection |
connect()
Return a connection object after successfully connecting using the supplied connection info. |
boolean |
disconnect()
Unregisters the connection with the JDBCConnectionManager and disconnects the connection if there are no other registered users for the connection. |
java.lang.String |
getAlias()
Returns the alias that identifies this connection spec. |
int |
getConnectionPoolType()
Returns the data source name. |
java.lang.String |
getDataSourceName()
Returns the data source name. |
java.lang.String |
getDriverName()
Returns the JDBC driver name. |
java.lang.String |
getId()
Returns the userID. |
java.lang.String |
getInitialContextFactory()
Returns the data source name. |
java.lang.String |
getJndiDataSource()
Returns the data source name. |
DatabaseLogonSpec |
getLogonSpec()
Returns the logon spec. |
java.lang.String |
getPassword()
Returns the password. |
boolean |
getPromptUID()
Returns true if the user requested to be prompted for the userid and password prior to connecting to the database. |
java.util.Properties |
getProps()
Returns the properties associated with the connection. |
java.lang.String |
getProviderURL()
Gets the provider URL. |
void |
setAlias(java.lang.String anAlias)
Sets the alias of this connection spec. |
void |
setConnectionPoolType(int aConnectionPoolType)
Sets the data source name. |
void |
setDataSourceName(java.lang.String aDataSourceName)
Sets the data source name. |
void |
setDriverName(java.lang.String aDriverName)
Sets the JDBC driver name. |
void |
setId(java.lang.String id)
Sets the userID. |
void |
setInitialContextFactory(java.lang.String aInitialContext)
Sets the data source name. |
void |
setJndiDataSource(java.lang.String aJndiDataSource)
Sets the data source name. |
void |
setLogonSpec(DatabaseLogonSpec aLogonSpec)
Sets the user supplied logon spec. |
void |
setPassword(java.lang.String password)
Sets the password. |
void |
setPromptUID(boolean in)
If true, the user requests to be prompted for a userid and password before a connection is made. |
void |
setProps(java.util.Properties p)
|
void |
setProviderURL(java.lang.String aProviderURL)
Sets the provider URL |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.String driverName
private java.lang.String dataSourceName
private java.lang.String alias
private DatabaseLogonSpec logonSpec
private boolean promptUID
private java.util.Properties props
private java.lang.String jndiDataSource
private java.lang.String initialContext
private java.lang.String providerURL
public static final int POOL_TYPE_NONE
public static final int POOL_TYPE_WEBSPHERE
private int connectionPoolType
static final long serialVersionUID
private static final java.lang.String copyright
Constructor Detail |
public DatabaseConnectionSpec(java.lang.String aDriverName, java.lang.String aDataSourceName)
public DatabaseConnectionSpec(java.lang.String anAlias, java.lang.String aDriverName, java.lang.String aDataSourceName)
Method Detail |
public java.lang.Object clone()
public DatabaseConnection connect() throws java.sql.SQLException, java.lang.ClassNotFoundException, DataException
public boolean disconnect() throws java.sql.SQLException, DataException, java.lang.ClassNotFoundException
.Returns false if the DatabaseConnectionSpec does not represent a registered connection with the JDBCConnectionManager. A disconnect is not done for unregistered connections.
public java.lang.String getAlias()
public int getConnectionPoolType()
public java.lang.String getDataSourceName()
public java.lang.String getDriverName()
public java.lang.String getId()
public java.lang.String getInitialContextFactory()
public java.lang.String getJndiDataSource()
public DatabaseLogonSpec getLogonSpec()
public java.lang.String getPassword()
public boolean getPromptUID()
public java.util.Properties getProps()
public java.lang.String getProviderURL()
public void setAlias(java.lang.String anAlias)
public void setConnectionPoolType(int aConnectionPoolType) throws DataException
public void setDataSourceName(java.lang.String aDataSourceName)
public void setDriverName(java.lang.String aDriverName)
public void setId(java.lang.String id)
public void setInitialContextFactory(java.lang.String aInitialContext)
public void setJndiDataSource(java.lang.String aJndiDataSource)
public void setLogonSpec(DatabaseLogonSpec aLogonSpec)
public void setPassword(java.lang.String password)
public void setPromptUID(boolean in)
The default value of this property is false.
promptUID
- true - prompt for userid/password;
false - don't promptgetPromptUID()
public void setProps(java.util.Properties p)
public void setProviderURL(java.lang.String aProviderURL)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |