public class SimpleEntityManagerProvider extends Object implements EntityManagerProvider
Constructor and Description |
---|
SimpleEntityManagerProvider(jakarta.persistence.EntityManager entityManager)
Initializes an instance that always returns the given
entityManager . |
Modifier and Type | Method and Description |
---|---|
jakarta.persistence.EntityManager |
getEntityManager()
Returns the EntityManager instance to use.
|
public SimpleEntityManagerProvider(jakarta.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 jakarta.persistence.EntityManager getEntityManager()
EntityManagerProvider
getEntityManager
in interface EntityManagerProvider
Copyright © 2010–2024. All rights reserved.