Skip to content

Commit 0b26313

Browse files
committed
Merge branch 'master' into 2.2
2 parents 46474af + b6fd3ef commit 0b26313

File tree

68 files changed

+3692
-600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+3692
-600
lines changed

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

Lines changed: 2610 additions & 301 deletions
Large diffs are not rendered by default.

src/main/java/com/arangodb/InternalGraphDriver.java

Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,8 @@ <T> DocumentEntity<T> createVertex(
226226
* @param collectionName
227227
* @param key
228228
* @param clazz
229-
* @param rev
230-
* @param ifNoneMatchRevision
231229
* @param ifMatchRevision
230+
* @param ifNoneMatchRevision
232231
* @return
233232
* @throws ArangoException
234233
*/
@@ -238,9 +237,8 @@ <T> DocumentEntity<T> getVertex(
238237
String collectionName,
239238
String key,
240239
Class<?> clazz,
241-
Long rev,
242-
Long ifNoneMatchRevision,
243-
Long ifMatchRevision) throws ArangoException;
240+
Long ifMatchRevision,
241+
Long ifNoneMatchRevision) throws ArangoException;
244242

245243
/**
246244
* Replaces a vertex with the given key by the content in the body. This will
@@ -252,8 +250,8 @@ <T> DocumentEntity<T> getVertex(
252250
* @param key
253251
* @param vertex
254252
* @param waitForSync
255-
* @param rev
256253
* @param ifMatchRevision
254+
* @param ifNoneMatchRevision
257255
* @return <T> DocumentEntity<T>
258256
* @throws ArangoException
259257
*/
@@ -264,8 +262,8 @@ <T> DocumentEntity<T> replaceVertex(
264262
String key,
265263
Object vertex,
266264
Boolean waitForSync,
267-
Long rev,
268-
Long ifMatchRevision) throws ArangoException;
265+
Long ifMatchRevision,
266+
Long ifNoneMatchRevision) throws ArangoException;
269267

270268
/**
271269
* Updates a vertex with the given key by adding the content in the body. This
@@ -278,9 +276,9 @@ <T> DocumentEntity<T> replaceVertex(
278276
* @param vertex
279277
* @param keepNull
280278
* @param waitForSync
281-
* @param rev
282279
* @param ifMatchRevision
283-
* @return <T> DocumentEntity<T>
280+
* @param ifNoneMatchRevision
281+
* @return
284282
* @throws ArangoException
285283
*/
286284
<T> DocumentEntity<T> updateVertex(
@@ -291,8 +289,8 @@ <T> DocumentEntity<T> updateVertex(
291289
Object vertex,
292290
Boolean keepNull,
293291
Boolean waitForSync,
294-
Long rev,
295-
Long ifMatchRevision) throws ArangoException;
292+
Long ifMatchRevision,
293+
Long ifNoneMatchRevision) throws ArangoException;
296294

297295
/**
298296
* Deletes a vertex with the given key, if it is contained within the graph.
@@ -303,9 +301,9 @@ <T> DocumentEntity<T> updateVertex(
303301
* @param collectionName
304302
* @param key
305303
* @param waitForSync
306-
* @param rev
307304
* @param ifMatchRevision
308-
* @return DeletedEntity
305+
* @param ifNoneMatchRevision
306+
* @return
309307
* @throws ArangoException
310308
*/
311309
DeletedEntity deleteVertex(
@@ -314,8 +312,30 @@ DeletedEntity deleteVertex(
314312
String collectionName,
315313
String key,
316314
Boolean waitForSync,
317-
Long rev,
318-
Long ifMatchRevision) throws ArangoException;
315+
Long ifMatchRevision,
316+
Long ifNoneMatchRevision) throws ArangoException;
317+
318+
/**
319+
*
320+
*
321+
* @param database
322+
* @param graphName
323+
* @param edgeCollectionName
324+
* @param fromHandle
325+
* @param toHandle
326+
* @param value
327+
* @param waitForSync
328+
* @return <T> EdgeEntity<T>
329+
* @throws ArangoException
330+
*/
331+
<T> EdgeEntity<T> createEdge(
332+
String database,
333+
String graphName,
334+
String edgeCollectionName,
335+
String fromHandle,
336+
String toHandle,
337+
Object value,
338+
Boolean waitForSync) throws ArangoException;
319339

320340
/**
321341
*
@@ -361,9 +381,8 @@ <T> EdgeEntity<T> getEdge(
361381
String edgeCollectionName,
362382
String key,
363383
Class<?> clazz,
364-
Long rev,
365-
Long ifNoneMatchRevision,
366-
Long ifMatchRevision) throws ArangoException;
384+
Long ifMatchRevision,
385+
Long ifNoneMatchRevision) throws ArangoException;
367386

368387
/**
369388
* Deletes an edge with the given id, if it is contained within the graph.
@@ -397,8 +416,8 @@ DeletedEntity deleteEdge(
397416
* @param key
398417
* @param value
399418
* @param waitForSync
400-
* @param rev
401419
* @param ifMatchRevision
420+
* @param ifNoneMatchRevision
402421
* @return <T> EdgeEntity<T>
403422
* @throws ArangoException
404423
*/
@@ -409,8 +428,8 @@ <T> EdgeEntity<T> replaceEdge(
409428
String key,
410429
Object value,
411430
Boolean waitForSync,
412-
Long rev,
413-
Long ifMatchRevision) throws ArangoException;
431+
Long ifMatchRevision,
432+
Long ifNoneMatchRevision) throws ArangoException;
414433

415434
/**
416435
* Updates an edge with the given key by adding the content in the body. This
@@ -423,8 +442,8 @@ <T> EdgeEntity<T> replaceEdge(
423442
* @param value
424443
* @param waitForSync
425444
* @param keepNull
426-
* @param rev
427445
* @param ifMatchRevision
446+
* @param ifNoneMatchRevision
428447
* @return <T> EdgeEntity<T>
429448
* @throws ArangoException
430449
*/
@@ -436,8 +455,8 @@ <T> EdgeEntity<T> updateEdge(
436455
Object value,
437456
Boolean waitForSync,
438457
Boolean keepNull,
439-
Long rev,
440-
Long ifMatchRevision) throws ArangoException;
458+
Long ifMatchRevision,
459+
Long ifNoneMatchRevision) throws ArangoException;
441460

442461
<T> CursorEntity<EdgeEntity<T>> getEdges(
443462
String database,

src/main/java/com/arangodb/InternalIndexDriver.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public interface InternalIndexDriver extends BaseDriverInterface {
1313

1414
IndexEntity createCappedIndex(String database, String collectionName, int size) throws ArangoException;
1515

16+
IndexEntity createCappedByDocumentSizeIndex(String database, String collectionName, int byteSize) throws ArangoException;
17+
1618
IndexEntity createFulltextIndex(String database, String collectionName, Integer minLength, String... fields) throws ArangoException;
1719

1820
IndexEntity deleteIndex(String database, String indexHandle) throws ArangoException;

src/main/java/com/arangodb/InternalTransactionDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public interface InternalTransactionDriver extends BaseDriverInterface {
1616
TransactionEntity createTransaction (String action);
1717

1818

19-
<T> T executeTransaction(String database, TransactionEntity transactionEntity, Class clazz) throws ArangoException;
19+
TransactionResultEntity executeTransaction(String database, TransactionEntity transactionEntity) throws ArangoException;
2020

2121

2222
}

src/main/java/com/arangodb/entity/AdminLogEntity.java

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,25 @@
2121
import java.util.List;
2222

2323
/**
24+
*
25+
* A entity defining admin logs
26+
*
2427
* @author tamtam180 - kirscheless at gmail.com
2528
*
2629
*/
2730
public class AdminLogEntity extends BaseEntity {
2831

32+
/**
33+
* The total amount of log entries
34+
*/
2935
int totalAmount;
36+
37+
/**
38+
* A list of log entries
39+
* @see com.arangodb.entity.AdminLogEntity.LogEntry
40+
*/
3041
List<LogEntry> logs;
31-
42+
3243
public int getTotalAmount() {
3344
return totalAmount;
3445
}
@@ -43,10 +54,27 @@ public void setLogs(List<LogEntry> logs) {
4354
}
4455

4556
public static class LogEntry implements Serializable {
57+
58+
/**
59+
* The log id
60+
*/
4661
int lid;
62+
63+
/**
64+
* The integer representation of a log level
65+
*/
4766
int level;
67+
68+
/**
69+
* The timestamp of the log entry
70+
*/
4871
Date timestamp;
72+
73+
/**
74+
* The log message
75+
*/
4976
String text;
77+
5078
public int getLid() {
5179
return lid;
5280
}

src/main/java/com/arangodb/entity/AqlFunctionsEntity.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@
2020
import java.util.Map;
2121

2222
/**
23+
* An entity wrapping a list of AQL functions
24+
*
2325
* @author Florian Bartels - [email protected]
2426
*
2527
*/
2628
public class AqlFunctionsEntity extends BaseEntity {
27-
29+
30+
/**
31+
* A map containing the function name as key and the function as value
32+
*/
2833
Map<String, String> aqlFunctions;
2934

3035
public AqlFunctionsEntity () {

src/main/java/com/arangodb/entity/ArangoUnixTime.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,26 @@
1717
package com.arangodb.entity;
1818

1919
/**
20+
* An entity representing the arango server time
21+
*
2022
* @author tamtam180 - kirscheless at gmail.com
2123
*
2224
*/
2325
public class ArangoUnixTime extends BaseEntity {
2426

27+
/**
28+
* the unix timestamp as double
29+
*/
2530
double time;
31+
32+
/**
33+
* the unix timestamp as integer
34+
*/
2635
int second;
36+
37+
/**
38+
* the microseconds part of the unix timestamp
39+
*/
2740
int microsecond;
2841

2942
public long getTimeMillis() {

src/main/java/com/arangodb/entity/ArangoVersion.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,22 @@
1919

2020

2121
/**
22+
*
23+
* An entity representing the ArangoDB version
24+
*
2225
* @author tamtam180 - kirscheless at gmail.com
2326
*
2427
*/
2528
public class ArangoVersion extends BaseEntity {
26-
29+
30+
/**
31+
* Name of the server
32+
*/
2733
String server;
34+
35+
/**
36+
* The current version
37+
*/
2838
String version;
2939

3040
public String getServer() {

src/main/java/com/arangodb/entity/BaseEntity.java

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,81 @@
2525
*
2626
*/
2727
public abstract class BaseEntity implements Serializable {
28-
28+
29+
/**
30+
* If true an error occurred while creating this entity
31+
*/
2932
@Exclude(deserialize=false)
3033
boolean error;
34+
35+
/**
36+
* The http response code of the response
37+
*/
3138
@Exclude(deserialize=false)
3239
int code;
40+
41+
/**
42+
* The Arango error number of the error
43+
*/
3344
@Exclude(deserialize=false)
3445
int errorNumber;
46+
47+
/**
48+
* If an error occurred this is the error message
49+
*/
3550
@Exclude(deserialize=false)
3651
String errorMessage;
52+
53+
/**
54+
* The http status code of the response
55+
*/
3756
@Exclude(deserialize=false)
3857
int statusCode;
58+
59+
/**
60+
* The check sum of the requested resource
61+
*/
3962
@Exclude(deserialize=false)
4063
long etag;
64+
65+
/**
66+
* The requestId, this attribute is only used for batch requests.
67+
*/
4168
@Exclude(deserialize=false)
4269
String requestId;
43-
70+
71+
/**
72+
* If the resource has been modified it returns true
73+
*
74+
* @return boolean
75+
*/
4476
public boolean isNotModified() {
4577
return statusCode == 304; //HttpStatus.SC_NOT_MODIFIED;
4678
}
79+
80+
/**
81+
* If the request is unauthorized this returns true
82+
*
83+
* @return boolean
84+
*/
4785
public boolean isUnauthorized() {
4886
return statusCode == 401;
4987
}
88+
89+
/**
90+
* If the requested resource has not been modified it returns true
91+
*
92+
* @return boolean
93+
*/
5094
public boolean isNotFound() {
5195
return statusCode == 404;
5296
}
5397

98+
/**
99+
* If this is the response of a batch request it returns true
100+
*
101+
* @return boolean
102+
*/
54103
public boolean isBatchResponseEntity() {
55104
return statusCode == 206;
56105
}

0 commit comments

Comments
 (0)