|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.db.base.DatabaseConnection
Field Summary | |
private DatabaseConnectionSpec |
connSpec
|
private static java.lang.String |
copyright
|
private JDBCConnectionManager |
databaseManager
|
private java.util.Hashtable |
dbSearchTypeInfo
|
private boolean |
externallyManaged
|
protected java.lang.reflect.Method |
getIBMJdbcConn
|
protected java.lang.reflect.Method |
getJdbcConn
|
private java.sql.Connection |
jdbcConnection
|
protected java.lang.reflect.Method |
releaseIBMConn
|
protected java.lang.Object |
websphereConnection
|
(package private) java.lang.Class |
websphereJdbcConnPoolAccess
|
Constructor Summary | |
DatabaseConnection(java.sql.Connection jdbcConnection)
Constructs a new DatabaseConnection and associates it with the provided externally managed jdbcConnection. |
|
DatabaseConnection(JDBCConnectionManager aDatabaseManager)
Constructs a new DatabaseConnection and associates it with a JDBCConnectionManager. |
Method Summary | |
void |
commitTransaction()
Sends commit to the JDBC Connection associated with the DatabaseConnection. |
void |
connectToDataSource()
Attempts to connect using the supplied logon and connection specs |
void |
disconnect()
Disconnect the JDBC connection. |
java.lang.String |
getAlias()
Returns the alias used to identify the connection. |
boolean |
getAutoCommit()
Returns true if changes will be automatically committed. |
java.sql.DatabaseMetaData |
getConnectionMetaData()
Returns the database meta data asociated with this connection. |
DatabaseConnectionSpec |
getConnectionSpec()
Returns the connection spec used to create this connection. |
private java.lang.String |
getConnectionUrl()
Returns the JDBC connection URL (jdbc: |
protected JDBCConnectionManager |
getDatabaseManager()
Returns the Connection Manager that holds on to this connection. |
java.sql.Connection |
getJdbcConnection()
Returns the JDBCConnection held on to by this connection object. |
protected java.util.Hashtable |
getSearchTypeInfo()
Returns a hashtable that contains the searchable setting for the type names for this database. |
int |
getTransactionIsolation()
Returns the connection's current isolation level as an integer. |
boolean |
isConnected()
Use this method to determine whether the connection to the database is open or not. |
protected void |
obtainWebsphereConnection()
|
protected void |
releaseWebsphereConnection()
|
void |
rollbackTransaction()
Sends rollback to the JDBC Connection. |
void |
setAutoCommit(boolean autoCommit)
Sets the autoCommit value in the JDBConnection. |
void |
setConnectionSpec(DatabaseConnectionSpec aConnectionSpec)
Sets the connection spec used to create this connection. |
protected void |
setDatabaseManager(JDBCConnectionManager aDatabaseManager)
Sets the connection manager that holds on to this connection. |
protected void |
setJdbcConnection(java.sql.Connection aJdbcConnection)
Sets the JDBCConnection this connection instance wraps. |
void |
setTransactionIsolation(int isolation)
Sets the transaction isolation level for the connection. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private DatabaseConnectionSpec connSpec
private java.sql.Connection jdbcConnection
private JDBCConnectionManager databaseManager
private boolean externallyManaged
private transient java.util.Hashtable dbSearchTypeInfo
transient java.lang.Class websphereJdbcConnPoolAccess
protected transient java.lang.reflect.Method getIBMJdbcConn
protected transient java.lang.Object websphereConnection
protected transient java.lang.reflect.Method getJdbcConn
protected transient java.lang.reflect.Method releaseIBMConn
private static final java.lang.String copyright
Constructor Detail |
public DatabaseConnection(JDBCConnectionManager aDatabaseManager)
aDatabaseManager
- associated JDBCConnectionManagerpublic DatabaseConnection(java.sql.Connection jdbcConnection) throws java.sql.SQLException
jdbcConnection
- a open JDBC connectionMethod Detail |
public void commitTransaction() throws java.sql.SQLException
public void connectToDataSource() throws java.sql.SQLException, DataException
public void disconnect() throws java.sql.SQLException, DataException, java.lang.NullPointerException
public java.lang.String getAlias()
public boolean getAutoCommit() throws java.sql.SQLException
public java.sql.DatabaseMetaData getConnectionMetaData() throws java.sql.SQLException
public DatabaseConnectionSpec getConnectionSpec()
private java.lang.String getConnectionUrl()
protected JDBCConnectionManager getDatabaseManager()
public java.sql.Connection getJdbcConnection()
protected java.util.Hashtable getSearchTypeInfo() throws java.sql.SQLException
public int getTransactionIsolation() throws java.sql.SQLException
public boolean isConnected() throws java.sql.SQLException
protected void obtainWebsphereConnection() throws DataException
protected void releaseWebsphereConnection() throws DataException
public void rollbackTransaction() throws java.sql.SQLException
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
public void setConnectionSpec(DatabaseConnectionSpec aConnectionSpec)
protected void setDatabaseManager(JDBCConnectionManager aDatabaseManager)
protected void setJdbcConnection(java.sql.Connection aJdbcConnection)
public void setTransactionIsolation(int isolation) throws java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |