C# Класс Spring.Transaction.Support.TransactionCallbackWithoutResult

Simple convenience class for TransactionCallback implementation. Allows for implementing a DoInTransaction version without result, i.e. without the need for a return statement.
Наследование: ITransactionCallback
Показать файл Открыть проект

Открытые методы

Метод Описание
DoInTransaction ( ITransactionStatus status ) : object

Gets called by TransactionTemplate.Execute within a transaction context.

DoInTransactionWithoutResult ( ITransactionStatus status ) : void

Gets called by TransactionTemplate.execute within a transactional context when no return value is required.

Does not need to care about transactions itself, although it can retrieve and influence the status of the current transaction via the given status object, e.g. setting rollback-only. A RuntimeException thrown by the callback is treated as application exception that enforces a rollback. An exception gets propagated to the caller of the template.

Описание методов

DoInTransaction() публичный Метод

Gets called by TransactionTemplate.Execute within a transaction context.
public DoInTransaction ( ITransactionStatus status ) : object
status ITransactionStatus The associated transaction status.
Результат object

DoInTransactionWithoutResult() публичный абстрактный Метод

Gets called by TransactionTemplate.execute within a transactional context when no return value is required.
Does not need to care about transactions itself, although it can retrieve and influence the status of the current transaction via the given status object, e.g. setting rollback-only. A RuntimeException thrown by the callback is treated as application exception that enforces a rollback. An exception gets propagated to the caller of the template.
public abstract DoInTransactionWithoutResult ( ITransactionStatus status ) : void
status ITransactionStatus The status.
Результат void