|
||||||||||
| 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,
ExecutionContext ec)
Returns the class corresponding to the given object identity. |
ManagedConnection |
getConnection(ExecutionContext ec)
Accessor for a connection for the specified ObjectManager. |
ManagedConnection |
getConnection(ExecutionContext ec,
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(ExecutionContext ec,
java.lang.Class c,
boolean subclasses)
Interface to getting an Extent for a class. |
NucleusConnection |
getNucleusConnection(ExecutionContext ec)
Method to return a connection for the ObjectManager. |
NucleusSequence |
getNucleusSequence(ExecutionContext ec,
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. |
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(ExecutionContext ec,
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(ObjectProvider 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(ObjectProvider 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. |
void |
transactionCommitted(ExecutionContext ec)
Method to inform the StoreManager that a transaction has committed for the specified execution context. |
void |
transactionRolledBack(ExecutionContext ec)
Method to inform the StoreManager that a transaction has rolled back for the specified execution context. |
void |
transactionStarted(ExecutionContext ec)
Method to inform the StoreManager that a transaction has started for the specified execution context. |
| Method Detail |
|---|
java.util.Collection getSupportedOptions()
void close()
StoreManagerRuntime getRuntimeManager()
StorePersistenceHandler getPersistenceHandler()
StoreSchemaHandler getSchemaHandler()
NucleusSequence getNucleusSequence(ExecutionContext ec,
SequenceMetaData seqmd)
ec - execution contextseqmd - SequenceMetaData
NucleusConnection getNucleusConnection(ExecutionContext ec)
ec - execution context
ConnectionManager getConnectionManager()
ManagedConnection getConnection(ExecutionContext ec)
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.
ec - execution context
NucleusException - Thrown if an error occurs getting the connection
ManagedConnection getConnection(ExecutionContext ec,
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.
ec - execution contextoptions - 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(ExecutionContext ec,
java.lang.Class c,
boolean subclasses)
ec - execution contextc - 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,
ExecutionContext ec)
id - The identity of some object.clr - ClassLoader resolverec - execution context
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(ExecutionContext ec,
AbstractClassMetaData cmd,
int absoluteFieldNumber)
ec - execution contextcmd - AbstractClassMetaData for the classabsoluteFieldNumber - The field number
void performVersionCheck(ObjectProvider 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(ObjectProvider 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 supportedvoid transactionStarted(ExecutionContext ec)
ec - ExecutionContextvoid transactionCommitted(ExecutionContext ec)
ec - ExecutionContextvoid transactionRolledBack(ExecutionContext ec)
ec - ExecutionContext
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||