Service Registry 3 2005Q4 Developer's Guide

Identifying Objects

As stated in Finding Objects by Unique Identifier, every object in the Registry has two identifiers, a unique identifier and a logical identifier. If you do not set these identifiers when you create the object, the Registry generates a unique value and assigns that value to both the unique and the logical identifiers.

Whenever a new version of an object is created, the logical identifier remains the same as the original one, but the Registry generates a new unique identifier by adding a colon and the version number to the unique identifier. See Retrieving the Version of an Object and Creating Relationships Between Objects: Associations for more information.

If you plan to use your own identification scheme, you can use API methods to set object identifiers.

In the JAXR API, the unique identifier is called a Key object. You can use the LifeCycleManager.createKey method to create a unique identifier from a String object. You can then use the RegistryObject.setKey method to set the key.

The logical identifier is called a lid. The JAXR provider for the Registry has an implementation-specific method, RegistryObjectImpl.setLid, which also takes a String argument, for setting this identifier. The method has the following signature:

public void setLid(java.lang.String lid)
    throws JAXRException

Any identifier that you specify must be a valid, globally unique URN (Uniform Resource Name). When the JAXR API generates a key for an object, the key is in the form of a DCE 128 UUID (Universal Unique IDentifier).