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