|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.registry.core.jdbc.dataaccess.JDBCDatabaseTransaction
public class JDBCDatabaseTransaction
This class represents a database transaction, which is used for databases that support JDBC.
| Nested Class Summary | |
|---|---|
static class |
JDBCDatabaseTransaction.ManagedRegistryConnection
Wrapped connection that manages connections making it possible to have connections to multiple databases. |
| Constructor Summary | |
|---|---|
JDBCDatabaseTransaction()
|
|
| Method Summary | |
|---|---|
void |
decNestedDepth()
This method will decrement the nested depth of the transaction on the current session. |
static JDBCDatabaseTransaction.ManagedRegistryConnection |
getConnection()
Method to get connection. |
static JDBCDatabaseTransaction.ManagedRegistryConnection |
getManagedRegistryConnection(Connection conn)
Method to obtain a connection that is managed by the registry transactions implementation. |
int |
getNestedDepth()
Method to obtain the depth of nesting of this transaction at a given point in time. |
void |
incNestedDepth()
This method will increment the nested depth of the transaction on the current session. |
boolean |
isRollbacked()
Method to determine whether this transaction has been rollbacked at least once. |
boolean |
isStarted()
Method to determine whether a transaction is started or not. |
void |
popTransaction()
Pop stacked transaction and replace the existing one with that. |
void |
pushTransaction()
Push current transaction to a stack and make room for a new one. |
static void |
removeConnection()
Method to remove the connection from the transaction. |
static void |
setConnection(Connection connection)
Method to set connection. |
void |
setRollbacked(boolean rollbacked)
Method to set whether this transaction has been rollbacked or not. |
void |
setStarted(boolean started)
Method to set whether a transaction is started or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JDBCDatabaseTransaction()
| Method Detail |
|---|
public void pushTransaction()
DatabaseTransaction
pushTransaction in interface DatabaseTransactionpublic void popTransaction()
DatabaseTransaction
popTransaction in interface DatabaseTransactionpublic boolean isStarted()
DatabaseTransaction
isStarted in interface DatabaseTransactionpublic void setStarted(boolean started)
DatabaseTransaction
setStarted in interface DatabaseTransactionstarted - whether a transaction is started or not.public static JDBCDatabaseTransaction.ManagedRegistryConnection getConnection()
public static void setConnection(Connection connection)
connection - the connection.public static void removeConnection()
public void incNestedDepth()
DatabaseTransaction
incNestedDepth in interface DatabaseTransactionpublic void decNestedDepth()
DatabaseTransaction
decNestedDepth in interface DatabaseTransactionpublic int getNestedDepth()
DatabaseTransaction
getNestedDepth in interface DatabaseTransactionpublic boolean isRollbacked()
DatabaseTransaction
isRollbacked in interface DatabaseTransactionpublic void setRollbacked(boolean rollbacked)
DatabaseTransaction
setRollbacked in interface DatabaseTransactionrollbacked - whether this transaction has been rollbacked or not.public static JDBCDatabaseTransaction.ManagedRegistryConnection getManagedRegistryConnection(Connection conn)
conn - un-managed connection.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||