Dashboard > WebObjects > EOF-Modeling-GlobalIDs
  WebObjects Log In View a printable version of the current page.  
  EOF-Modeling-GlobalIDs
Added by Steven Mark McCraw, last edited by Pascal Robert on Sep 03, 2007  (view change)
Labels: 
(None)

A GlobalID (often called a GID) is an object which can be used to uniquely identify an instance of an entity. For example, if you have an entity called "Trucks" then GIDs can be used to identify which truck is being considered. The superclass EOGlobalID can be used through the EOF API, but its concrete subclasses are used in specific situations. These are described below, but often you do not need to consider what sort of GID you actually have.

Key Global IDs

An EOKeyGlobalID is used to uniquely identify an instance of an entity that is already stored in a database. Here is an example of how the truck table might look.

id (primary key) license plate purchase timestamp
42352 RU1993 2002-09-28 12:00:00
42355 AA3335 2006-05-01 11:00:00
42376 QW7733 2007-01-01 14:00:00

The primary key is carried inside the EOKeyGlobalID to identify the instance of the entity which is effectively the row in the database. In this example, the EOKeyGlobalID that contains the key 42355 would be a unique identifier for the Truck with the data containing the number plate AA3335.

Temporary Global IDs

EOTemporaryGlobalID-s are used when instances of an entity are still only in memory. This happens when you are creating new data because the instances do not yet have rows stored in the database. The EOTemporaryGlobalID uses a long string that composites various pieces of information to make an identifier which is unique not only in the system you are running, but between systems as well.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.4 Build:#809 Jun 12, 2007) - Bug/feature request - Contact Administrators