8000 Merge branch 'master' of https://github.com/arangodb/arangodb-java-dr… · anderick/arangodb-java-driver@f7a54f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit f7a54f9

Browse files
committed
2 parents dc026e0 + e860c05 commit f7a54f9

File tree

6 files changed

+202
-74
lines changed

6 files changed

+202
-74
lines changed

src/main/java/com/arangodb/ArangoDriver.java

Lines changed: 128 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3881,6 +3881,8 @@ public GraphEntity graphDeleteEdgeDefinition(String graphName, String edgeCollec
38813881
*
38823882
* @param graphName
38833883
* The name of the graph.
3884+
* @param collectionName
3885+
* The name of the collection, where the vertex will be created.
38843886
* @param vertex
38853887
* The vertex object to be stored
38863888
* @param waitForSync
@@ -4173,13 +4175,55 @@ public <T> DocumentEntity<T> graphUpdateVertex(
41734175
* given collection.
41744176
*
41754177
* @param graphName
4178+
* The name of the graph.
41764179
* @param edgeCollectionName
4180+
* The name of the collection where the edge will be created.
4181+
* @param fromHandle
4182+
* Document handle of vertex, where the edge comes from.
4183+
* @param toHandle
4184+
* Document handle of vertex, where the edge goes to.
4185+
* @param value
4186+
* Object to be stored with edge.
4187+
* @param waitForSync
4188+
* Wait for sync.
4189+
* @return <T> EdgeEntity<T>
4190+
* @throws ArangoException
4191+
*/
4192+
public <T> EdgeEntity<T> graphCreateEdge(
4193+
String graphName,
4194+
String edgeCollectionName,
4195+
String fromHandle,
4196+
String toHandle,
4197+
Object value,
4198+
Boolean waitForSync) throws ArangoException {
4199+
return graphDriver.createEdge(
4200+
getDefaultDatabase(),
4201+
graphName,
4202+
edgeCollectionName,
4203+
fromHandle,
4204+
toHandle,
4205+
value,
4206+
waitForSync);
4207+
}
4208+
4209+
/**
4210+
* Stores a new edge with the information contained within the body into the
4211+
* given collection.
4212+
*
4213+
* @param graphName
4214+
* The name of the graph.
4215+
* @param edgeCollectionName
4216+
* The name of the collection where the edge will be created.
41774217
* @param key
4218+
* The key of the edge to create (has to be unique).
41784219
* @param fromHandle
4220+
* Document handle of vertex, where the edge comes from.
41794221
* @param toHandle
4222+
* Document handle of vertex, where the edge goes to.
41804223
* @param value
4181-
* @param label
4224+
* Object to be stored with edge.
41824225
* @param waitForSync
4226+
* Wait for sync.
41834227
* @return <T> EdgeEntity<T>
41844228
* @throws ArangoException
41854229
*/
@@ -4207,10 +4251,15 @@ public <T> EdgeEntity<T> graphCreateEdge(
42074251
* given collection.
42084252
*
42094253
* @param graphName
4254+
* The name of the graph.
42104255
* @param edgeCollectionName
4256+
* The name of the collection where the edge will be created.
42114257
* @param key
4258+
* The key of the edge to create (has to be unique).
42124259
* @param fromHandle
4260+
* Document handle of vertex, where the edge comes from.
42134261
* @param toHandle
4262+
* Document handle of vertex, where the edge goes to.
42144263
* @return <T> EdgeEntity<T>
42154264
* @throws ArangoException
42164265
*/
@@ -4235,12 +4284,19 @@ public <T> EdgeEntity<T> graphCreateEdge(
42354284
* Loads an edge with the given key if it is contained within your graph.
42364285
*
42374286
* @param graphName
4287+
* The name of the graph.
42384288
* @param edgeCollectionName
4289+
* The name of the collection containing edge to get.
42394290
* @param key
4291+
* The key of the edge to get.
42404292
* @param clazz
4241-
* @param rev
4242-
* @param ifNoneMatchRevision
4293+
* The class of the edge to get.
42434294
* @param ifMatchRevision
4295+
* If not null the revision of the vertex in the database has to be
4296+
* equal to load the edge.
4297+
* @param ifNoneMatchRevision
4298+
* If not null the revision of the vertex in the database has to be
4299+
* different to load the edge.
42444300
* @return <T> EdgeEntity<T>
42454301
* @throws ArangoException
42464302
*/
@@ -4249,42 +4305,47 @@ public <T> EdgeEntity<T> graphGetEdge(
42494305
String edgeCollectionName,
42504306
String key,
42514307
Class<?> clazz,
4252-
Long rev,
4253-
Long ifNoneMatchRevision,
4254-
Long ifMatchRevision) throws ArangoException {
4308+
Long ifMatchRevision,
4309+
Long ifNoneMatchRevision) throws ArangoException {
42554310
return graphDriver.getEdge(
42564311
getDefaultDatabase(),
42574312
graphName,
42584313
edgeCollectionName,
42594314
key,
42604315
clazz,
4261-
rev,
4262-
ifNoneMatchRevision,
4263-
ifMatchRevision);
4316+
ifMatchRevision,
4317+
ifNoneMatchRevision);
42644318
}
42654319

42664320
/**
42674321
* Loads an edge with the given key if it is contained within your graph.
42684322
*
42694323
* @param graphName
4324+
* The name of the graph.
42704325
* @param edgeCollectionName
4326+
* The name of the collection containing edge to get.
42714327
* @param key
4328+
* The key of the edge to get.
42724329
* @param clazz
4330+
* The class of the edge to get.
42734331
* @return <T> EdgeEntity<T>
42744332
* @throws ArangoException
42754333
*/
42764334
public <T> EdgeEntity<T> graphGetEdge(String graphName, String edgeCollectionName, String key, Class<?> clazz)
42774335
throws ArangoException {
4278-
return graphDriver.getEdge(getDefaultDatabase(), graphName, edgeCollectionName, key, clazz, null, null, null);
4336+
return graphDriver.getEdge(getDefaultDatabase(), graphName, edgeCollectionName, key, clazz, null, null);
42794337
}
42804338

42814339
/**
42824340
* Deletes an edge with the given id, if it is contained within the graph.
42834341
*
42844342
* @param graphName
4343+
* The name of the graph.
42854344
* @param edgeCollectionName
4345+
* The name of the collection containing edge to delete.
42864346
* @param key
4287-
* @return
4347+
* The key of the edge to delete.
4348+
* @return DeletedEntity
42884349
* @throws ArangoException
42894350
*/
42904351
public DeletedEntity graphDeleteEdge(String graphName, String edgeCollectionName, String key) throws ArangoException {
@@ -4295,9 +4356,13 @@ public DeletedEntity graphDeleteEdge(String graphName, String edgeCollectionName
42954356
* Deletes an edge with the given id, if it is contained within the graph.
42964357
*
42974358
* @param graphName
4359+
* The name of the graph.
42984360
* @param edgeCollectionName
4361+
* The name of the collection containing edge to delete.
42994362
* @param key
4363+
* The key of the edge to delete.
43004364
* @param waitForSync
4365+
* Wait for sync.
43014366
* @return
43024367
* @throws ArangoException
43034368
*/
@@ -4310,39 +4375,51 @@ public DeletedEntity graphDeleteEdge(String graphName, String edgeCollectionName
43104375
* Deletes an edge with the given id, if it is contained within the graph.
43114376
*
43124377
* @param graphName
4378+
* The name of the graph.
43134379
* @param edgeCollectionName
4380+
* The name of the collection containing edge to delete.
43144381
* @param key
4382+
* The key of the edge to delete.
43154383
* @param waitForSync
4316-
* @param rev
4384+
* Wait for sync.
43174385
* @param ifMatchRevision
4318-
* @return
4386+
* If not null the revision of the vertex in the database has to be
4387+
* equal to delete the edge.
4388+
* @param ifNoneMatchRevision
4389+
* If not null the revision of the vertex in the database has to be
4390+
* different to delete the edge.
4391+
* @return DeletedEntity
43194392
* @throws ArangoException
43204393
*/
43214394
public DeletedEntity graphDeleteEdge(
43224395
String graphName,
43234396
String edgeCollectionName,
43244397
String key,
43254398
Boolean waitForSync,
4326-
Long rev,
4327-
Long ifMatchRevision) throws ArangoException {
4399+
Long ifMatchRevision,
4400+
Long ifNoneMatchRevision) throws ArangoException {
43284401
return graphDriver.deleteEdge(
43294402
getDefaultDatabase(),
43304403
graphName,
43314404
edgeCollectionName,
43324405
key,
43334406
waitForSync,
4334-
rev,
4335-
ifMatchRevision);
4407+
ifMatchRevision,
4408+
ifNoneMatchRevision);
43364409
}
43374410

43384411
/**
43394412
* Replaces an edge with the given key by the content in the body. This will
43404413
* only run successfully if the edge is contained within the graph.
43414414
*
43424415
* @param graphName
4416+
* The name of the graph.
43434417
* @param edgeCollectionName
4418+
* The name of the collection containing edge to replace.
43444419
* @param key
4420+
* The key of the edge to replace.
43454421
* @param value
4422+
* The object to replace the existing edge.
43464423
* @return
43474424
* @throws ArangoException
43484425
*/
@@ -4356,13 +4433,22 @@ public <T> EdgeEntity<T> graphReplaceEdge(String graphName, String edgeCollectio
43564433
* only run successfully if the edge is contained within the graph.
43574434
*
43584435
* @param graphName
4436+
* The name of the graph.
43594437
* @param edgeCollectionName
4438+
* The name of the collection containing edge to replace.
43604439
* @param key
4440+
* The key of the edge to replace.
43614441
* @param value
4442+
* The object to replace the existing edge.
43624443
* @param waitForSync
4363-
* @param rev
4444+
* Wait for sync.
43644445
* @param ifMatchRevision
4365-
* @return
4446+
* If not null the revision of the vertex in the database has to be
4447+
* equal to replace the edge.
4448+
* @param ifNoneMatchRevision
4449+
* If not null the revision of the vertex in the database has to be
4450+
* different to replace the edge.
4451+
* @return EdgeEntity<T>
43664452
* @throws ArangoException
43674453
*/
43684454
public <T> EdgeEntity<T> graphReplaceEdge(
@@ -4371,29 +4457,33 @@ public <T> EdgeEntity<T> graphReplaceEdge(
43714457
String key,
43724458
Object value,
43734459
Boolean waitForSync,
4374-
Long rev,
4375-
Long ifMatchRevision) throws ArangoException {
4460+
Long ifMatchRevision,
4461+
Long ifNoneMatchRevision) throws ArangoException {
43764462
return graphDriver.replaceEdge(
43774463
getDefaultDatabase(),
43784464
graphName,
43794465
edgeCollectionName,
43804466
key,
43814467
value,
43824468
waitForSync,
4383-
rev,
4384-
ifMatchRevision);
4469+
ifMatchRevision,
4470+
ifNoneMatchRevision);
43854471
}
43864472

43874473
/**
43884474
* Updates an edge with the given key by adding the content in the body. This
43894475
* will only run successfully if the edge is contained within the graph.
43904476
*
43914477
* @param graphName
4478+
* The name of the graph.
43924479
* @param edgeCollectionName
4480+
* The name of the collection containing edge to update.
43934481
* @param key
4482+
* The key of the edge to update.
43944483
* @param value
4484+
* The object to update the existing edge.
43954485
* @param keepNull
4396-
* @return
4486+
* @return EdgeEntity<T>
43974487
* @throws ArangoException
43984488
*/
43994489
public <T> EdgeEntity<T> graphUpdateEdge(
@@ -4419,13 +4509,22 @@ public <T> EdgeEntity<T> graphUpdateEdge(
44194509
* will only run successfully if the edge is contained within the graph.
44204510
*
44214511
* @param graphName
4512+
* The name of the graph.
44224513
* @param edgeCollectionName
4514+
* The name of the collection containing edge to update.
44234515
* @param key
4516+
* The key of the edge to update.
44244517
* @param value
4518+
* The object to update the existing edge.
44254519
* @param waitForSync
4520+
* Wait for sync.
44264521
* @param keepNull
4427-
* @param rev
44284522
* @param ifMatchRevision
4523+
* If not null the revision of the vertex in the database has to be
4524+
* equal to update the edge.
4525+
* @param ifNoneMatchRevision
4526+
* If not null the revision of the vertex in the database has to be
4527+
* different to update the edge.
44294528
* @return
44304529
* @throws ArangoException
44314530
*/
@@ -4436,8 +4535,8 @@ public <T> EdgeEntity<T> graphUpdateEdge(
44364535
Object value,
44374536
Boolean waitForSync,
44384537
Boolean keepNull,
4439-
Long rev,
4440-
Long ifMatchRevision) throws ArangoException {
4538+
Long ifMatchRevision,
4539+
Long ifNoneMatchRevision) throws ArangoException {
44414540
return graphDriver.updateEdge(
44424541
getDefaultDatabase(),
44434542
graphName,
@@ -4446,8 +4545,8 @@ public <T> EdgeEntity<T> graphUpdateEdge(
44464545
value,
44474546
waitForSync,
44484547
keepNull,
4449-
rev,
4450-
ifMatchRevision);
4548+
ifMatchRevision,
4549+
ifNoneMatchRevision);
44514550
}
44524551

44534552
// Some methods not using the graph api

0 commit comments

Comments
 (0)
0