made em configurable (required for unit testing)
This commit is contained in:
@ -56,6 +56,11 @@ public abstract class CommonAbstractController {
|
||||
@ApplicationPU
|
||||
protected EntityManager em;
|
||||
|
||||
// required for unit testing
|
||||
public void setEntityManager (EntityManager em) {
|
||||
this.em = em;
|
||||
}
|
||||
|
||||
@Lock(LockType.READ)
|
||||
public <T extends Serializable> T find(Class<T> clazz, Object id) {
|
||||
return em.find(clazz, id);
|
||||
|
||||
Reference in New Issue
Block a user