org.wamblee.test.persistence
Interface JpaBuilder.JpaUnitOfWork<T>

Enclosing class:
JpaBuilder

public static interface JpaBuilder.JpaUnitOfWork<T>

Callback interface to execute some JPA code within a transaction with the entitymanager to use provided as input.


Method Summary
 T execute(javax.persistence.EntityManager aEm)
          Executes the unit of work.
 

Method Detail

execute

T execute(javax.persistence.EntityManager aEm)
          throws java.lang.Exception
Executes the unit of work. A transaction has been started.

Parameters:
aEm - Entity manager.
Returns:
Result of the execute method. If you don't want to return anything use Void for the return type and return null from the implementation.
Throws:
java.lang.Exception


Copyright © 2010. All Rights Reserved.