|
||||||||||
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.
Constructor Summary | |
---|---|
JDBCDatabaseTransaction()
|
Method Summary | |
---|---|
void |
decNestedDepth()
This method will decrement the nested depth of the transaction on the current session. |
static Connection |
getConnection()
Method to get connection. |
static Connection |
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 DatabaseTransaction
public void popTransaction()
DatabaseTransaction
popTransaction
in interface DatabaseTransaction
public boolean isStarted()
DatabaseTransaction
isStarted
in interface DatabaseTransaction
public void setStarted(boolean started)
DatabaseTransaction
setStarted
in interface DatabaseTransaction
started
- whether a transaction is started or not.public static Connection getConnection()
public static void setConnection(Connection connection)
connection
- the connection.public static void removeConnection()
public void incNestedDepth()
DatabaseTransaction
incNestedDepth
in interface DatabaseTransaction
public void decNestedDepth()
DatabaseTransaction
decNestedDepth
in interface DatabaseTransaction
public int getNestedDepth()
DatabaseTransaction
getNestedDepth
in interface DatabaseTransaction
public boolean isRollbacked()
DatabaseTransaction
isRollbacked
in interface DatabaseTransaction
public void setRollbacked(boolean rollbacked)
DatabaseTransaction
setRollbacked
in interface DatabaseTransaction
rollbacked
- whether this transaction has been rollbacked or not.public static Connection getManagedRegistryConnection(Connection conn)
conn
- un-managed connection.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |