Hi There,
I'm implementing utility method which will build the query based on the input,
for e.g. the following queries were constructed
query 1:
String query = .as('x').out().out().out().out().has("objectType","com.networks.osa.dao.domain.Cloud").has("name","blr-cloud").back('x').out().out().out().out().has("objectType","com.networks.osa.dao.domain.VirtualCPUCount").property("count")
query 2:
String query = .out().out().out().out().has("objectType","com.networks.osa.dao.domain.VirtualCPUCount").property("count")
Based on the condition specified below, I need to append one of the above mentioned query with the pipe.
if(id.equals("ServiceOrder"))
{
pipe = new GremlinPipeline<Vertex, Vertex>(graph.getVertices());
}
else
{
Vertex v = graph.getVertex(Long.parseLong(id));
pipe = new GremlinPipeline<Vertex, Vertex>(v);
}
finally, the complete query should look like, "pipe + query" and access any other method like .toList() etc. Is there a way to construct the query separately and use them like by passing the query as input to any existing method or by appending the query to pipe?
List<Object> counts = pipe + query.toList();
Appreciate your help in this regard.
Thanks,
Senthil Jayakumar