Interface PersistenceService

All Known Implementing Classes:
PersistenceServiceImpl

public interface PersistenceService
Author:
Chris Kittrell (ckittrell)
  • Method Details

    • validateEntityClassName

      boolean validateEntityClassName(String entityClassName)
      Determine if a test class name represents a known entity class registered with Hibernate
      Parameters:
      entityClassName -
      Returns:
    • identifyEntityManager

      jakarta.persistence.EntityManager identifyEntityManager(Class entityClass)
      Identifies the EntityManager for the given entityClass, using the default targetModeType of TargetModeType.SANDBOX
      Parameters:
      entityClass -
      Returns:
      the EntityManager
    • identifyEntityManager

      jakarta.persistence.EntityManager identifyEntityManager(Class entityClass, TargetModeType targetModeType)
      Identifies the EntityManager for the given entityClass and targetModeType
      Parameters:
      entityClass -
      targetModeType -
      Returns:
      the EntityManager
    • identifyTransactionManager

      org.springframework.transaction.PlatformTransactionManager identifyTransactionManager(String className, TargetModeType targetModeType)
      Identifies the PlatformTransactionManager for the given className and targetModeType
      Parameters:
      className -
      targetModeType -
      Returns:
      the PlatformTransactionManager
    • identifyDefaultEntityManager

      jakarta.persistence.EntityManager identifyDefaultEntityManager(TargetModeType targetModeType)
      Identifies the default EntityManager for the given targetModeType

      NOTE: This assumes that the EntityManager is based on blPU

      Parameters:
      targetModeType -
      Returns:
      the EntityManager
    • identifyDefaultTransactionManager

      org.springframework.transaction.PlatformTransactionManager identifyDefaultTransactionManager(TargetModeType targetModeType)
      Identifies the default PlatformTransactionManager for the given targetModeType

      NOTE: This assumes that the PlatformTransactionManager is based on blPU

      Parameters:
      targetModeType -
      Returns:
      the PlatformTransactionManager
    • getEntityManager

      jakarta.persistence.EntityManager getEntityManager(Map<String,Object> managerMap)
      Gathers the EntityManager from the provided managerMap
      Parameters:
      managerMap -
      Returns:
      the EntityManager
    • getTransactionManager

      org.springframework.transaction.PlatformTransactionManager getTransactionManager(Map<String,Object> managerMap)
      Gathers the PlatformTransactionManager from the provided managerMap
      Parameters:
      managerMap -
      Returns:
      the PlatformTransactionManager
    • getCeilingImplClassFromEntityManagers

      @Nullable Class<?> getCeilingImplClassFromEntityManagers(String className)
      Retrieves the topmost implementation for the given className by checking each registered EntityManager. If this is not found in the entity managers, this returns null
      Parameters:
      className -