Package Modeling :: Package interfaces :: Module ObjectStoreInterface :: Class ObjectStoreInterface
[show private | hide private]
[frames | no frames]

Class ObjectStoreInterface

Base --+
       |
      ObjectStoreInterface

Known Subclasses:
CooperatingObjectStoreInterface, IEditingContext

ObjectStore API

ObjectStore defines a common API for classes which manipulates graphs of objects.

Contrary to other interfaces, 'ObjectStoreInterface' is not intended to be fully implemented by all classes which use it. (... __TBD) Thus, and even if this should be considered as an interface for some abstract class, a concrete class ('ObjectStore') implementing this interface exists, in which all defined methods just raises. This class should be used as a mix-in class for classes implementing this interface. Theses classes should in turn override the methods which makes sense for them.

The documentation clearly states which known subclasses (see below) override the default behaviour. Additionnally, the general purpose of each method will be explained ; subclasses' particular behaviour or processing will be explained when possible, or will explicitely refer to some other documentation.

The classes implementing this interface are: 'EditingContext', 'CooperatingObjectStore', 'ObjectStoreCoordinator' and 'DatabaseContext'.


Method Summary
  arrayFaultWithSourceGlobalID(self, aGlobalID, aRelationshipName, anEditingContext)
ObjectStoreCoordinator: see details in interface
  editingContextDidForgetObjectWithGlobalID(self, aContext, aGlobalID)
  faultForGlobalID(self, aGlobalID, anEditingContext)
ObjectStoreCoordinator: see details in interface
  faultForRawRow(self, aRow, anEntityName, anEditingContext)
Turns a row (dictionary) into a real object.
  handlesObject(self, anObject)
An alias for ownsObject
  initializeObject(self, anObject, aGlobalID, anEditingContext)
  invalidateAllObjects(self)
ObjectStoreCoordinator: see details in interface
  invalidateObjectsWithGlobalIDs(self, globalIDs)
ObjectStoreCoordinator: see details in interface
  isObjectLockedWithGlobalID(self, aGlobalID, anEditingContext)
anEditingContext optional?
  lockObjectWithGlobalID(self, aGlobalID, anEditingContext)
  objectsCountWithFetchSpecification(self, aFetchSpecification, anEditingContext)
Returns the approximate number of objects that would be returned by objectsWithFetchSpecification() if called with the very same parameters.
  objectsForSourceGlobalID(self, aGlobalID, aRelationshipName, anEditingContext)
ObjectStoreCoordinator: see details in interface
  objectsWithFetchSpecification(self, aFetchSpecification, anEditingContext)
ObjectStoreCoordinator: see details in interface
  ownsObject(self, anObject)
Tells whether the object store can handle 'anObject'.
  refaultObject(self, anObject, aGlobalID, anEditingContext)
ObjectStoreCoordinator: see details in interface
  rootObjectStore(self)
This method is dedicated to interactions between a hierarchy of 'EditingContext' (parent/child EC configuration) and the parent object store of the hierarchy's root EditingContext.
  savesChangesInEditingContext(self, anEditingContext)
EditingContext for parent/child ECs configuration

Method Details

arrayFaultWithSourceGlobalID(self, aGlobalID, aRelationshipName, anEditingContext)

Accurate for:
  • ObjectStoreCoordinator: see details in interface

faultForGlobalID(self, aGlobalID, anEditingContext)

Accurate for:
  • ObjectStoreCoordinator: see details in interface

faultForRawRow(self, aRow, anEntityName, anEditingContext)

Turns a row (dictionary) into a real object. Any row, such as the one returned by a fetch when raw rows is actvated, can be turned into a real object given that it contains the primary keys.

Parameters:

row -- a dictionary. This dictionary should have the entity's primary
keys in its keys (and their corresponding values)

entityName -- the name of the entity the row represents

anEditingContext -- The EditingContext in which the object should be
registered.

handlesObject(self, anObject)

An alias for ownsObject

invalidateAllObjects(self)

Accurate for:
  • ObjectStoreCoordinator: see details in interface

invalidateObjectsWithGlobalIDs(self, globalIDs)

Accurate for:
  • ObjectStoreCoordinator: see details in interface

isObjectLockedWithGlobalID(self, aGlobalID, anEditingContext)

anEditingContext optional?

objectsCountWithFetchSpecification(self, aFetchSpecification, anEditingContext)

Returns the approximate number of objects that would be returned by objectsWithFetchSpecification() if called with the very same parameters.

About approximate: see EditingContext.objectsWithFetchSpecification doc.

objectsForSourceGlobalID(self, aGlobalID, aRelationshipName, anEditingContext)

Accurate for:
  • ObjectStoreCoordinator: see details in interface

objectsWithFetchSpecification(self, aFetchSpecification, anEditingContext)

Accurate for:
  • ObjectStoreCoordinator: see details in interface

ownsObject(self, anObject)

Tells whether the object store can handle 'anObject'. A ObjectStoreCoordinator take the opportunity to load the appropriate DatabaseContext when it receives such a message, while a DatabaseContext simply answers true or false (using ownsObject() which is part of the CooperatingObjectStore interface)

Returns: a boolean value

refaultObject(self, anObject, aGlobalID, anEditingContext)

Accurate for:
  • ObjectStoreCoordinator: see details in interface

rootObjectStore(self)

This method is dedicated to interactions between a hierarchy of 'EditingContext' (parent/child EC configuration) and the parent object store of the hierarchy's root EditingContext. 'EditingContext' 's implementation forwards the message to its parent object store. Any other classes derived from 'ObjectStore' which may be set as the parent store of an EditingContext returns 'self': e.g. 'ObjectStoreCoordinator'. Last, all other classes implementing the 'ObjectStore' interface but which do not fall under the previous categories should raise since this message is a non-sense for them (for example: DatabaseContext)

savesChangesInEditingContext(self, anEditingContext)

Accurate for:
  • EditingContext for parent/child ECs configuration
  • ObjectStoreCoordinator: see details in interface

Generated by Epydoc 2.1 on Sat Mar 4 13:36:26 2006 http://epydoc.sf.net