|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.util.sql.Transaction
public class Transaction
Transaction
Field Summary | |
---|---|
static int |
COMMITED
|
static int |
OPENED
|
static int |
ROLLEDBACK
|
Constructor Summary | |
---|---|
Transaction()
Constructor |
|
Transaction(Plugin plugin)
Constructor |
Method Summary | |
---|---|
void |
commit()
Commit the transaction |
void |
executeStatement()
Execute the current statement |
protected void |
finalize()
Checks that the transaction has been commited (or rolled back) before being destroyed and release all transaction resources (statement, connection, ...) if not. |
PreparedStatement |
getStatement()
The current prepared statement |
int |
getStatus()
Return the transaction status |
void |
prepareStatement(String strSQL)
Gets a prepared statement |
void |
rollback()
Rollback the transaction |
void |
rollback(Exception e)
Rollback the transaction |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OPENED
public static final int COMMITED
public static final int ROLLEDBACK
Constructor Detail |
---|
public Transaction()
public Transaction(Plugin plugin)
plugin
- The plugin ownner of the transactionMethod Detail |
---|
public void prepareStatement(String strSQL) throws SQLException
strSQL
- The SQL statement
SQLException
- If an SQL error occurspublic PreparedStatement getStatement()
public void executeStatement() throws SQLException
SQLException
- If an SQL error occurspublic void commit()
public void rollback()
public void rollback(Exception e)
e
- The exception that cause the rollbackpublic int getStatus()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |