|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockrunner.mock.connector.cci.MockLocalTransaction
public class MockLocalTransaction
Mock implementation of LocalTransaction
.
Constructor Summary | |
---|---|
MockLocalTransaction()
|
Method Summary | |
---|---|
void |
begin()
Starts the transaction. |
void |
commit()
Commits the transaction. |
int |
getNumberBeginCalls()
Returns the number of overall begin() calls. |
int |
getNumberCommitCalls()
Returns the number of overall commit() calls. |
int |
getNumberRollbackCalls()
Returns the number of overall rollback() calls. |
void |
reset()
Resets the transaction state. |
void |
rollback()
Rolls back the transaction. |
boolean |
wasBeginCalled()
Returns if begin() was called. |
boolean |
wasCommitCalled()
Returns if commit() was called. |
boolean |
wasRollbackCalled()
Returns if rollback() was called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockLocalTransaction()
Method Detail |
---|
public void reset()
0
.
public void begin() throws javax.resource.ResourceException
wasCommitCalled
and wasRollbackCalled
are reset to false
.
This method does not reset the number of overall calls.
begin
in interface javax.resource.cci.LocalTransaction
javax.resource.ResourceException
public void commit() throws javax.resource.ResourceException
commit
in interface javax.resource.cci.LocalTransaction
javax.resource.ResourceException
public void rollback() throws javax.resource.ResourceException
rollback
in interface javax.resource.cci.LocalTransaction
javax.resource.ResourceException
public boolean wasBeginCalled()
begin()
was called.
begin()
calledpublic boolean wasCommitCalled()
commit()
was called.
commit()
calledpublic boolean wasRollbackCalled()
rollback()
was called.
rollback()
calledpublic int getNumberBeginCalls()
begin()
calls.
begin()
callspublic int getNumberCommitCalls()
commit()
calls.
commit()
callspublic int getNumberRollbackCalls()
rollback()
calls.
rollback()
calls
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |