Package io.ebeaninternal.api
Class ScopeTrans
- java.lang.Object
-
- io.ebeaninternal.api.ScopeTrans
-
public class ScopeTrans extends Object
Used internally to handle the scoping of transactions for methods.
-
-
Constructor Summary
Constructors Constructor Description ScopeTrans(boolean rollbackOnChecked, boolean created, SpiTransaction transaction, TxScope txScope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Error
caughtError(Error e)
An Error was caught and this ALWAYS causes a rollback to occur.<T extends Throwable>
TcaughtThrowable(T e)
An Exception was caught and may or may not cause a rollback to occur.void
complete()
Complete the transaction programmatically.void
end()
void
setRollbackOnly()
Mark the underlying transaction as rollback only.String
toString()
-
-
-
Constructor Detail
-
ScopeTrans
public ScopeTrans(boolean rollbackOnChecked, boolean created, SpiTransaction transaction, TxScope txScope)
-
-
Method Detail
-
complete
public void complete()
Complete the transaction programmatically. Try to commit.
-
end
public void end()
-
caughtError
public Error caughtError(Error e)
An Error was caught and this ALWAYS causes a rollback to occur. Returns the error and this should be thrown by the calling code.
-
setRollbackOnly
public void setRollbackOnly()
Mark the underlying transaction as rollback only.
-
caughtThrowable
public <T extends Throwable> T caughtThrowable(T e)
An Exception was caught and may or may not cause a rollback to occur. Returns the exception and this should be thrown by the calling code.
-
-