|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jfw.database.Transaction
public final class Transaction
Used with QueryGateway and
StoredProcedureGateway in case of a transaction.
Manage the database connection used by the previous classes so is possible
to make a full commit or rollbak.
| Constructor Summary | |
|---|---|
Transaction()
Use the default db resource from the jfw.properties. |
|
Transaction(java.lang.String resourceName)
Use the parameter resourceName as db resource. |
|
| Method Summary | |
|---|---|
void |
close(boolean commit)
Release the connection and commit or rollback the sql commands executed. |
java.sql.Connection |
getConnection()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Transaction()
throws java.lang.Exception
java.lang.Exception
public Transaction(java.lang.String resourceName)
throws java.lang.Exception
resourceName - the name of a resource as specified in the jfw.properties.
java.lang.Exception| Method Detail |
|---|
public java.sql.Connection getConnection()
public void close(boolean commit)
throws java.lang.Exception
commit - if true do the commit, else do the rollback.
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||