public interface PersistenceService
Modifier and Type | Method and Description |
---|---|
Class<?> |
getCeilingImplClassFromEntityManagers(String className)
Retrieves the topmost implementation for the given className by checking each registered
EntityManager . |
javax.persistence.EntityManager |
getEntityManager(Map<String,Object> managerMap)
Gathers the
EntityManager from the provided managerMap |
org.springframework.transaction.PlatformTransactionManager |
getTransactionManager(Map<String,Object> managerMap)
Gathers the
PlatformTransactionManager from the provided managerMap |
javax.persistence.EntityManager |
identifyDefaultEntityManager(TargetModeType targetModeType)
Identifies the default
EntityManager for the given targetModeType
NOTE: This assumes that the EntityManager is based on blPU |
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 |
javax.persistence.EntityManager |
identifyEntityManager(Class entityClass)
Identifies the
EntityManager for the given entityClass, using the default targetModeType of TargetModeType.SANDBOX |
javax.persistence.EntityManager |
identifyEntityManager(Class entityClass,
TargetModeType targetModeType)
Identifies the
EntityManager for the given entityClass and targetModeType |
org.springframework.transaction.PlatformTransactionManager |
identifyTransactionManager(String className,
TargetModeType targetModeType)
Identifies the
PlatformTransactionManager for the given className and targetModeType |
boolean |
validateEntityClassName(String entityClassName)
Determine if a test class name represents a known entity class registered with Hibernate
|
boolean validateEntityClassName(String entityClassName)
entityClassName
- javax.persistence.EntityManager identifyEntityManager(Class entityClass)
EntityManager
for the given entityClass, using the default targetModeType of TargetModeType.SANDBOX
entityClass
- EntityManager
javax.persistence.EntityManager identifyEntityManager(Class entityClass, TargetModeType targetModeType)
EntityManager
for the given entityClass and targetModeTypeentityClass
- targetModeType
- EntityManager
org.springframework.transaction.PlatformTransactionManager identifyTransactionManager(String className, TargetModeType targetModeType)
PlatformTransactionManager
for the given className and targetModeTypeclassName
- targetModeType
- PlatformTransactionManager
javax.persistence.EntityManager identifyDefaultEntityManager(TargetModeType targetModeType)
EntityManager
for the given targetModeType
NOTE: This assumes that the EntityManager
is based on blPUtargetModeType
- EntityManager
org.springframework.transaction.PlatformTransactionManager identifyDefaultTransactionManager(TargetModeType targetModeType)
PlatformTransactionManager
for the given targetModeType
NOTE: This assumes that the PlatformTransactionManager
is based on blPUtargetModeType
- PlatformTransactionManager
javax.persistence.EntityManager getEntityManager(Map<String,Object> managerMap)
EntityManager
from the provided managerMapmanagerMap
- EntityManager
org.springframework.transaction.PlatformTransactionManager getTransactionManager(Map<String,Object> managerMap)
PlatformTransactionManager
from the provided managerMapmanagerMap
- PlatformTransactionManager
@Nullable Class<?> getCeilingImplClassFromEntityManagers(String className)
EntityManager
. If
this is not found in the entity managers, this returns nullclassName
- Copyright © 2022. All rights reserved.