Interface JpaContext
- All Known Implementing Classes:
DefaultJpaContext
public interface JpaContext
Interface for components to provide useful information about the current JPA setup within the current
ApplicationContext
.- Since:
- 1.9
- Author:
- Oliver Gierke
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.persistence.EntityManager
getEntityManagerByManagedType
(Class<?> managedType) Returns theEntityManager
managing the given domain type.
-
Method Details
-
getEntityManagerByManagedType
Returns theEntityManager
managing the given domain type.- Parameters:
managedType
- must not be null.- Returns:
- the
EntityManager
that manages the given type, will never be null. - Throws:
IllegalArgumentException
- if the given type is not a JPA managed one no uniqueEntityManager
managing this type can be resolved.
-