Package org.datanucleus
Interface NucleusContext
-
- All Known Subinterfaces:
PersistenceNucleusContext
- All Known Implementing Classes:
AbstractNucleusContext
,EnhancementNucleusContextImpl
,PersistenceNucleusContextImpl
public interface NucleusContext
Representation 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 void
applyDefaultProperties(Configuration conf)
Method called when initialising the Configuration to load up defaults for the properties appropriate for this NucleusContext.void
close()
Clear out resources for the supported services.ApiAdapter
getApiAdapter()
String
getApiName()
Accessor for the name of the API (JDO, JPA, etc).ClassLoaderResolver
getClassLoaderResolver(ClassLoader primaryLoader)
Accessor for a ClassLoaderResolver to use in resolving classes.Configuration
getConfiguration()
Accessor for the overall configuration for DataNucleus.MetaDataManager
getMetaDataManager()
Accessor for the manager for persistence metadata information.PluginManager
getPluginManager()
Accessor for the manager for DataNucleus plugins.TypeManager
getTypeManager()
Accessor for manager for java types.void
initialise()
Method to initialise the context for use.boolean
supportsORMMetaData()
-
-
-
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()
-
-