com.holonplatform.core.datastore.transaction

## Interface TransactionalOperation<R>

- Type Parameters:
    `R` - Operation result type
  All Known Subinterfaces:
    TransactionalOperation.TransactionalInvocation
  Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface TransactionalOperation<R>

  Represents a transactional operation execution.

  The operation execution can return a result.

  Since:
    5.1.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `TransactionalOperation.TransactionalInvocation` Represents a transactional operation execution which do not return a result.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `R` | `execute(Transaction transaction)` Execute a transactional operation using given `Transaction` and return a result.

- - ### Method Detail

    - #### execute

          R execute(Transaction transaction)

      Execute a transactional operation using given `Transaction` and return a result.
      Parameters:
        `transaction` - The transaction reference, which can be used to perform `Transaction.commit()` and `Transaction.rollback()` operations
      Returns:
        The result of the operation
      Throws:
        `TransactionStatus.TransactionException` - If an execution error occurred

Copyright © 2019 The Holon Platform. All rights reserved.