X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fcrud%2Fdao%2FGraphDao.java;h=67c1ff3c65f8582499011bd780e111b6cce08059;hb=be2eab9395a787ca4b13447f9d2c382d12f5dcd5;hp=20b568c0eec279f0fe159ce754f484ee4e9eb72a;hpb=e9c94429a8ada3e55854515060df817945b73d87;p=aai%2Fgizmo.git diff --git a/src/main/java/org/openecomp/crud/dao/GraphDao.java b/src/main/java/org/openecomp/crud/dao/GraphDao.java index 20b568c..67c1ff3 100644 --- a/src/main/java/org/openecomp/crud/dao/GraphDao.java +++ b/src/main/java/org/openecomp/crud/dao/GraphDao.java @@ -23,15 +23,18 @@ */ package org.openecomp.crud.dao; +import java.util.List; +import java.util.Map; + import org.openecomp.crud.entity.Edge; + import org.openecomp.crud.entity.Vertex; import org.openecomp.crud.exception.CrudException; -import java.util.List; -import java.util.Map; - public interface GraphDao { + public Vertex getVertex(String id) throws CrudException; + public Vertex getVertex(String id, String type) throws CrudException; /** @@ -135,4 +138,21 @@ public interface GraphDao { * @throws CrudException */ public void deleteEdge(String id, String type) throws CrudException; + + + public String openTransaction(); + public void commitTransaction(String id) throws CrudException; + public void rollbackTransaction(String id) throws CrudException; + public boolean transactionExists(String id) throws CrudException; + + public Vertex addVertex(String type, Map properties, String txId) throws CrudException; + public Edge addEdge(String type, Vertex source, Vertex target, Map properties, String txId) + throws CrudException; + public Vertex updateVertex(String id, String type, Map properties, String txId) + throws CrudException; + + public Edge updateEdge(Edge edge, String txId) throws CrudException; + public void deleteVertex(String id, String type, String txId) throws CrudException; + public void deleteEdge(String id, String type, String txId) throws CrudException; + public Edge getEdge(String id, String type, String txId) throws CrudException; }