X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fcrud%2Fdao%2FGraphDao.java;h=7cb3d4ca679e6ef6a42897757c61bf8f05868bef;hb=3bc6a702f2d3d8710c7aaa94cdc8c0ccf3deb759;hp=fe638ceb00ed7996b22911b1e9c2dfd456c01ee7;hpb=b348af8ed2c4192f88169b37bf53fa25b8a7a681;p=aai%2Fgizmo.git diff --git a/src/main/java/org/onap/crud/dao/GraphDao.java b/src/main/java/org/onap/crud/dao/GraphDao.java index fe638ce..7cb3d4c 100644 --- a/src/main/java/org/onap/crud/dao/GraphDao.java +++ b/src/main/java/org/onap/crud/dao/GraphDao.java @@ -20,9 +20,9 @@ */ package org.onap.crud.dao; -import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import org.onap.aai.restclient.client.OperationResult; import org.onap.crud.entity.Edge; import org.onap.crud.entity.Vertex; @@ -42,10 +42,12 @@ public interface GraphDao { * - The unique identifier of the vertex to retrieve the edges for. * @param queryParams * - query parameters to be passed + * @param txid + * - a DB transaction ID to use (if null, no transactionId is used) * @return - A collection of edges. * @throws CrudException */ - public List getVertexEdges(String id, Map queryParams) throws CrudException; + public List getVertexEdges(String id, Map queryParams, String txId) throws CrudException; /** * Retrieve a collection of {@link Vertex} objects which match the supplied @@ -73,7 +75,7 @@ public interface GraphDao { * @return - The {@link OperationResult} OperationResult * @throws CrudException */ - public OperationResult getVertices(String type, Map filter, HashSet properties, String version) throws CrudException; + public OperationResult getVertices(String type, Map filter, Set properties, String version) throws CrudException; /** * Retrieve an {@link Edge} from the graph database by specifying its unique @@ -89,7 +91,7 @@ public interface GraphDao { * @throws CrudException */ public OperationResult getEdge(String id, String type, Map queryParams) throws CrudException; - + /** * Retrieve a collection of {@link Edge} objects with a given type and which * match a set of supplied filter parameters. @@ -172,7 +174,7 @@ public interface GraphDao { * - The unique identifier of the edge to be deleted. * @throws CrudException */ - public void deleteEdge(String id, String type) throws CrudException; + public void deleteEdge(String id) throws CrudException; public String openTransaction(); @@ -193,7 +195,9 @@ public interface GraphDao { public void deleteVertex(String id, String type, String txId) throws CrudException; - public void deleteEdge(String id, String type, String txId) throws CrudException; + public void deleteEdge(String id, String txId) throws CrudException; - public Edge getEdge(String id, String type, String txId) throws CrudException; + public Edge getEdge(String id, String txId) throws CrudException; + + public Edge getEdge(String id) throws CrudException; }