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

Class CooperatingObjectStoreInterface

            Base --+    
                   |    
ObjectStoreInterface --+
                       |
                      CooperatingObjectStoreInterface


CooperatingObjectStore

This interface defines the API that any coordinators should implement so that they can be properly handled by the aplication's 'ObjectStoreCoordinator'

Any class implementing this interface must include the following statement after the class declaration/specification:

# Now enforce interface' specifications
from Interface import verify_class_implementation
verify_class_implementation(CooperatingObjectStoreInterface,
                            <theClassImplementingTheInterface>)

Known class implementing this interface: DatabaseContext


Method Summary
  commitChanges(self)
Commit the changes made in the previous step (cf.
  finalizeCommitChanges(self)
Last step in the process of saving changes.
  handlesFetchSpecification(self, aFetchSpecification)
Indicates whether the CooperatingObjectStore can handle the supplied FetchSpecification.
  ownsGlobalID(self, aGlobalID)
Indicates whether the CooperatingObjectStore is responsible for the object which has this GlobalID.
  ownsObject(self, anObject)
Indicates whether the CooperatingObjectStore is responsible for the changes made to 'anObject'
  performChanges(self)
Third step in the process of saving changes, where concrete subclasses uses the DatabaseOperations built at the previous step to make the changes persistent.
  prepareForSaveWithCoordinator(self, aCoordinator, anEditingContext)
This is the first step being triggered by the ObjectStoreCoordinator when the latter was instructed to do save the changes made in an EditingContext.
  recordChangesInEditingContext(self)
Second step being triggered by the ObjectStoreCoordinator when the latter was instructed to do save the changes made in an EditingContext.
  recordUpdateForObject(self, anObject, aDictionaryOfChanges)
  rollbackChanges(self)
  valuesForKey(self, keys, anObject)
    Inherited from ObjectStoreInterface
  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
  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

commitChanges(self)

Commit the changes made in the previous step (cf. performAdaptorOperations)

This should raise if some problems occur. This method should not clean any internal state used during the process of saving changes, nor take any other action than the one described above: this is the responsability of method finalizeCommitChanges().

finalizeCommitChanges(self)

Last step in the process of saving changes. The ObjectStoreCoordinator calls it one each of its CooperatingObjectStores when all commitChanges() did succeed. Concrete classes should transmit the changes made in the local snapshots (including deletion) to their Database, then they should take all appropriate actions to clean up the internal state.

handlesFetchSpecification(self, aFetchSpecification)

Indicates whether the CooperatingObjectStore can handle the supplied FetchSpecification.

ownsGlobalID(self, aGlobalID)

Indicates whether the CooperatingObjectStore is responsible for the object which has this GlobalID.

ownsObject(self, anObject)

Indicates whether the CooperatingObjectStore is responsible for the changes made to 'anObject'
Overrides:
Modeling.interfaces.ObjectStoreInterface.ObjectStoreInterface.ownsObject

performChanges(self)

Third step in the process of saving changes, where concrete subclasses uses the DatabaseOperations built at the previous step to make the changes persistent. DatabaseContext's implementation builds AdaptorOperation from these DatabaseOperations, and then sends them to the underlying concret AdaptorChannel using the 'performAdaptorOperations()' message.

prepareForSaveWithCoordinator(self, aCoordinator, anEditingContext)

This is the first step being triggered by the ObjectStoreCoordinator when the latter was instructed to do save the changes made in an EditingContext.

See also: recordChangesInEditingContext(), performChanges(),
commitChanges(), rollbackChanges(), EditingContext.saveChanges()

recordChangesInEditingContext(self)

Second step being triggered by the ObjectStoreCoordinator when the latter was instructed to do save the changes made in an EditingContext. The 'EditingContext' instance this method works with is the one supplied when 'prepareForSaveWithCoordinator()' was called.

You should never need to call this method by hand.

See also: prepareForSaveWithCoordinator(), performChanges(),
commitChanges(), rollbackChanges(), EditingContext.saveChanges()

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