Class OrientDBUtility
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.utils.OrientDBUtility
-
public class OrientDBUtility extends Object
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description static StringORIENTDB_CLASS_PROPERTYstatic StringSHOULD_NOT_OCCUR_ERROR_MESSAGE
-
Constructor Summary
Constructors Constructor Description OrientDBUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 StringreplaceType(String s)static 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 Detail
-
ORIENTDB_CLASS_PROPERTY
public static final String ORIENTDB_CLASS_PROPERTY
- See Also:
- Constant Field Values
-
SHOULD_NOT_OCCUR_ERROR_MESSAGE
public static final String SHOULD_NOT_OCCUR_ERROR_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
toJsonString
public static String toJsonString(com.orientechnologies.orient.core.sql.executor.OResult oResult)
-
toJsonString
public static String toJsonString(com.orientechnologies.orient.core.record.ORecord oRecord)
-
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
-
-