|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StoreManager
Interface defining management of a datastore. To be implemented by all new datastore support. Please use AbstractStoreManager and extend it.
| Method Summary | |
|---|---|
void |
addClass(java.lang.String className,
ClassLoaderResolver clr)
Method to add a class to the managed list for this datastore manager. |
void |
addClasses(java.lang.String[] classNames,
ClassLoaderResolver clr)
Add classes to the persistence model for the datastore. |
void |
close()
Release of resources. |
ApiAdapter |
getApiAdapter()
Accessor for the API adapter. |
Store |
getBackingStoreForField(ClassLoaderResolver clr,
AbstractMemberMetaData fmd,
java.lang.Class type)
Accessor for the backing store for the specified field. |
java.lang.String |
getClassNameForObjectID(java.lang.Object id,
ClassLoaderResolver clr,
ObjectManager om)
Returns the class corresponding to the given object identity. |
ManagedConnection |
getConnection(ExecutionContext ectx)
Accessor for a connection for the specified ExecutionContext. |
ManagedConnection |
getConnection(ExecutionContext ectx,
java.util.Map options)
Accessor for a connection for the specified ExecutionContext. |
ManagedConnection |
getConnection(ObjectManager om)
Accessor for a connection for the specified ObjectManager. |
ManagedConnection |
getConnection(ObjectManager om,
java.util.Map options)
Accessor for a connection for the specified ObjectManager. |
java.lang.String |
getConnectionDriverName()
Convenience accessor for the driver name to use for the connection. |
java.lang.Object |
getConnectionFactory()
Convenience accessor for the factory for the connection (transactional). |
java.lang.Object |
getConnectionFactory2()
Convenience accessor for the factory for the connection (non-transactional). |
java.lang.String |
getConnectionFactory2Name()
Convenience accessor for the factory name for the connection (non-transactional). |
java.lang.String |
getConnectionFactoryName()
Convenience accessor for the factory name for the connection (transactional). |
ConnectionManager |
getConnectionManager()
Accessor for the connection manager for this store manager. |
java.lang.String |
getConnectionPassword()
Convenience accessor for the password to use for the connection. |
java.lang.String |
getConnectionURL()
Convenience accessor for the URL for the connection. |
java.lang.String |
getConnectionUserName()
Convenience accessor for the user name to use for the connection. |
java.util.Date |
getDatastoreDate()
Get the date/time of the datastore. |
Extent |
getExtent(ObjectManager om,
java.lang.Class c,
boolean subclasses)
Interface to getting an Extent for a class. |
NucleusConnection |
getNucleusConnection(ObjectManager om)
Method to return a connection for the ObjectManager. |
NucleusSequence |
getNucleusSequence(ObjectManager om,
SequenceMetaData seqmd)
Method to return a datastore sequence for this datastore matching the passed sequence MetaData. |
OMFContext |
getOMFContext()
Accessor for the context in which this StoreManager is running |
StorePersistenceHandler |
getPersistenceHandler()
Accessor for the store persistence handler. |
StorePersistenceHandler2 |
getPersistenceHandler2()
Accessor for the second-generation store persistence handler. |
java.lang.String |
getQueryCacheKey()
Accessor for the key used for representing this store manager in the query cache. |
StoreManagerRuntime |
getRuntimeManager()
Accessor for the runtime management of this component (if specified as required to the PMF/EMF). |
StoreSchemaHandler |
getSchemaHandler()
Accessor for the store schema handler (if this datastore supports the concept of a schema). |
java.lang.String |
getStoreManagerKey()
Accessor for the key for this store manager. |
java.lang.Object |
getStrategyValue(ObjectManager om,
AbstractClassMetaData cmd,
int absoluteFieldNumber)
Method to retrieve the value for a strategy for a particular field. |
java.util.HashSet |
getSubClassesForClass(java.lang.String className,
boolean includeDescendents,
ClassLoaderResolver clr)
Utility to return the names of the classes that are known subclasses of the provided class. |
java.util.Collection |
getSupportedOptions()
Accessor for the supported options in string form |
ValueGenerationManager |
getValueGenerationManager()
Accessor for the ValueGenerationManager for obtaining sequences. |
boolean |
isStrategyDatastoreAttributed(IdentityStrategy identityStrategy,
boolean datastoreIdentityField)
Check if the strategy is attributed by the database when the PersistenceCapable object is inserted into the database |
java.lang.String |
manageClassForIdentity(java.lang.Object id,
ClassLoaderResolver clr)
Convenience method to ensure that the class defined by the passed OID/SingleFIeldIdentity is managed by the store. |
boolean |
managesClass(java.lang.String className)
Accessor for whether the specified class is managed currently |
void |
notifyObjectIsOutdated(StateManager sm)
Notifies this store manager that the main memory (RAM, heap) copy of the PC object of the supplied StateManager may not be regarded as valid anymore. |
void |
performVersionCheck(StateManager sm,
java.lang.Object versionDatastore,
VersionMetaData versionMetaData)
Perform an optimistic version check on the passed object, against the passed version in the datastore. |
void |
printInformation(java.lang.String cat,
java.io.PrintStream ps)
Method to output particular information owned by this datastore. |
void |
removeAllClasses(ClassLoaderResolver clr)
Remove all classes from the persistence model for the datastore. |
boolean |
supportsQueryLanguage(java.lang.String language)
Accessor for whether this query language is supported. |
boolean |
supportsValueStrategy(java.lang.String strategy)
Accessor for whether this value strategy is supported. |
| Method Detail |
|---|
java.util.Collection getSupportedOptions()
void close()
StoreManagerRuntime getRuntimeManager()
StorePersistenceHandler getPersistenceHandler()
StoreSchemaHandler getSchemaHandler()
NucleusSequence getNucleusSequence(ObjectManager om,
SequenceMetaData seqmd)
om - The Object Managerseqmd - SequenceMetaData
NucleusConnection getNucleusConnection(ObjectManager om)
om - ObjectManager
ConnectionManager getConnectionManager()
ManagedConnection getConnection(ObjectManager om)
If there is an active transaction, a connection from the transactional connection factory will be returned. If there is no active transaction, a connection from the nontransactional connection factory will be returned.
om - The ObjectManager
NucleusException - Thrown if an error occurs getting the connection
ManagedConnection getConnection(ObjectManager om,
java.util.Map options)
If there is an active transaction, a connection from the transactional connection factory will be returned. If there is no active transaction, a connection from the nontransactional connection factory will be returned.
om - The ObjectManageroptions - connetion options
NucleusException - Thrown if an error occurs getting the connectionjava.lang.String getConnectionDriverName()
java.lang.String getConnectionURL()
java.lang.String getConnectionUserName()
java.lang.String getConnectionPassword()
java.lang.Object getConnectionFactory()
java.lang.String getConnectionFactoryName()
java.lang.Object getConnectionFactory2()
java.lang.String getConnectionFactory2Name()
ValueGenerationManager getValueGenerationManager()
ApiAdapter getApiAdapter()
java.lang.String getStoreManagerKey()
java.lang.String getQueryCacheKey()
OMFContext getOMFContext()
java.util.Date getDatastoreDate()
void printInformation(java.lang.String cat,
java.io.PrintStream ps)
throws java.lang.Exception
cat - Category of informationps - PrintStream
java.lang.Exception - Thrown if an error occurs in the output processboolean managesClass(java.lang.String className)
className - The name of the class
void addClass(java.lang.String className,
ClassLoaderResolver clr)
className - Name of the classclr - The ClassLoaderResolver
void addClasses(java.lang.String[] classNames,
ClassLoaderResolver clr)
This method is primarily useful for applications that wish to perform all of their datastore initialization up front, rather than wait for the runtime to do it on-demand.
classNames - The class(es) to be added.clr - The ClassLoaderResolver
DatastoreValidationException - If there is some mismatch between the current datastore contents and
those necessary to enable persistence of the given classes.void removeAllClasses(ClassLoaderResolver clr)
clr - The ClassLoaderResolver
java.lang.String manageClassForIdentity(java.lang.Object id,
ClassLoaderResolver clr)
id - OIDclr - ClassLoader resolver
NucleusUserException - if the identity is assigned to the wrong class
Extent getExtent(ObjectManager om,
java.lang.Class c,
boolean subclasses)
om - The Object Managerc - The class requiring the Extentsubclasses - Whether to include subclasses of 'c'
boolean supportsQueryLanguage(java.lang.String language)
language - The language
boolean supportsValueStrategy(java.lang.String strategy)
strategy - The strategy
java.lang.String getClassNameForObjectID(java.lang.Object id,
ClassLoaderResolver clr,
ObjectManager om)
id - The identity of some object.clr - ClassLoader resolverom - Object Manager
java.lang.ClassCastException - If the type of ID is not recognized (OID
or SCOID).
boolean isStrategyDatastoreAttributed(IdentityStrategy identityStrategy,
boolean datastoreIdentityField)
identityStrategy - the identityStrategydatastoreIdentityField - Whether this is for the surrogate datastore identity field
java.lang.Object getStrategyValue(ObjectManager om,
AbstractClassMetaData cmd,
int absoluteFieldNumber)
om - The Object Managercmd - AbstractClassMetaData for the classabsoluteFieldNumber - The field number
void performVersionCheck(StateManager sm,
java.lang.Object versionDatastore,
VersionMetaData versionMetaData)
sm - StateManager of the object to checkversionDatastore - Version of the object in the datastoreversionMetaData - VersionMetaData to use for checking
NucleusUserException - thrown when an invalid strategy is specified
NucleusOptimisticException - thrown when the version check fails
java.util.HashSet getSubClassesForClass(java.lang.String className,
boolean includeDescendents,
ClassLoaderResolver clr)
className - Class for which we search for subclasses.includeDescendents - Whether to include subclasses of subclasses etcclr - The ClassLoaderResolver
void notifyObjectIsOutdated(StateManager sm)
Store getBackingStoreForField(ClassLoaderResolver clr,
AbstractMemberMetaData fmd,
java.lang.Class type)
clr - ClassLoader resolverfmd - MetaData for the field/propertytype - Type
IncompatibleFieldTypeException - raises the exception if the field is not compatible if the store
java.lang.UnsupportedOperationException - if BackingStore is not supportedManagedConnection getConnection(ExecutionContext ectx)
If there is an active transaction, a connection from the transactional connection factory will be returned. If there is no active transaction, a connection from the nontransactional connection factory will be returned.
ectx - The ExecutionContext to return the connection for.
NucleusException - Thrown if an error occurs getting the connection
ManagedConnection getConnection(ExecutionContext ectx,
java.util.Map options)
If there is an active transaction, a connection from the transactional connection factory will be returned. If there is no active transaction, a connection from the nontransactional connection factory will be returned.
ectx - The ExecutionContext to return the connection for.
NucleusException - Thrown if an error occurs getting the connectionStorePersistenceHandler2 getPersistenceHandler2()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||