|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.kernelpanic.dbmonster.connection.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 providerMethod Detail |
public final Connection begin() throws SQLException
SQLException
- if connection cannot be establishedpublic final void commit() throws SQLException
SQLException
- if connection cannot be establishedpublic final void abort()
public final void close()
public final ResultSet executeQuery(String query) throws SQLException
query
- the query string
SQLException
- if somethig goes wrongpublic final PreparedStatement prepareStatement(String query) throws SQLException
query
- the query
SQLException
- if query cannot be preparedpublic final 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 |