From 74879a7b7a5607c89aef5fa9d64aca5ddea8e3b7 Mon Sep 17 00:00:00 2001 From: Gurjeet Bedi Date: Wed, 31 Jan 2018 15:05:30 -0500 Subject: Config to be able to route GET through datarouter Option to route GET through data router Issue-ID: AAI-482 Change-Id: I6b9a3621d5e3a5ec83d69a948917865941ede833 Signed-off-by: Gurjeet Bedi --- .../org/onap/crud/service/CrudGraphDataService.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/main/java/org/onap/crud/service/CrudGraphDataService.java') diff --git a/src/main/java/org/onap/crud/service/CrudGraphDataService.java b/src/main/java/org/onap/crud/service/CrudGraphDataService.java index 61550b2..3eeac3f 100644 --- a/src/main/java/org/onap/crud/service/CrudGraphDataService.java +++ b/src/main/java/org/onap/crud/service/CrudGraphDataService.java @@ -35,9 +35,18 @@ import org.onap.schema.RelationshipSchemaValidator; public class CrudGraphDataService extends AbstractGraphDataService { - + + public CrudGraphDataService(GraphDao dao) throws CrudException { - super(dao); + super(); + this.dao = dao; + this.daoForGet = dao; + } + + public CrudGraphDataService(GraphDao dao, GraphDao daoForGet) throws CrudException { + super(); + this.dao = dao; + this.daoForGet = daoForGet; } public String addVertex(String version, String type, VertexPayload payload) throws CrudException { @@ -112,10 +121,6 @@ public class CrudGraphDataService extends AbstractGraphDataService { } - public Vertex getVertex(String id, String version) throws CrudException { - return dao.getVertex(id, version); - } - @Override protected Vertex addBulkVertex(Vertex vertex, String version, String dbTransId) throws CrudException { return dao.addVertex(vertex.getType(), vertex.getProperties(), version, dbTransId); -- cgit 1.2.3-korg