ArangoVertexCollection.getVertex(String key, Class<T> type, DocumentReadOptions options) : T
Retrieves the vertex document with the given key from the collection.
Arguments
-
key:
StringThe key of the vertex
-
type:
Class<T>The type of the vertex-document (POJO class,
VPackSliceorStringfor JSON) -
options:
DocumentReadOptions-
ifNoneMatch:
StringDocument revision must not contain If-None-Match
-
ifMatch:
StringDocument revision must contain If-Match
-
catchException:
BooleanWhether or not catch possible thrown exceptions
-
ArangoVertexCollection.insertVertex(T value, VertexCreateOptions options) : VertexEntity
Creates a new vertex in the collection.
Arguments
-
value:
TA representation of a single vertex (POJO,
VPackSliceorStringfor JSON) -
options:
VertexCreateOptions-
waitForSync:
BooleanWait until document has been synced to disk.
-
Examples
ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
ArangoGraph graph = db.graph("some-graph");
ArangoVertexCollection collection = graph.vertexCollection("some-vertex-collection");
BaseDocument document = new BaseDocument();
document.addAttribute("some", "data");
collection.insertVertex(document, new VertexCreateOptions());ArangoVertexCollection.replaceVertex(String key, T value, VertexReplaceOptions options) : VertexUpdateEntity
Replaces the vertex with key with the one in the body, provided there is such a vertex and no precondition is violated.
Arguments
-
key:
StringThe key of the vertex
-
value:
TA representation of a single vertex (POJO,
VPackSliceorStringfor JSON) -
options:
VertexReplaceOptions-
waitForSync:
BooleanWait until document has been synced to disk.
-
ifMatch:
StringReplace a document based on target revision
-
Examples
ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
ArangoGraph graph = db.graph("some-graph");
ArangoVertexCollection collection = graph.vertexCollection("some-vertex-collection");
BaseDocument document = new BaseDocument();
collection.replaceVertex("some-key", document, new VertexReplaceOptions());ArangoVertexCollection.updateVertex(String key, T value, VertexUpdateOptions options) : VertexUpdateEntity
Updates the vertex with key with the one in the body, provided there is such a vertex and no precondition is violated.
Arguments
-
key:
StringThe key of the vertex
-
value:
TA representation of a single vertex (POJO,
VPackSliceorStringfor JSON) -
options:
VertexUpdateOptions-
waitForSync:
BooleanWait until document has been synced to disk.
-
ifMatch:
StringUpdate a document based on target revision
-
keepNull:
BooleanIf the intention is to delete existing attributes with the patch command, the URL query parameter keepNull can be used with a value of false. This will modify the behavior of the patch command to remove any attributes from the existing document that are contained in the patch document with an attribute value of null.
-
Examples
ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
ArangoGraph graph = db.graph("some-graph");
ArangoVertexCollection collection = graph.vertexCollection("some-vertex-collection");
BaseDocument document = new BaseDocument();
collection.updateVertex("some-key", document, new VertexUpdateOptions());ArangoVertexCollection.deleteVertex(String key, VertexDeleteOptions options) : void
Deletes the vertex with the given key from the collection.
Arguments
-
key:
StringThe key of the vertex
-
options :
VertexDeleteOptions-
waitForSync:
BooleanWait until document has been synced to disk.
-
ifMatch:
StringRemove a document based on target revision
-
Examples
ArangoDB arango = new ArangoDB.Builder().build();
ArangoDatabase db = arango.db("myDB");
ArangoGraph graph = db.graph("some-graph");
ArangoVertexCollection collection = graph.vertexCollection("some-vertex-collection");
collection.deleteVertex("some-key", new VertexDeleteOptions());