Class OrientDBUtility
java.lang.Object
org.gcube.informationsystem.resourceregistry.utils.OrientDBUtility
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetAsStringForException(com.orientechnologies.orient.core.record.ORecord oRecord) static StringgetAsStringForLogging(com.orientechnologies.orient.core.record.ORecord oRecord) static <El extends com.orientechnologies.orient.core.record.OElement>
ElgetElementByUUID(com.orientechnologies.orient.core.db.document.ODatabaseDocument oDatabaseDocument, String elementType, UUID uuid, Class<? extends El> clz) static <El extends com.orientechnologies.orient.core.record.OElement>
ElgetElementByUUIDAsAdmin(String elementType, UUID uuid, Class<? extends El> clz) static <P extends org.gcube.informationsystem.base.reference.properties.PropertyElement>
PgetPropertyDocument(Class<P> clz, com.orientechnologies.orient.core.record.OElement element, String property) static Stringstatic org.gcube.com.fasterxml.jackson.databind.JsonNodetoJsonNode(com.orientechnologies.orient.core.record.OElement element) static org.gcube.com.fasterxml.jackson.databind.JsonNodetoJsonNode(com.orientechnologies.orient.core.record.ORecord oRecord) static StringtoJsonString(com.orientechnologies.orient.core.record.ORecord oRecord) static StringtoJsonString(com.orientechnologies.orient.core.sql.executor.OResult oResult)
-
Field Details
-
ORIENTDB_CLASS_PROPERTY
- See Also:
-
SHOULD_NOT_OCCUR_ERROR_MESSAGE
- See Also:
-
-
Constructor Details
-
OrientDBUtility
public OrientDBUtility()
-
-
Method Details
-
toJsonNode
public static org.gcube.com.fasterxml.jackson.databind.JsonNode toJsonNode(com.orientechnologies.orient.core.record.OElement element) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
toJsonNode
public static org.gcube.com.fasterxml.jackson.databind.JsonNode toJsonNode(com.orientechnologies.orient.core.record.ORecord oRecord) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
replaceType
-
toJsonString
-
toJsonString
-
getAsStringForLogging
public static String getAsStringForLogging(com.orientechnologies.orient.core.record.ORecord oRecord) -
getAsStringForException
public static String getAsStringForException(com.orientechnologies.orient.core.record.ORecord oRecord) -
getElementByUUIDAsAdmin
public static <El extends com.orientechnologies.orient.core.record.OElement> El getElementByUUIDAsAdmin(String elementType, UUID uuid, Class<? extends El> clz) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getElementByUUID
public static <El extends com.orientechnologies.orient.core.record.OElement> El getElementByUUID(com.orientechnologies.orient.core.db.document.ODatabaseDocument oDatabaseDocument, String elementType, UUID uuid, Class<? extends El> clz) throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
getPropertyDocument
public static <P extends org.gcube.informationsystem.base.reference.properties.PropertyElement> P getPropertyDocument(Class<P> clz, com.orientechnologies.orient.core.record.OElement element, String property) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-