ArangoEdgeCollection.getEdge(String key, Class<T> type, DocumentReadOptions options) : T
Retrieves the edge document with the given key from the collection.
Arguments
-
key:
StringThe key of the edge
-
type:
Class<T>The type of the edge-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
-
ArangoEdgeCollection.insertEdge(T value, EdgeCreateOptions options) : EdgeEntity
Creates a new edge in the collection.
Arguments
-
value:
TA representation of a single edge (POJO,
VPackSliceorStringfor JSON) -
options:
EdgeCreateOptions-
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");
ArangoEdgeCollection collection = graph.edgeCollection("some-edge-collection");
BaseEdgeDocument document = new BaseEdgeDocument("some-from-key", "some-to-key");
document.addAttribute("some", "data");
collection.insertEdge(document, new EdgeCreateOptions());ArangoEdgeCollection.replaceEdge(String key, T value, EdgeReplaceOptions options) : EdgeUpdateEntity
Replaces the edge with key with the one in the body, provided there is such a edge and no precondition is violated.
Arguments
-
key:
StringThe key of the edge
-
value:
TA representation of a single edge (POJO,
VPackSliceorStringfor JSON) -
options:
EdgeReplaceOptions-
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");
ArangoEdgeCollection collection = graph.edgeCollection("some-edge-collection");
BaseEdgeDocument document = new BaseEdgeDocument("some-from-key", "some-to-key");
collection.replaceEdge("some-key", document, new EdgeReplaceOptions());ArangoEdgeCollection.updateEdge(String key, T value, EdgeUpdateOptions options) : EdgeUpdateEntity
Updates the edge with key with the one in the body, provided there is such a edge and no precondition is violated.
Arguments
-
key:
StringThe key of the edge
-
value:
TA representation of a single edge (POJO,
VPackSliceorStringfor JSON) -
options:
EdgeUpdateOptions-
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");
ArangoEdgeCollection collection = graph.edgeCollection("some-edge-collection");
BaseEdgeDocument document = new BaseEdgeDocument("some-from-key", "some-to-key");
collection.updateEdge("some-key", document, new EdgeUpdateOptions());ArangoEdgeCollection.deleteEdge(String key, EdgeDeleteOptions options) : void
Deletes the edge with the given key from the collection.
Arguments
-
key:
StringThe key of the edge
-
options :
EdgeDeleteOptions-
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");
ArangoEdgeCollection collection = graph.edgeCollection("some-edge-collection");
collection.deleteEdge("some-key", new EdgeDeleteOptions());