Class DefaultJpaContext

java.lang.Object
org.springframework.data.jpa.repository.support.DefaultJpaContext
All Implemented Interfaces:
JpaContext

public class DefaultJpaContext extends Object implements JpaContext
Default implementation of JpaContext.
Since:
1.9
Author:
Oliver Gierke
  • Constructor Details

    • DefaultJpaContext

      public DefaultJpaContext(Set<jakarta.persistence.EntityManager> entityManagers)
      Creates a new DefaultJpaContext for the given Set of EntityManagers.
      Parameters:
      entityManagers - must not be null.
  • Method Details

    • getEntityManagerByManagedType

      public jakarta.persistence.EntityManager getEntityManagerByManagedType(Class<?> type)
      Description copied from interface: JpaContext
      Returns the EntityManager managing the given domain type.
      Specified by:
      getEntityManagerByManagedType in interface JpaContext
      Parameters:
      type - must not be null.
      Returns:
      the EntityManager that manages the given type, will never be null.