|
||||||||||
| 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 |
addClasses(java.lang.String[] classes,
ClassLoaderResolver clr,
java.io.Writer writer,
boolean completeDdl)
Add classes to the persistence model for the datastore. |
void |
close()
Release of resources. |
ApiAdapter |
getApiAdapter()
Accessor for the API adapter. |
AutoStartMechanism |
getAutoStartMechanism()
Accessor for the AutoStartMechanism |
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(ObjectManager om)
Accessor for a transactional connection for the specified ObjectManager, using its current transaction. |
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. |
JPOXConnection |
getJPOXConnection(ObjectManager om)
Method to return a JPOX connection for the ObjectManager. |
JPOXSequence |
getJPOXSequence(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 RDBMSManager is running |
StorePersistenceHandler |
getPersistenceHandler()
Accessor for the store persistence handler. |
PoidManager |
getPoidManager()
Accessor for the POIDManager for obtaining sequences. |
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 |
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 |
outputDatastoreInformation(java.io.PrintStream ps)
Method to output the datastore information to the specified PrintStream. |
void |
outputSchemaInformation(java.io.PrintStream ps)
Method to output the schema information to the specified PrintStream. |
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 |
removeAllClasses(ClassLoaderResolver clr)
Drops all tables in 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()
JPOXSequence getJPOXSequence(ObjectManager om,
SequenceMetaData seqmd)
om - The Object Managerseqmd - SequenceMetaData
JPOXConnection getJPOXConnection(ObjectManager om)
om - ObjectManager
ManagedConnection getConnection(ObjectManager om)
om - The ObjectManager
JPOXException - Thrown if an error occurs getting the connectionPoidManager getPoidManager()
ApiAdapter getApiAdapter()
java.lang.String getStoreManagerKey()
OMFContext getOMFContext()
java.util.Date getDatastoreDate()
void outputDatastoreInformation(java.io.PrintStream ps)
throws java.lang.Exception
ps - PrintStream
java.lang.Exception - If an error occurs obtaining the datastore info
void outputSchemaInformation(java.io.PrintStream ps)
throws java.lang.Exception
ps - PrintStream
java.lang.Exception - If an error occurs obtaining the schema infoAutoStartMechanism getAutoStartMechanism()
AutoStartMechanism
boolean 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[] classes,
ClassLoaderResolver clr,
java.io.Writer writer,
boolean completeDdl)
This method is primarily useful for applications that wish to perform all of their datastore initialization up front, rather than wait for the JPOX runtime to do it on-demand.
classes - The class(es) to be added.clr - The ClassLoaderResolverwriter - Optional writer when you just want the DDL for persisting the specified classescompleteDdl - whether complete DDL will be created when writing DDL to a file, or only for missing elements
DatastoreValidationException - If there is some mismatch between the current datastore contents and
those necessary to enable persistence of the given classes.
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 JPOX 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
JPOXUserException - 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
JPOXUserException - thrown when an invalid strategy is specified
JPOXOptimisticException - 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 supported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||