CDOIDs are technical identifiers for CDOObjects.
Objects are always initially created at the client side by pulling them from an EFactory. CDOObjects are in state TRANSIENT at this time and do not have a CDOID.
As soon as the object is attached to a CDOTransaction (by making it contained by an existing resource or object, that is already persistent) the state is changed to NEW and a temporary CDOID is assigned to it. Temporary CDOIDs are internally integer values that are unique only in the scope of this CDOTransaction (more exact: in the scope of the next commit operation to happen). Temporary CDOIDs can be cast to CDOIDTemp and their isTemporary() method returns true.
When the CDOTransaction is committed the NEW objects are sent to the repository. Before they are persisted by the repository (more exact: by the store of the repository) the temporary CDOIDs are replaced by permanent ones which are unique in the scope of the whole repository. As part of this ID mapping all references to these objects are adjusted to the newly assigned, permanent CDOIDs. Permanent CDOIDs can be cast to CDOIDObject and their isTemporary() method returns false.
Finally the mappings from temporary to permanent CDOIDs is sent back to the client where the permanent CDOIDs are assigned to the NEW objects and all references to them are adjusted accordingly. The state of all objects in a CDOTransactionis CLEAN after a successful commit operation.
If a store implementation deals with CDOID implementations unknown to the framework, then each CDOSession to this repository maintains a separate instance of a ClassLoader for the instances of these CDOIDs. As a consequence it may not be possible to even compare CDOID instances that stem from different CDOSessions!
If a store implementation uses one of the default CDOID implementations, like CDOIDLongImpl, all instances of them are created by the normal framework ClassLoader. In this case store implementors may choose the abstract LongIDStore class as a base class for their custom store implementation.
All CDOID types except CDOID.NULL support the difference between temporary and permanent values.