|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpl.kernelpanic.dbmonster.connection.Transaction
public class Transaction
This class provides an unified interface for JDBC connections. It wraps standard JDBC calls.
| Constructor Summary | |
|---|---|
Transaction(ConnectionProvider cp)
Constructs a new connection provider. |
|
| Method Summary | |
|---|---|
void |
abort()
Aborts the connection. |
Connection |
begin()
Starts the JDBC transaction. |
void |
close()
Closes the connection. |
void |
commit()
Commits the transaction. |
void |
execute()
Executes a prepared statement. |
ResultSet |
executeQuery(String query)
Executes query. |
PreparedStatement |
prepareStatement(String query)
Prepares statement. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Transaction(ConnectionProvider cp)
cp - a connection provider| Method Detail |
|---|
public Connection begin()
throws SQLException
SQLException - if connection cannot be established
public void commit()
throws SQLException
SQLException - if connection cannot be establishedpublic void abort()
public final void close()
public ResultSet executeQuery(String query)
throws SQLException
query - the query string
SQLException - if somethig goes wrong
public PreparedStatement prepareStatement(String query)
throws SQLException
query - the query
SQLException - if query cannot be prepared
public void execute()
throws SQLException
SQLException - if query could not be executed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||