The UniqueId can change when the name changes (in some cases but but it is impossible to tell when).
The UID will stay unique.
The UniqueId is what is returned when you save an item.
Currently the UniqueId is used when you want to retrieve a certain item.
A future version of the bean will support doing the same using the UID.
The reason that they are both used is that with recurring events the UID is always the same. For that a UniqueId is used.