Home | Trees | Index | Help |
|
---|
Package Modeling :: Module EditingContext :: Class UniquingTable |
|
object
--+
|
UniquingTable
The uniquing table - encapsulate the dictionary structure Defines the standard behaviour for methods: 'globalIDForObject()', 'objectForGlobalID', etc.
Its goal is to guarantee that the uniquing principle is enforced, i.e. that one given row in the database cannot be represented by more than one object within the EditingContext.
Since faults / ghosted object are usually identified by their so-called ``root GlobalID'' (a root GlobalID has exactly the same keyValues() than the real GlobalID but has an entityName() referring to the root Entity, not the object's actual Entity ; this is because the actual Entity for an object can only be known when data for that object is actually fetched against the database), the UniquingTable also keeps track of root globalIDs in order to be able to serve objects from globalID being either the root and the real GlobalID.
Method Summary | |
---|---|
__init__(self)
| |
addObjectForGlobalID(self,
anObject,
aGlobalID)
| |
Clear all entries | |
Removes the object and the corresponding GlobalID from the uniquing table | |
Removes the GlobalID and the corresponding object from the uniquing table | |
Returns the GlobalId registered with that object, or 'None' if it cannot be found | |
globalIDs(self)
| |
hasGlobalID(self,
aGlobalID)
| |
hasObject(self,
anObject)
| |
Returns the object corresponding to the given 'aGlobalID', or 'None' if it cannot be found in the receiver's uniquing table. | |
objects(self)
| |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Method Details |
---|
clear(self)Clear all entries |
forgetObject(self, object)Removes the object and the corresponding GlobalID from the uniquing table |
forgetObjectForGlobalID(self, aGlobalID)Removes the GlobalID and the corresponding object from the uniquing table |
globalIDForObject(self, anObject)Returns the GlobalId registered with that object, or 'None' if it cannot be found |
objectForGlobalID(self, aGlobalID)Returns the object corresponding to the given 'aGlobalID', or 'None' if it cannot be found in the receiver's uniquing table. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sat Mar 4 13:36:24 2006 | http://epydoc.sf.net |