public interface PersistenceNucleusContext extends StoreNucleusContext
Modifier and Type | Method and Description |
---|---|
void |
addExecutionContextListener(ExecutionContext.LifecycleListener listener)
Register a new Listener for ExecutionContext events.
|
void |
addInternalFetchGroup(FetchGroup grp)
Method to add a dynamic FetchGroup for use by this OMF.
|
FetchGroup |
createInternalFetchGroup(Class cls,
String name)
Method to create a new internal fetch group for the class+name.
|
AutoStartMechanism |
getAutoStartMechanism() |
BeanValidationHandler |
getBeanValidationHandler(ExecutionContext ec)
Method to return a handler for bean validation (JSR303).
|
CDIHandler |
getCDIHandler()
Accessor for the handler for CDI (JSR346) if in an environment that provides one.
|
String |
getCurrentUser(ExecutionContext ec)
Accessor for the current user for the supplied ExecutionContext.
|
ExecutionContext |
getExecutionContext(Object owner,
Map<String,Object> options)
Method to return an ExecutionContext for use in persistence.
|
ExecutionContext.LifecycleListener[] |
getExecutionContextListeners()
Object the array of registered ExecutionContext listeners.
|
ExecutionContextPool |
getExecutionContextPool() |
FetchGroupManager |
getFetchGroupManager()
Convenience accessor for the FetchGroupManager.
|
Set<FetchGroup> |
getFetchGroupsWithName(String name)
Accessor for the fetch groups for the specified name.
|
IdentityManager |
getIdentityManager()
Accessor for a manager for identities.
|
ImplementationCreator |
getImplementationCreator() |
FetchGroup |
getInternalFetchGroup(Class cls,
String name,
boolean createIfNotPresent)
Accessor for an internal fetch group for the specified class.
|
ManagementManager |
getJMXManager()
Accessor for the JMX manager (if required).
|
JTASyncRegistry |
getJtaSyncRegistry()
Accessor for the JTA Synchronization registry, when using JTA.
|
TransactionManager |
getJtaTransactionManager()
Accessor for the JTA transaction manager, when using JTA.
|
Level2Cache |
getLevel2Cache() |
String |
getMultiTenancyId(ExecutionContext ec,
AbstractClassMetaData cmd)
Accessor for the tenant id for the supplied class and ExecutionContext.
|
ObjectProviderFactory |
getObjectProviderFactory() |
ResourcedTransactionManager |
getResourcedTransactionManager() |
FactoryStatistics |
getStatistics() |
boolean |
hasLevel2Cache() |
boolean |
isClassCacheable(AbstractClassMetaData cmd)
Convenience method to return if objects of this type are cached for this NucleusContext.
|
boolean |
isClassMultiTenant(AbstractClassMetaData cmd)
Accessor for whether the supplied class is multi-tenant (i.e with a tenancy id column).
|
boolean |
isClassWithIdentityCacheable(Object id)
Convenience method to return if the supplied id is of an object that is cacheable in the L2 cache.
|
boolean |
isFederated()
Return whether we are managing a federated context (i.e a primary StoreManager, with some secondary StoreManager(s)).
|
boolean |
isJcaMode()
Accessor for the JCA mode.
|
void |
removeExecutionContextListener(ExecutionContext.LifecycleListener listener)
Unregister a Listener from ExecutionContext events.
|
void |
removeInternalFetchGroup(FetchGroup grp)
Method to remove a dynamic FetchGroup from use by this OMF.
|
void |
setJcaMode(boolean jca)
Mutator for whether we are in JCA mode.
|
boolean |
statisticsEnabled()
Accessor for whether statistics gathering is enabled.
|
getStoreManager
applyDefaultProperties, close, getApiAdapter, getApiName, getClassLoaderResolver, getConfiguration, getMetaDataManager, getPluginManager, getTypeManager, initialise, supportsORMMetaData
AutoStartMechanism getAutoStartMechanism()
ObjectProviderFactory getObjectProviderFactory()
ExecutionContextPool getExecutionContextPool()
ExecutionContext getExecutionContext(Object owner, Map<String,Object> options)
owner
- The owner object for the context. PersistenceManager/EntityManager typically.options
- Any options affecting startupIdentityManager getIdentityManager()
boolean statisticsEnabled()
ManagementManager getJMXManager()
FactoryStatistics getStatistics()
ImplementationCreator getImplementationCreator()
ResourcedTransactionManager getResourcedTransactionManager()
TransactionManager getJtaTransactionManager()
JTASyncRegistry getJtaSyncRegistry()
BeanValidationHandler getBeanValidationHandler(ExecutionContext ec)
ec
- The ExecutionContext that the handler is for.CDIHandler getCDIHandler()
boolean hasLevel2Cache()
Level2Cache getLevel2Cache()
ExecutionContext.LifecycleListener[] getExecutionContextListeners()
ExecutionContext.LifecycleListener
void addExecutionContextListener(ExecutionContext.LifecycleListener listener)
listener
- the listener to registervoid removeExecutionContextListener(ExecutionContext.LifecycleListener listener)
listener
- the listener to unregistervoid setJcaMode(boolean jca)
jca
- true if using JCA connectorboolean isJcaMode()
FetchGroupManager getFetchGroupManager()
void addInternalFetchGroup(FetchGroup grp)
grp
- The groupvoid removeInternalFetchGroup(FetchGroup grp)
grp
- The groupFetchGroup createInternalFetchGroup(Class cls, String name)
cls
- Class that it applies toname
- Name of groupFetchGroup getInternalFetchGroup(Class cls, String name, boolean createIfNotPresent)
cls
- The classname
- Name of the groupcreateIfNotPresent
- Whether to create the fetch group if not presentNucleusUserException
- if the class is not persistableSet<FetchGroup> getFetchGroupsWithName(String name)
name
- Name of the groupboolean isClassWithIdentityCacheable(Object id)
id
- The identityboolean isClassCacheable(AbstractClassMetaData cmd)
cmd
- MetaData for the classboolean isFederated()
boolean isClassMultiTenant(AbstractClassMetaData cmd)
cmd
- The classString getMultiTenancyId(ExecutionContext ec, AbstractClassMetaData cmd)
ec
- ExecutionContextcmd
- The classString getCurrentUser(ExecutionContext ec)
ec
- ExecutionContextCopyright © 2019. All rights reserved.