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 Type
    Method
    Description
    jakarta.persistence.EntityManager
    Returns the EntityManager managing the given domain type.
  • Method Details

    • getEntityManagerByManagedType

      jakarta.persistence.EntityManager getEntityManagerByManagedType(Class<?> managedType)
      Returns the EntityManager 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 unique EntityManager managing this type can be resolved.