|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.engine.TWGDbConnection
TWGDbConnection is a wrapper class for java.sql.Connection. It keeps additional information about the status of the connection such as number of users, as well as a reference to the database for the connection
IBM Director extensions should use the command interface (eg. TWGDbRunQueryCmd) for database access. They should not instantiate their own TWGDbConnection objects. Additionally, extenstions should use the TWGDatabase.isActive() to be sure the database is active before attempting to use the database.
Method Summary | |
---|---|
void |
close()
Close the connection to the database. |
void |
commit()
Commit the updates to the database |
java.sql.Statement |
createStatement()
Create a new statement on this connection |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
Create a new statement on this connection |
boolean |
getAutoCommit()
Get the autoCommit state for the connection |
int |
getConnectionType()
Get the connection type |
TWGDatabase |
getDatabase()
Get the database that this connection is for |
java.sql.DatabaseMetaData |
getMetaData()
Get the metadata for the database connection |
int |
getNumUsers()
Get the number of users using this connection |
boolean |
getTempConn()
Get the connection type as temporary or permanent. |
void |
incrementDirtyLevel()
Increment the dirty level for this connection. |
boolean |
isClosed()
Check if connection is closed |
boolean |
isDirty(int check)
Check if connection is dirty (has the database had major changes since this |
boolean |
isReadOnly()
Check if connection is read only |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sqlStatement)
Create a new prepared statement on this connection |
void |
rollback()
Rollback the database updates |
protected void |
setTempConn(boolean isTempConn)
Set the connection type as temporary or permanent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public int getNumUsers()
public TWGDatabase getDatabase()
public int getConnectionType()
TWGDatabaseConstants
public java.sql.DatabaseMetaData getMetaData() throws TWGDbException
TWGDbException
DatabaseMetaData
public boolean getAutoCommit() throws TWGDbException
TWGDbException
public void commit() throws TWGDbException
TWGDbException
- for any SQL errorpublic void rollback() throws TWGDbException
TWGDbException
- for any SQL errorpublic void incrementDirtyLevel()
public boolean isDirty(int check)
public void close() throws TWGDbException
TWGDbException
- for any SQL errorspublic boolean isClosed() throws TWGDbException
TWGDbException
- for any SQL errorspublic boolean isReadOnly() throws TWGDbException
TWGDbException
- for any SQL errorspublic java.sql.Statement createStatement() throws TWGDbException
TWGDbException
- for any SQL errorsStatement
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws TWGDbException
TWGDbException
- for any SQL errorsStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sqlStatement) throws TWGDbException
TWGDbException
- for any SQL errorsStatement
protected void setTempConn(boolean isTempConn)
public boolean getTempConn()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |