Java Doc for StoreManager.java in  » Database-ORM » JPOX » org » jpox » store » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » JPOX » org.jpox.store 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jpox.store.StoreManager

All known Subclasses:   org.jpox.store.MappedStoreManager,
StoreManager
abstract public class StoreManager (Code)
An abstract representation of a Store Manager. Manages the persistence of objects to the store. Will be implemented for the type of datastore (RDBMS, ODBMS, OLAP) in question. The store manager's responsibilities include:
  • Creating and/or validating datastore tables according to the persistent classes being accessed by the application.
  • Serving as the primary intermediary between StateManagers and the database.
  • Serving as the base Extent and Query factory.

A store manager's knowledge of its contents is typically not complete. It knows about the classes that it has encountered in its lifetime. The PersistenceManager can make the StoreManager aware of a class, and can check if the StoreManager knows about a particular class. The Auto-Start mechanism provides a way of inheriting knowledge from the last time the store was used.
version:
   $Revision: 1.180 $



Field Summary
final protected static  LocaliserLOCALISER
     Localiser for messages.
protected  StringautoStartMechanism
     Name of the AutoStart mechanism.
protected  DatastoreAdapterdba
     Adapter for the datastore being used.
final protected  booleanfixedDatastore
     Whether this datastore is fixed (no mods to datastore classes allowed).
protected  IdentifierFactoryidentifierFactory
     Factory for identifiers for this datastore.
final protected  OMFContextomfContext
     ObjectManagerFactory context.
final protected  PoidManagerpoidManager
     Manager for identity generation.
final protected  booleanreadOnlyDatastore
     Whether this datastore is read only.
final protected  StringreadOnlyDatastoreAction
     What should happen if read-only and an update is invoked.
protected  AutoStartMechanismstarter
     Auto-Start mechanism to use.
protected  booleanstarterInitialised
    
protected  StoreDataManagerstoreDataMgr
     Manager for the data definition in the datastore.
final protected  StringstoreManagerKey
    
protected  StoreManagerRuntimestoreManagerRuntime
     StoreManager Runtime.

Constructor Summary
protected  StoreManager(String key, ClassLoaderResolver clr, ObjectManagerFactoryImpl omf)
     Constructor for a new StoreManager.

Method Summary
public  voidaddClass(String className, ClassLoaderResolver clr)
     Method to add a class to the managed list for this datastore manager.
abstract public  voidaddClasses(String[] classes, ClassLoaderResolver clr, Writer writer, boolean completeDdl)
     Add classes to the persistence model for the datastore. In the case of an RDBMS, this will map these classes to RDBMS tables. In the case of XML, this will map these classes to XML datafiles.
public  voidaddClasses(String[] classNames, ClassLoaderResolver clr)
     Add classes to the persistence model for the datastore.
protected  voidclearAutoStarter()
     Method to clear the Auto-Starter status.
public  voidclose()
    
abstract public  voiddeleteObject(StateManager sm)
     Deletes a persistent object from the datastore.
protected  voidderegisterAllStoreData()
     Method to deregister all existing store data so that we are managing nothing.
abstract public  voidfetchObject(StateManager sm, int fieldNumbers)
     Fetches a persistent object from the database.
abstract public  ObjectfindObject(ObjectManager om, Object id)
     Method to find a persistable object with the specified id from the datastore, if the StoreManager supports this operation (optional).
public  ApiAdaptergetApiAdapter()
     Accessor for the API adapter.
public  AutoStartMechanismgetAutoStartMechanism()
    
public  StringgetClassNameForObjectID(Object id, ClassLoaderResolver clr, ObjectManager om)
     Returns the class corresponding to the given object identity.
public  AbstractClassMetaDatagetClassWithPrimaryKeyForClass(AbstractClassMetaData cmd, ClassLoaderResolver clr)
     Utility to navigate the inheritance hierarchy to find the base class that defines the primary keys for this tree.
public  AbstractClassMetaData[]getClassesManagingTableForClass(AbstractClassMetaData cmd, ClassLoaderResolver clr)
     Method to return the class(es) that has a table managing the persistence of the fields of the supplied class.
public  DatastoreAdaptergetDatastoreAdapter()
     Gets the DatastoreAdapter to use for this store.
public  DatastoreClassgetDatastoreClass(String className, ClassLoaderResolver clr)
     Returns the primary datastore container serving as backing for the given class.
public synchronized  DatastoreClassgetDatastoreClass(DatastoreIdentifier name)
     Returns the JDO table having the given SQL identifier. Returns 'null' if no such table is (yet) known to the store manager.
Parameters:
  name - The identifier name of the table.
abstract public  DategetDatastoreDate()
     Get the date/time of the datastore.
abstract public  ExtentgetExtent(ObjectManager om, Class c, boolean subclasses)
     Interface to getting an Extent for a class.
public  IdentifierFactorygetIdentifierFactory()
     Accessor for the identifier factory.
abstract public  JPOXConnectiongetJPOXConnection(ObjectManager om)
     Method to return a JPOX connection for the ObjectManager.
abstract public  JPOXSequencegetJPOXSequence(ObjectManager om, SequenceMetaData seqmd)
     Method to return a datastore sequence for this datastore matching the passed sequence MetaData.
public  MetaDataManagergetMetaDataManager()
     Gets the MetaDataManager to use for this store.
public  OMFContextgetOMFContext()
    
public  PoidManagergetPoidManager()
     Accessor for the POIDManager for obtaining sequences.
abstract public  StoregetStore(ClassLoaderResolver clr, AbstractMemberMetaData fmd, Class type)
    
public  StringgetStoreManagerKey()
     Accessor for the key for this store manager.
abstract public  ObjectgetStrategyValue(ObjectManager om, DatastoreClass table, AbstractClassMetaData cmd, int absoluteFieldNumber)
     Method to retrieve the value for a strategy for a particular field.
public  HashSetgetSubClassesForClass(String className, boolean includeDescendents, ClassLoaderResolver clr)
     Utility to return the names of the classes that are known subclasses of the provided class.
protected  voidinitialiseAutoStart(String mechanism, String mode, ClassLoaderResolver clr)
     Method to initialise the auto-start mechanism, loading up the classes from its store into memory so that we start from where we got to last time.
abstract public  voidinsertObject(StateManager sm)
     Inserts a persistent object into the database.
public  booleanisStrategyDatastoreAttributed(IdentityStrategy identityStrategy, boolean datastoreIdentityField)
    
abstract public  voidlocateObject(StateManager sm)
     Locates this object in the datastore.
public  StringmanageClassForIdentity(Object id, ClassLoaderResolver clr)
     Convenience method to ensure that the class defined by the passed OID/SingleFIeldIdentity is managed by the store.
public  booleanmanagesClass(String className)
    
public  ObjectnewObjectID(ObjectManager om, String className, Object pc)
     Returns a new, unique ID for an object of the given class.
Parameters:
  om - The Object Manager
Parameters:
  className - Name of the class of the object.
Parameters:
  pc - The persistable object.
public  voidnotifyObjectIsOutdated(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. (The most common case is that the state of the PC becomes HOLLOW). This is especially important for object databases employing implicit storing from the main memory to the database (like DB4O). These databases may stop tracking the main memory copy and linking it with its on-disk copy, thus releasing memory. More importantly, these databases then know that the object should be reloaded when it is (maybe even implicitly) accessed again. To be clear: There may be multiple copies of the data of one PC object (from the user perspective), namely a copy in main memory (on the Java heap) and a copy in the database (usually on disk). As there may be multiple copies, some of these copies may be outdated or invalid.
abstract public  voidoutputDatastoreInformation(PrintStream ps)
     Method to output the datastore information to the specified PrintStream.
abstract public  voidoutputSchemaInformation(PrintStream ps)
     Method to output the schema information to the specified PrintStream.
public  voidperformVersionCheck(StateManager sm, Object versionDatastore, VersionMetaData versionMetaData)
     Perform an optimistic version check on the passed object, against the passed version in the datastore.
protected  voidregisterStoreData(StoreData data)
     Method to register some data with the store.
abstract public  voidremoveAllClasses(ClassLoaderResolver clr)
     Drops all tables in the datastore.
abstract public  voidresolveIdentifierMacro(MacroString.IdentifierMacro im, ClassLoaderResolver clr)
     Resolves an identifier macro.
abstract public  booleansupportsQueryLanguage(String language)
     Accessor for whether this query language is supported.
abstract public  voidupdateObject(StateManager sm, int fieldNumbers)
     Updates a persistent object in the datastore.
public  booleanusesDatastoreClass()
     Method returning whether the datastore has a "datastore class" equivalent that the StoreManager uses to represent it.

Field Detail
LOCALISER
final protected static Localiser LOCALISER(Code)
Localiser for messages.



autoStartMechanism
protected String autoStartMechanism(Code)
Name of the AutoStart mechanism.



dba
protected DatastoreAdapter dba(Code)
Adapter for the datastore being used.



fixedDatastore
final protected boolean fixedDatastore(Code)
Whether this datastore is fixed (no mods to datastore classes allowed).



identifierFactory
protected IdentifierFactory identifierFactory(Code)
Factory for identifiers for this datastore. Really should be on MappedStoreManager.



omfContext
final protected OMFContext omfContext(Code)
ObjectManagerFactory context.



poidManager
final protected PoidManager poidManager(Code)
Manager for identity generation.



readOnlyDatastore
final protected boolean readOnlyDatastore(Code)
Whether this datastore is read only.



readOnlyDatastoreAction
final protected String readOnlyDatastoreAction(Code)
What should happen if read-only and an update is invoked.



starter
protected AutoStartMechanism starter(Code)
Auto-Start mechanism to use.



starterInitialised
protected boolean starterInitialised(Code)
Whether the AutoStart mechanism is initialised



storeDataMgr
protected StoreDataManager storeDataMgr(Code)
Manager for the data definition in the datastore.



storeManagerKey
final protected String storeManagerKey(Code)
Key for this StoreManager e.g "rdbms", "db4o"



storeManagerRuntime
protected StoreManagerRuntime storeManagerRuntime(Code)
StoreManager Runtime. Used when providing management of services.




Constructor Detail
StoreManager
protected StoreManager(String key, ClassLoaderResolver clr, ObjectManagerFactoryImpl omf)(Code)
Constructor for a new StoreManager. Stores the basic information required for the datastore management.
Parameters:
  key - Key for this StoreManager
Parameters:
  clr - the ClassLoaderResolver
Parameters:
  omf - The corresponding ObjectManagerFactory.
See Also:   StoreManagerFactory




Method Detail
addClass
public void addClass(String className, ClassLoaderResolver clr)(Code)
Method to add a class to the managed list for this datastore manager.
Parameters:
  className - Name of the class
Parameters:
  clr - The ClassLoaderResolver



addClasses
abstract public void addClasses(String[] classes, ClassLoaderResolver clr, Writer writer, boolean completeDdl)(Code)
Add classes to the persistence model for the datastore. In the case of an RDBMS, this will map these classes to RDBMS tables. In the case of XML, this will map these classes to XML datafiles.

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.
Parameters:
  classes - The class(es) to be added.
Parameters:
  clr - The ClassLoaderResolver
Parameters:
  writer - Optional writer when you just want the DDL for persisting the specified classes
Parameters:
  completeDdl - whether complete DDL will be created when writing DDL to a file, or only for missing elements
exception:
  org.jpox.store.exceptions.DatastoreValidationException - If there is some mismatch between the current datastore contents andthose necessary to enable persistence of the given classes.




addClasses
public void addClasses(String[] classNames, ClassLoaderResolver clr)(Code)
Add classes to the persistence model for the datastore. In the case of an RDBMS, this will map these classes to RDBMS tables. In the case of XML, this will map these classes to XML datafiles.

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.
Parameters:
  classNames - The class(es) to be added.
Parameters:
  clr - The ClassLoaderResolver
exception:
  org.jpox.store.exceptions.DatastoreValidationException - If there is some mismatch between the current datastore contents andthose necessary to enable persistence of the given classes.




clearAutoStarter
protected void clearAutoStarter()(Code)
Method to clear the Auto-Starter status.



close
public void close()(Code)
Release of resources



deleteObject
abstract public void deleteObject(StateManager sm)(Code)
Deletes a persistent object from the datastore.
Parameters:
  sm - The state manager of the object to be deleted.
throws:
  JPOXDataStoreException - when an error occurs in the datastore communication



deregisterAllStoreData
protected void deregisterAllStoreData()(Code)
Method to deregister all existing store data so that we are managing nothing.



fetchObject
abstract public void fetchObject(StateManager sm, int fieldNumbers)(Code)
Fetches a persistent object from the database.
Parameters:
  sm - The state manager of the object to be fetched.
Parameters:
  fieldNumbers - The numbers of the fields to be fetched.
throws:
  JPOXObjectNotFoundException - if the object doesnt exist
throws:
  JPOXDataStoreException - when an error occurs in the datastore communication



findObject
abstract public Object findObject(ObjectManager om, Object id)(Code)
Method to find a persistable object with the specified id from the datastore, if the StoreManager supports this operation (optional). This allows for datastores that perform the instantiation of objects directly (such as ODBMS). With other types of datastores (e.g RDBMS) this method returns null. If the StoreManager supports this operation yet the object is not found an exception should be thrown.
Parameters:
  om - the ObjectManager which will manage the object
Parameters:
  id - the id of the object in question. a persistable object with a valid object state (for example: hollow) or null, indicating that the implementation leaves the instantiation work to JPOX.



getApiAdapter
public ApiAdapter getApiAdapter()(Code)
Accessor for the API adapter. API adapter



getAutoStartMechanism
public AutoStartMechanism getAutoStartMechanism()(Code)
Accessor for the AutoStartMechanism may return null if auto start mechanism is not initialized



getClassNameForObjectID
public String getClassNameForObjectID(Object id, ClassLoaderResolver clr, ObjectManager om)(Code)
Returns the class corresponding to the given object identity. If the object is an OID (datastore-identity), return the PC class specified in the identity. If the object is SingleFieldIdentity, return the PC class specified in the identity If the object is an AppID PK, return the PC class that uses it. If the object is a SCOID, return the SCO class. If the object is a PersistenceCapable class, return the class.
Parameters:
  id - The identity of some object.
Parameters:
  clr - ClassLoader resolver
Parameters:
  om - Object Manager For datastore identity, return the class of the correspondingobject. For application identity, return the class of the correspondingobject or null if object does not exist.
exception:
  ClassCastException - If the type of ID is not recognized (OIDor SCOID).



getClassWithPrimaryKeyForClass
public AbstractClassMetaData getClassWithPrimaryKeyForClass(AbstractClassMetaData cmd, ClassLoaderResolver clr)(Code)
Utility to navigate the inheritance hierarchy to find the base class that defines the primary keys for this tree. This will either go up to the next class in the hierarchy that has a table OR go up to the base class, whichever is first.
Parameters:
  cmd - AbstractClassMetaData for this class
Parameters:
  clr - The ClassLoaderResolver The AbstractClassMetaData for the class defining the primary keys



getClassesManagingTableForClass
public AbstractClassMetaData[] getClassesManagingTableForClass(AbstractClassMetaData cmd, ClassLoaderResolver clr)(Code)
Method to return the class(es) that has a table managing the persistence of the fields of the supplied class. For the 3 inheritance strategies, the following occurs :-
  • new-table : will return the same ClassMetaData
  • subclass-table : will return all subclasses that have a table managing its fields
  • superclass-table : will return the next superclass that has a table

Parameters:
  cmd - The supplied class.
Parameters:
  clr - ClassLoader resolver The ClassMetaData's managing the fields of the supplied class



getDatastoreAdapter
public DatastoreAdapter getDatastoreAdapter()(Code)
Gets the DatastoreAdapter to use for this store. Returns the DatastoreAdapter



getDatastoreClass
public DatastoreClass getDatastoreClass(String className, ClassLoaderResolver clr)(Code)
Returns the primary datastore container serving as backing for the given class. If the class is not yet known to the store manager, StoreManager.addClass is called to add it. Classes which have inheritance strategy of "new-table" and "superclass-table" will return a table here, whereas "subclass-table" will return null since it doesn't have a table as such.


Parameters:
  className - Name of the class whose table is be returned.
Parameters:
  clr - The ClassLoaderResolver The corresponding class table.
exception:
  NoTableManagedException - If the given class has no table managed in the database.




getDatastoreClass
public synchronized DatastoreClass getDatastoreClass(DatastoreIdentifier name)(Code)
Returns the JDO table having the given SQL identifier. Returns 'null' if no such table is (yet) known to the store manager.
Parameters:
  name - The identifier name of the table. The corresponding JDO table, or 'null'



getDatastoreDate
abstract public Date getDatastoreDate()(Code)
Get the date/time of the datastore. Date/time of the datastore



getExtent
abstract public Extent getExtent(ObjectManager om, Class c, boolean subclasses)(Code)
Interface to getting an Extent for a class.
Parameters:
  om - The Object Manager
Parameters:
  c - The class requiring the Extent
Parameters:
  subclasses - Whether to include subclasses of 'c' The Extent.



getIdentifierFactory
public IdentifierFactory getIdentifierFactory()(Code)
Accessor for the identifier factory. Returns the identifier factory.



getJPOXConnection
abstract public JPOXConnection getJPOXConnection(ObjectManager om)(Code)
Method to return a JPOX connection for the ObjectManager.
Parameters:
  om - ObjectManager The JPOX Connection



getJPOXSequence
abstract public JPOXSequence getJPOXSequence(ObjectManager om, SequenceMetaData seqmd)(Code)
Method to return a datastore sequence for this datastore matching the passed sequence MetaData.
Parameters:
  om - The Object Manager
Parameters:
  seqmd - SequenceMetaData The Sequence



getMetaDataManager
public MetaDataManager getMetaDataManager()(Code)
Gets the MetaDataManager to use for this store. Returns the MetaDataManager.



getOMFContext
public OMFContext getOMFContext()(Code)
Accessor for the context in which this RDBMSManager is running Returns the context.



getPoidManager
public PoidManager getPoidManager()(Code)
Accessor for the POIDManager for obtaining sequences. The POID manager for this datastore



getStore
abstract public Store getStore(ClassLoaderResolver clr, AbstractMemberMetaData fmd, Class type)(Code)



getStoreManagerKey
public String getStoreManagerKey()(Code)
Accessor for the key for this store manager. StoreManager key



getStrategyValue
abstract public Object getStrategyValue(ObjectManager om, DatastoreClass table, AbstractClassMetaData cmd, int absoluteFieldNumber)(Code)
Method to retrieve the value for a strategy for a particular field.
Parameters:
  om - The Object Manager
Parameters:
  table - The datastore table
Parameters:
  cmd - AbstractClassMetaData for the class
Parameters:
  absoluteFieldNumber - The field number The value



getSubClassesForClass
public HashSet getSubClassesForClass(String className, boolean includeDescendents, ClassLoaderResolver clr)(Code)
Utility to return the names of the classes that are known subclasses of the provided class. Actually uses the MetaDataManager for determining what is a subclass since the MetaData is often registered before being needed by the Store.
Parameters:
  className - Class for which we search for subclasses.
Parameters:
  includeDescendents - Whether to include subclasses of subclasses etc
Parameters:
  clr - The ClassLoaderResolver Set of classes that are subclasses of the input class.



initialiseAutoStart
protected void initialiseAutoStart(String mechanism, String mode, ClassLoaderResolver clr) throws DatastoreInitialisationException(Code)
Method to initialise the auto-start mechanism, loading up the classes from its store into memory so that we start from where we got to last time.
Parameters:
  mechanism - Auto-Start mechanism
Parameters:
  mode - Mode of operation
Parameters:
  clr - The ClassLoaderResolver
throws:
  DatastoreInitialisationException -



insertObject
abstract public void insertObject(StateManager sm)(Code)
Inserts a persistent object into the database.
Parameters:
  sm - The state manager of the object to be inserted.
throws:
  JPOXDataStoreException - when an error occurs in the datastore communication



isStrategyDatastoreAttributed
public boolean isStrategyDatastoreAttributed(IdentityStrategy identityStrategy, boolean datastoreIdentityField)(Code)
Check if the strategy is attributed by the database when the PersistenceCapable object is inserted into the database
Parameters:
  identityStrategy - the identityStrategy
Parameters:
  datastoreIdentityField - Whether this is for the surrogate datastore identity field if the object for the strategy is attributed by the database



locateObject
abstract public void locateObject(StateManager sm)(Code)
Locates this object in the datastore.
Parameters:
  sm - The StateManager for the object to be found
throws:
  JPOXObjectNotFoundException - if the object doesnt exist
throws:
  JPOXDataStoreException - when an error occurs in the datastore communication



manageClassForIdentity
public String manageClassForIdentity(Object id, ClassLoaderResolver clr)(Code)
Convenience method to ensure that the class defined by the passed OID/SingleFIeldIdentity is managed by the store.
Parameters:
  id - OID
Parameters:
  clr - ClassLoader resolver The class name of the class associated to this identity
throws:
  JPOXUserException - if the identity is assigned to the wrong class



managesClass
public boolean managesClass(String className)(Code)
Accessor for whether the specified class is managed currently
Parameters:
  className - The name of the class Whether it is managed



newObjectID
public Object newObjectID(ObjectManager om, String className, Object pc)(Code)
Returns a new, unique ID for an object of the given class.
Parameters:
  om - The Object Manager
Parameters:
  className - Name of the class of the object.
Parameters:
  pc - The persistable object. Used for application-identity A new object ID.
throws:
  JPOXUserException - if the class has no available table in the datastore



notifyObjectIsOutdated
public void notifyObjectIsOutdated(StateManager sm)(Code)
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. (The most common case is that the state of the PC becomes HOLLOW). This is especially important for object databases employing implicit storing from the main memory to the database (like DB4O). These databases may stop tracking the main memory copy and linking it with its on-disk copy, thus releasing memory. More importantly, these databases then know that the object should be reloaded when it is (maybe even implicitly) accessed again. To be clear: There may be multiple copies of the data of one PC object (from the user perspective), namely a copy in main memory (on the Java heap) and a copy in the database (usually on disk). As there may be multiple copies, some of these copies may be outdated or invalid. In case such a copy is to be accessed, its contents should not be used. Rather than that, the outdated copy should be overwritten by an authorative copy. This method marks the main memory copy of the object (on the Java heap) to be outdated in that sense.



outputDatastoreInformation
abstract public void outputDatastoreInformation(PrintStream ps) throws Exception(Code)
Method to output the datastore information to the specified PrintStream.
Parameters:
  ps - PrintStream
throws:
  Exception - If an error occurs obtaining the datastore info



outputSchemaInformation
abstract public void outputSchemaInformation(PrintStream ps) throws Exception(Code)
Method to output the schema information to the specified PrintStream.
Parameters:
  ps - PrintStream
throws:
  Exception - If an error occurs obtaining the schema info



performVersionCheck
public void performVersionCheck(StateManager sm, Object versionDatastore, VersionMetaData versionMetaData)(Code)
Perform an optimistic version check on the passed object, against the passed version in the datastore.
Parameters:
  sm - StateManager of the object to check
Parameters:
  versionDatastore - Version of the object in the datastore
Parameters:
  versionMetaData - VersionMetaData to use for checking
throws:
  JPOXUserException - thrown when an invalid strategy is specified
throws:
  JPOXOptimisticException - thrown when the version check fails



registerStoreData
protected void registerStoreData(StoreData data)(Code)
Method to register some data with the store. This will also register the data with the starter process.
Parameters:
  data - The StoreData to add



removeAllClasses
abstract public void removeAllClasses(ClassLoaderResolver clr)(Code)
Drops all tables in the datastore. This empties the datastore of all datastore objects managed by JPOX. All objects not managed by JPOX are left untouched.
Parameters:
  clr - The ClassLoaderResolver



resolveIdentifierMacro
abstract public void resolveIdentifierMacro(MacroString.IdentifierMacro im, ClassLoaderResolver clr)(Code)
Resolves an identifier macro. The public fields clazz , fieldName , and subfieldName of the given macro are taken as inputs, and the public value field is set to the SQL identifier of the corresponding database table or column.
Parameters:
  im - The macro to resolve.
Parameters:
  clr - The ClassLoaderResolver



supportsQueryLanguage
abstract public boolean supportsQueryLanguage(String language)(Code)
Accessor for whether this query language is supported.
Parameters:
  language - The language Whether it is supported.
See Also:   org.jpox.store.StoreManager.supportsQueryLanguage(java.lang.String)



updateObject
abstract public void updateObject(StateManager sm, int fieldNumbers)(Code)
Updates a persistent object in the datastore.
Parameters:
  sm - The state manager of the object to be updated.
Parameters:
  fieldNumbers - The numbers of the fields to be updated.
throws:
  JPOXDataStoreException - when an error occurs in the datastore communication



usesDatastoreClass
public boolean usesDatastoreClass()(Code)
Method returning whether the datastore has a "datastore class" equivalent that the StoreManager uses to represent it. For datastores like RDBMS this will return "true" since we have a "table". For object datastores this is typically "false" since the objects are stored in some internal form not visible via its API. Whether datastore classes are used by the StoreManager



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.