summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/crud/service/CrudGraphDataService.java
diff options
context:
space:
mode:
authorGurjeet Bedi <gurjeetb@amdocs.com>2018-02-14 13:56:58 -0500
committerGurjeet Bedi <gurjeetb@amdocs.com>2018-02-14 13:58:38 -0500
commit58c89ea1f45ffd4a9f812ae1c18e93b636737f55 (patch)
tree41d6a47b1c3ae00eea8b37b56acd62f8422433c2 /src/main/java/org/onap/crud/service/CrudGraphDataService.java
parent5db1e77ef9e2c43fd723dc629346baf3660fdf1b (diff)
For supporting t_k query
Passing queryparameters from GET Issue-ID: AAI-482 Change-Id: I7db51c6549fe5f7e4d61ad96121e7da3a57ff325 Signed-off-by: Gurjeet Bedi <gurjeetb@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap/crud/service/CrudGraphDataService.java')
-rw-r--r--src/main/java/org/onap/crud/service/CrudGraphDataService.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/org/onap/crud/service/CrudGraphDataService.java b/src/main/java/org/onap/crud/service/CrudGraphDataService.java
index 3eeac3f..4c8c6a8 100644
--- a/src/main/java/org/onap/crud/service/CrudGraphDataService.java
+++ b/src/main/java/org/onap/crud/service/CrudGraphDataService.java
@@ -24,6 +24,8 @@
package org.onap.crud.service;
+import java.util.HashMap;
+
import org.onap.crud.dao.GraphDao;
import org.onap.crud.entity.Edge;
@@ -84,7 +86,7 @@ public class CrudGraphDataService extends AbstractGraphDataService {
}
public String patchVertex(String version, String id, String type, VertexPayload payload) throws CrudException {
- Vertex existingVertex = dao.getVertex(id, OxmModelValidator.resolveCollectionType(version, type), version);
+ Vertex existingVertex = dao.getVertex(id, OxmModelValidator.resolveCollectionType(version, type), version, new HashMap<String, String>());
Vertex vertex = OxmModelValidator.validateIncomingPatchPayload(id, version, type, payload.getProperties(),
existingVertex);
return updateVertex(version, vertex);
@@ -103,7 +105,7 @@ public class CrudGraphDataService extends AbstractGraphDataService {
}
public String updateEdge(String version, String id, String type, EdgePayload payload) throws CrudException {
- Edge edge = dao.getEdge(id, type);
+ Edge edge = dao.getEdge(id, type, new HashMap<String, String>());
Edge validatedEdge = RelationshipSchemaValidator.validateIncomingUpdatePayload(edge, version, payload);
return updateEdge(version, validatedEdge);
}
@@ -115,7 +117,7 @@ public class CrudGraphDataService extends AbstractGraphDataService {
}
public String patchEdge(String version, String id, String type, EdgePayload payload) throws CrudException {
- Edge edge = dao.getEdge(id, type);
+ Edge edge = dao.getEdge(id, type, new HashMap<String, String>());
Edge patchedEdge = RelationshipSchemaValidator.validateIncomingPatchPayload(edge, version, payload);
return updateEdge(version, patchedEdge);