Package de.xima.fc.persistence.tx
Interface JpaWork<T,E extends Exception>
-
- Type Parameters:
T- the type of the result. Return DTOs, never entities or lazy proxies, they are detached once the transaction is over.E- the type of the checked exception the work may throw, orRuntimeExceptionif it throws none.
- 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 JpaWork<T,E extends Exception>
Work that runs in a JPA transaction and returns a result, executed byJpaTransactionRunner.inTransaction(JpaWork).- Since:
- 8.5.6
- Author:
- Norman Lorenz
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Texecute(JpaUnitOfWork unitOfWork)Performs the work.
-
-
-
Method Detail
-
execute
T execute(JpaUnitOfWork unitOfWork) throws E extends Exception
Performs the work.
-
-