@Service(value="blPersistenceManagerFactory") public class PersistenceManagerFactory extends Object implements org.springframework.context.ApplicationContextAware
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULTPERSISTENCEMANAGERREF |
protected static EntityConfiguration |
entityConfiguration |
protected static String |
persistenceManagerRef |
protected static PersistenceService |
persistenceService |
| Constructor and Description |
|---|
PersistenceManagerFactory(PersistenceService persistenceService,
EntityConfiguration entityConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
static void |
endPersistenceManager() |
protected static Class |
getClassForName(String className) |
static PersistenceManager |
getDefaultPersistenceManager()
This method produces a
PersistenceManager with a blPU-based standardEntityManager. |
static PersistenceManager |
getDefaultPersistenceManager(TargetModeType targetModeType)
This method produces a
PersistenceManager with a blPU-based standardEntityManager
using the passed in TargetModeType |
static PersistenceManager |
getPersistenceManager()
This method should only be used within the context of a thread with an established
PersistenceManagerContext
and the operation to be performed is on an entity that is managed by the EntityManager identified
by startPersistenceManager(TargetModeType). |
static PersistenceManager |
getPersistenceManager(Class entityClass) |
static PersistenceManager |
getPersistenceManager(Class entityClass,
TargetModeType targetModeType) |
static PersistenceManager |
getPersistenceManager(String className) |
static PersistenceManager |
getPersistenceManager(String className,
TargetModeType targetModeType) |
static String |
getPersistenceManagerRef() |
static boolean |
isPersistenceManagerActive() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
static void |
setPersistenceManagerRef(String persistenceManagerRef) |
static void |
startPersistenceManager(String entityClassName,
TargetModeType targetModeType) |
static void |
startPersistenceManager(TargetModeType targetModeType) |
public static final String DEFAULTPERSISTENCEMANAGERREF
protected static String persistenceManagerRef
protected static PersistenceService persistenceService
protected static EntityConfiguration entityConfiguration
@Autowired public PersistenceManagerFactory(PersistenceService persistenceService, EntityConfiguration entityConfiguration)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic static PersistenceManager getPersistenceManager()
PersistenceManagerContext
and the operation to be performed is on an entity that is managed by the EntityManager identified
by startPersistenceManager(TargetModeType).
See PersistenceThreadManager.operation(TargetModeType, Persistable) and startPersistenceManager(TargetModeType)
for an example of how the context is established.public static PersistenceManager getPersistenceManager(String className)
public static PersistenceManager getPersistenceManager(String className, TargetModeType targetModeType)
public static PersistenceManager getPersistenceManager(Class entityClass)
public static PersistenceManager getDefaultPersistenceManager()
PersistenceManager with a blPU-based standardEntityManager.
It also uses a TargetModeType of TargetModeType.SANDBOXpublic static PersistenceManager getDefaultPersistenceManager(TargetModeType targetModeType)
PersistenceManager with a blPU-based standardEntityManager
using the passed in TargetModeTypepublic static PersistenceManager getPersistenceManager(Class entityClass, TargetModeType targetModeType)
public static boolean isPersistenceManagerActive()
public static void startPersistenceManager(TargetModeType targetModeType)
public static void startPersistenceManager(String entityClassName, TargetModeType targetModeType)
public static void endPersistenceManager()
public static String getPersistenceManagerRef()
public static void setPersistenceManagerRef(String persistenceManagerRef)
Copyright © 2024. All rights reserved.