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.EntityManagergetEntityManagerByManagedType(Class<?> managedType) Returns theEntityManagermanaging the given domain type.
-
Method Details
-
getEntityManagerByManagedType
Returns theEntityManagermanaging the given domain type.- Parameters:
managedType- must not be null.- Returns:
- the
EntityManagerthat manages the given type, will never be null. - Throws:
IllegalArgumentException- if the given type is not a JPA managed one no uniqueEntityManagermanaging this type can be resolved.
-