Update of /cvsroot/modeling/ProjectModeling/Modeling
In directory sc8-pr-cvs1:/tmp/cvs-serv26540
Modified Files:
EditingContext.py
Log Message:
Added allInsertedGlobalIDs(), allUpdatedGlobalIDs() and allDeletedGlobalIDs()
Index: EditingContext.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/EditingContext.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** EditingContext.py 17 Jul 2003 15:16:28 -0000 1.27
--- EditingContext.py 18 Jul 2003 11:32:52 -0000 1.28
***************
*** 363,366 ****
--- 363,380 ----
# Changes within the editing context
+ def allDeletedGlobalIDs(self):
+ """
+ Returns a sequence made of GlobalIDs of objects that have been deleted
+ into the EditingContext and that have not been made persistent yet.
+
+ The GlobalIDs returned are those identifying objects who were marked as
+ deleted within the EditingContext, while deletedGlobalIDs() only returns
+ the GlobalIDs for objects that were marked as deleted before the last
+ invocation of processRecentChanges() (or saveChanges()).
+
+ See also: deletedGlobalIDs(), allDeletedObjects()
+ """
+ return tuple(self._deletedObjects+self._pendingDeletedObjects)
+
def deletedGlobalIDs(self):
"""
***************
*** 368,371 ****
--- 382,390 ----
graph of objects managed by the EditingContext.
+ The GlobalIDs returned are those indentifying objects who were marked as
+ deleted before the last invocation of processRecentChanges() (or
+ saveChanges()). If you want to get all deleted GlobalIDs, see
+ allDeletedGlobalIDs().
+
See also: deletedObjects()
"""
***************
*** 400,403 ****
--- 419,436 ----
return map(self.objectForGlobalID, self._deletedObjects)
+ def allInsertedGlobalIDs(self):
+ """
+ Returns a sequence made of GlobalIDs of objects that have been inserted
+ into the EditingContext and that have not been made persistent yet.
+
+ The GlobalIDs returned are those identifying objects who were marked as
+ inserted within the EditingContext, while insertedGlobalIDs() only returns
+ the GlobalIDs for objects that were marked as inserted before the last
+ invocation of processRecentChanges() (or saveChanges()).
+
+ See also: insertedObjects(), allInsertedObjects()
+ """
+ return tuple(self._insertedObjects+self._pendingInsertedObjects)
+
def insertedGlobalIDs(self):
"""
***************
*** 406,412 ****
into the EditingContext and that have not been made persistent yet.
! The objects returned are those who were marked as inserted before the last
! invocation of processRecentChanges() (or saveChanges()). If you want to
! get all inserted objects, see allInsertedObjects().
See also: insertedObjects()
--- 439,446 ----
into the EditingContext and that have not been made persistent yet.
! The GlobalIDs returned are those indentifying objects who were marked as
! inserted before the last invocation of processRecentChanges() (or
! saveChanges()). If you want to get all inserted GlobalIDs, see
! allInsertedGlobalIDs().
See also: insertedObjects()
***************
*** 442,445 ****
--- 476,493 ----
return map(self.objectForGlobalID, self._insertedObjects)
+ def allUpdatedGlobalIDs(self):
+ """
+ Returns a sequence made of GlobalIDs of objects that have been updated
+ into the EditingContext and that have not been made persistent yet.
+
+ The GlobalIDs returned are those identifying objects who were marked as
+ updated within the EditingContext, while updatedGlobalIDs() only returns
+ the GlobalIDs for objects that were marked as updated before the last
+ invocation of processRecentChanges() (or saveChanges()).
+
+ See also: updatedObjects(), allUpdatedObjects()
+ """
+ return tuple(self._updatedObjects+self._pendingUpdatedObjects)
+
def updatedGlobalIDs(self):
"""
***************
*** 447,451 ****
the last saveChanges(), or since the EditingContext was created.
! See also: updatedObjects()
"""
return tuple(self._updatedObjects)
--- 495,504 ----
the last saveChanges(), or since the EditingContext was created.
! The GlobalIDs returned are those indentifying objects who were marked as
! updated before the last invocation of processRecentChanges() (or
! saveChanges()). If you want to get all updated GlobalIDs, see
! allUpdatedGlobalIDs().
!
! See also: allUpdatedGlobalIDs(), updatedObjects()
"""
return tuple(self._updatedObjects)
***************
*** 856,860 ****
self._pendingDeletedObjects.remove(gID)
self._pendingInsertedObjects.append(gID)
!
insert=insertObject
--- 909,913 ----
self._pendingDeletedObjects.remove(gID)
self._pendingInsertedObjects.append(gID)
!
insert=insertObject
***************
*** 1252,1256 ****
if not self_obj.isFault():
objects[objects.index(o)]=self_obj.snapshot_raw()
!
if ec is self or ec.isaChildOf(self):
entitiesNames=[fs.entityName()]
--- 1305,1309 ----
if not self_obj.isFault():
objects[objects.index(o)]=self_obj.snapshot_raw()
!
if ec is self or ec.isaChildOf(self):
entitiesNames=[fs.entityName()]
|