Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > EOControl Reference

Table of Contents

EOGlobalID


Inherits from:
NSObject
Conforms to:
NSCopying
NSObject (NSObject)
Declared in:
EOControl/EOGlobalID.h




Class Description


An EOGlobalID is a compact, universal identifier for a persistent object, forming the basis for uniquing in Enterprise Objects Framework. An EOGlobalID uniquely identifies the same object or record both between EOEditingContexts in a single application and in multiple applications (as in distributed systems). EOGlobalID is an abstract class, declaring only the methods needed for identification. A concrete subclass must define appropriate storage for identifying values (such as primary keys), as well as an initialization or creation method to build IDs. See the EOKeyGlobalID class specification for an example of a concrete ID class.


Temporary Identifiers

EOEditingContexts and other object stores support the insertion of new objects without established IDs, creating temporary IDs that get replaced with permanent ones as soon as the new objects are saved to their persistent stores. The temporary IDs are instances of the EOTemporaryGlobalID class.

When an EOObjectStore saves these newly inserted objects, it must replace the temporary IDs with persistent ones. When it does this, it must post an EOGlobalIDChangedNotification announcing the change so that observers can update their accounts of which objects are identified by which global IDs. The notification's userInfo dictionary contains a mapping from the temporary IDs (the keys) to their permanent replacements (the values).




Constants


In EOGlobalID.h, EOControl defines NSString constants for the names of the notifications it posts. For more information, see the section "Notifications" below.



Adopted Protocols


NSCopying
- copyWithZone:


Instance Methods



isTemporary

- (BOOL)isTemporary

Returns NO. See the class description for more information.


Notifications


EOGlobalIDChangedNotification

EOCONTROL_EXTERN NSString *EOGlobalIDChangedNotification

Posted whenever EOTemporaryGlobalIDs are replaced by permanent EOGlobalIDs. The notification contains:
Notification Object nil
Userinfo A mapping from the temporary IDs (keys) to permanent IDs (values)



Table of Contents