Created
November 1, 2011 21:27
-
-
Save okram/1331966 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Iterator<Vertex> itty = graph.getIndex(Index.VERTICES, Vertex.class).get("sav_id", 12345); | |
Vertex savNode; | |
if(itty.hasNext()) { | |
savNode = itty.next(); | |
} else { | |
savNode = graph.addVertex(new HashMap(..)) // the map has the MUST_HAVE requirements | |
} | |
// do something with savNode | |
// to delete | |
graph.removeVertex(savNode); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment