An immutable unique identifier for an item within the OpenGamma installation.
This identifier is used as a handle within the system to refer to an item uniquely. All versions of the same object share an {@link ObjectId} with the{@code UniqueId} referring to a single version.
Many external identifiers, represented by {@link ExternalId}, are not truly unique. This {@code ObjectId} and {@code UniqueId} are unique within the OpenGamma instance.
The unique identifier is formed from three parts, the scheme, value and version. The scheme defines a single way of identifying items, while the value is an identifier within that scheme. A value from one scheme may refer to a completely different real-world item than the same value from a different scheme. The version allows the object being identifier to change over time. If the version is null then the identifier refers to the latest version of the object. Note that some data providers may not support versioning.
Real-world examples of {@code UniqueId} include instances of:
- Database key - DbSec~123456~1
- In memory key - MemSec~123456~234
This class is immutable and thread-safe.