com.holonplatform.datastore.jpa.context

## Interface EntityManagerOperation<R>

- Type Parameters:
    `R` - Operation result type
  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 EntityManagerOperation<R>

  Represents an operation to be executed using a Datastore managed `EntityManager`.

  If returning a result is not required, the `EntityManagerRunnable` can be used.

  Since:
    5.1.0
  See Also:
    `EntityManagerRunnable`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `R` | `execute(javax.persistence.EntityManager entityManager)` Execute an operation and returns a result.

- - ### Method Detail

    - #### execute

          R execute(javax.persistence.EntityManager entityManager)
             throws Exception

      Execute an operation and returns a result.
      Parameters:
        `entityManager` - EntityManager to use
      Returns:
        Operation result
      Throws:
        `Exception` - If an operation execution error occurred

Copyright © 2019 The Holon Platform. All rights reserved.