Class OMRSArchiveGUIDMap
java.lang.Object
org.odpi.openmetadata.repositoryservices.archiveutilities.OMRSArchiveGUIDMap
OMRSArchiveGUIDMap is a utility to create a persisted list of GUIDs used by an archive builder.
This helps the archive builder use the same GUIDs each time the archive is built. GUIDs for
new elements are created automatically.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the guid for an element based on its id.int
getSize()
Return the size of the map.int
Return the size of the map.Retrieve the guid for an element based on its id.void
Save the map to a filevoid
Save the map to a filevoid
Fix the guid for a particular name.
-
Constructor Details
-
OMRSArchiveGUIDMap
Constructor for the GUIDMap.- Parameters:
guidMapFileName
- name of the file name where the GUIDs are stashed.
-
-
Method Details
-
setGUID
Fix the guid for a particular name.- Parameters:
id
- identifier associated with the GUIDguid
- fixed guid value
-
getGUID
Retrieve the guid for an element based on its id. If no GUID exists, a new one is created and returned- Parameters:
id
- id of element- Returns:
- guid mapped to id
-
queryGUID
Retrieve the guid for an element based on its id.- Parameters:
id
- id of element- Returns:
- guid mapped to id
-
saveGUIDs
public void saveGUIDs()Save the map to a file -
saveUsedGUIDs
public void saveUsedGUIDs()Save the map to a file -
getSize
public int getSize()Return the size of the map.- Returns:
- int (zero if the map is null)
-
getUsedSize
public int getUsedSize()Return the size of the map.- Returns:
- int (zero if the map is null)
-