public class SimpleEntityManagerProvider extends Object implements EntityManagerProvider
Constructor and Description |
---|
SimpleEntityManagerProvider(javax.persistence.EntityManager entityManager)
Initializes an instance that always returns the given
entityManager . |
Modifier and Type | Method and Description |
---|---|
javax.persistence.EntityManager |
getEntityManager()
Returns the EntityManager instance to use.
|
public SimpleEntityManagerProvider(javax.persistence.EntityManager entityManager)
entityManager
. This class can be used for
testing, or when using a ContainerManaged EntityManager.entityManager
- the EntityManager to return on getEntityManager()
public javax.persistence.EntityManager getEntityManager()
EntityManagerProvider
getEntityManager
in interface EntityManagerProvider
Copyright © 2010–2018. All rights reserved.