|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--tppt.xopen.DBManager
DBManager is responsbile to interact to the DBMS through
the JDBC. It is used by the ResourceManager.
| Field Summary | |
private java.sql.Connection |
connection
The database connection. |
private java.lang.String |
dbname
The name of DBMS. |
private boolean |
isChained
|
private java.sql.Statement |
stmt
the Statement object. |
| Constructor Summary | |
DBManager()
The empty constructor. |
|
| Method Summary | |
boolean |
closeTransaction()
Close the DB Connection. |
boolean |
commitTransaction()
Commit the transaction. |
boolean |
createConnection(DBSetting setting)
Create the connection to the database according to the JDBC setting passed from user's Application Program. |
boolean |
executeTransaction(java.lang.String sql)
Execute the SQL command. |
java.lang.String |
getDBName()
Get the name of DBMS the manager connect to. |
static void |
main(java.lang.String[] args)
|
boolean |
rollbackTransaction()
Rollback the transaction. |
void |
setChained(boolean flag)
|
boolean |
startTransaction()
Start the local transaction. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.sql.Connection connection
private java.sql.Statement stmt
private boolean isChained
private java.lang.String dbname
| Constructor Detail |
public DBManager()
| Method Detail |
public boolean createConnection(DBSetting setting)
ResourceManager.setting - the JDBC settingpublic java.lang.String getDBName()
public void setChained(boolean flag)
public boolean startTransaction()
public boolean commitTransaction()
public boolean rollbackTransaction()
public boolean executeTransaction(java.lang.String sql)
sql - the SQL String.public boolean closeTransaction()
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||