| 
WebObjects 5.2.2 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.webobjects.eocontrol.EOGlobalID
An EOGlobalID is a compact, universal, identifier for a persistent object. This forms the basis for uniquing in the 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.
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 a GlobalIDChangedNotification 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).
GlobalIDChangedNotification, 
EOTemporaryGlobalID, 
EOObjectStore, 
Serialized Form| Field Summary | |
static String | 
GlobalIDChangedNotification
Posted whenever EOTemporaryGlobalIDs are replaced by permanent EOGlobalIDs.  | 
| Constructor Summary | |
EOGlobalID()
 | 
|
| Method Summary | |
 Object | 
clone()
EOGlobalID's implementation simply returns a reference to the receiver ( this). | 
abstract  boolean | 
equals(Object object)
Compares the receiver to object. | 
abstract  int | 
hashCode()
Provides an appropriate hash code useful for storing the receiver in a hash-based data structure.  | 
 boolean | 
isTemporary()
If the receiver is temporary (that is, most likely an instance of EOTemporaryGlobalID), this method returns true; false otherwise. | 
| Methods inherited from class java.lang.Object | 
finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final String GlobalIDChangedNotification
| Notification Object | null | ||||||||||
| Userinfo | A mapping from the temporary IDs (keys) to permanent IDs (values) | ||||||||||
| Constructor Detail | 
public EOGlobalID()
| Method Detail | 
public Object clone()
this).
public abstract boolean equals(Object object)
object. If the contents of object
 are equal to the contents of the receiver, this method returns true. If not,
 it returns false. Two data objects are equal if they hold the same
 number of bytes, and if the bytes at the same position in the objects
 are the same.
object - input object against which the receiver is compared
true if the objects are equal; false otherwisepublic abstract int hashCode()
int useful for storing the receiver
               in a hash-based data structurepublic boolean isTemporary()
true; false otherwise.
 See the class description for more information on temporary IDs.
 Note that EOGlobalID's implementation simply returns false.
true if the globalID is temporaryEOGlobalID, 
EOTemporaryGlobalID
  | 
Last updated Mon Oct 13 15:42:52 PDT 2003. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||