Class UUIDUtility
java.lang.Object
org.gcube.informationsystem.resourceregistry.persistence.orientdb.utils.UUIDUtility
Utility class for handling UUID operations specific to Resource Registry persistence.
- Author:
- Luca Frosini (ISTI - CNR)
-
Method Summary
Modifier and TypeMethodDescriptionstatic UUIDgetUUID(com.orientechnologies.orient.core.record.OElement element) Retrieves and parses the unique identifier (UUID) from the given database element.static UUIDgetUUID(org.gcube.com.fasterxml.jackson.databind.JsonNode jsonNode) Retrieves and parses the unique identifier from a JSON node.
-
Method Details
-
getUUID
Retrieves and parses the unique identifier from a JSON node.- Parameters:
jsonNode- the JSON node from which to read the identifier- Returns:
- the parsed identifier, or
nullwhen no textual identifier is present
-
getUUID
public static UUID getUUID(com.orientechnologies.orient.core.record.OElement element) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException Retrieves and parses the unique identifier (UUID) from the given database element.- Parameters:
element- the database element to extract the UUID from- Returns:
- the parsed
UUIDof the element - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException- if the UUID is missing, invalid, or cannot be parsed
-