-
- All Known Subinterfaces:
PersistenceNucleusContext
- All Known Implementing Classes:
AbstractNucleusContext,EnhancementNucleusContextImpl,PersistenceNucleusContextImpl
public interface NucleusContextRepresentation of the context being run within DataNucleus. Provides basic services that can be used by all DataNucleus contexts.- properties defining configuration for persistence.
- manages the plugins involved in this DataNucleus context
- provides access to the API in use
- manages metadata for persistable classes
- provides access to the TypeManager, defining the behaviour for java types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidapplyDefaultProperties(Configuration conf)Method called when initialising the Configuration to load up defaults for the properties appropriate for this NucleusContext.voidclose()Clear out resources for the supported services.ApiAdaptergetApiAdapter()StringgetApiName()Accessor for the name of the API (JDO, JPA, etc).ClassLoaderResolvergetClassLoaderResolver(ClassLoader primaryLoader)Accessor for a ClassLoaderResolver to use in resolving classes.ConfigurationgetConfiguration()Accessor for the overall configuration for DataNucleus.MetaDataManagergetMetaDataManager()Accessor for the manager for persistence metadata information.PluginManagergetPluginManager()Accessor for the manager for DataNucleus plugins.TypeManagergetTypeManager()Accessor for manager for java types.voidinitialise()Method to initialise the context for use.booleansupportsORMMetaData()
-
-
-
Method Detail
-
applyDefaultProperties
void applyDefaultProperties(Configuration conf)
Method called when initialising the Configuration to load up defaults for the properties appropriate for this NucleusContext.- Parameters:
conf- The configuration
-
initialise
void initialise()
Method to initialise the context for use. If any services are considered essential for operation then they will be enabled here, otherwise left for lazy initialisation.
-
close
void close()
Clear out resources for the supported services.
-
getApiAdapter
ApiAdapter getApiAdapter()
-
getApiName
String getApiName()
Accessor for the name of the API (JDO, JPA, etc).- Returns:
- the api
-
getConfiguration
Configuration getConfiguration()
Accessor for the overall configuration for DataNucleus.- Returns:
- The Configuration
-
getPluginManager
PluginManager getPluginManager()
Accessor for the manager for DataNucleus plugins.- Returns:
- The PluginManager
-
getMetaDataManager
MetaDataManager getMetaDataManager()
Accessor for the manager for persistence metadata information.- Returns:
- The MetaDataManager
-
getTypeManager
TypeManager getTypeManager()
Accessor for manager for java types.- Returns:
- The TypeManager
-
getClassLoaderResolver
ClassLoaderResolver getClassLoaderResolver(ClassLoader primaryLoader)
Accessor for a ClassLoaderResolver to use in resolving classes. Caches the resolver for the specified primary loader, and hands it out if present.- Parameters:
primaryLoader- Loader to use as the primary loader (or null)- Returns:
- The ClassLoader resolver
-
supportsORMMetaData
boolean supportsORMMetaData()
-
-