Interface TxManager

  • All Superinterfaces:
    java.lang.AutoCloseable

    public interface TxManager
    extends java.lang.AutoCloseable
    Author:
    Fabrizio Giudici
    • Method Detail

      • computeInTx

        <T> T computeInTx​(@Nonnull
                          java.util.function.Function<javax.persistence.EntityManager,​T> task)
      • runInTx

        default void runInTx​(@Nonnull
                             java.util.function.Consumer<javax.persistence.EntityManager> task)
      • close

        default void close()
                    throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception