8000 vpack · anderick/arangodb-java-driver@8555b72 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8555b72

Browse files
author
Mark
committed
vpack
1 parent da9a08d commit 8555b72

40 files changed

+335
-397
lines changed

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

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ public <T> DocumentEntity<T> replaceDocument(
10981098
final long collectionId,
10991099
final long documentId,
11001100
final T value,
1101-
final Long rev,
1101+
final String rev,
11021102
final Boolean waitForSync) throws ArangoException {
11031103
return replaceDocument(createDocumentHandle(collectionId, String.valueOf(documentId)), value, rev, waitForSync);
11041104
}
@@ -1127,7 +1127,7 @@ public DocumentEntity<?> replaceDocument(
11271127
final String collectionName,
11281128
final long documentId,
11291129
final Object value,
1130-
final Long rev,
1130+
final String rev,
11311131
final Boolean waitForSync) throws ArangoException {
11321132
return replaceDocument(createDocumentHandle(collectionName, String.valueOf(documentId)), value, rev,
11331133
waitForSync);
@@ -1157,7 +1157,7 @@ public DocumentEntity<?> replaceDocument(
11571157
final long collectionId,
11581158
final String documentKey,
11591159
final Object value,
1160-
final Long rev,
1160+
final String rev,
11611161
final Boolean waitForSync) throws ArangoException {
11621162
return replaceDocument(createDocumentHandle(collectionId, documentKey), value, rev, waitForSync);
11631163
}
@@ -1186,7 +1186,7 @@ public DocumentEntity<?> replaceDocument(
11861186
final String collectionName,
11871187
final String documentKey,
11881188
final Object value,
1189-
final Long rev,
1189+
final String rev,
11901190
final Boolean waitForSync) throws ArangoException {
11911191
return replaceDocument(createDocumentHandle(collectionName, documentKey), value, rev, waitForSync);
11921192
}
@@ -1212,7 +1212,7 @@ public DocumentEntity<?> replaceDocument(
12121212
public <T> DocumentEntity<T> replaceDocument(
12131213
final String documentHandle,
12141214
final T value,
1215-
final Long rev,
1215+
final String rev,
12161216
final Boolean waitForSync) throws ArangoException {
12171217
return documentDriver.replaceDocument(getDefaultDatabase(), documentHandle, value, rev, waitForSync);
12181218
}
@@ -1432,7 +1432,7 @@ public DocumentEntity<?> updateDocument(
14321432
final long collectionId,
14331433
final long documentId,
14341434
final Object value,
1435-
final Long rev,
1435+
final String rev,
14361436
final Boolean waitForSync,
14371437
final Boolean keepNull) throws ArangoException {
14381438
return updateDocument(createDocumentHandle(collectionId, String.valueOf(documentId)), value, rev, waitForSync,
@@ -1464,7 +1464,7 @@ public DocumentEntity<?> updateDocument(
14641464
final String collectionName,
14651465
final long documentId,
14661466
final Object value,
1467-
final Long rev,
1467+
final String rev,
14681468
final Boolean waitForSync,
14691469
final Boolean keepNull) throws ArangoException {
14701470
return updateDocument(createDocumentHandle(collectionName, String.valueOf(documentId)), value, rev, waitForSync,
@@ -1496,7 +1496,7 @@ public DocumentEntity<?> updateDocument(
14961496
final long collectionId,
14971497
final String documentKey,
14981498
final Object value,
1499-
final Long rev,
1499+
final String rev,
15001500
final Boolean waitForSync,
15011501
final Boolean keepNull) throws ArangoException {
15021502
return updateDocument(createDocumentHandle(collectionId, documentKey), value, rev, waitForSync, keepNull);
@@ -1527,7 +1527,7 @@ public DocumentEntity<?> updateDocument(
15271527
final String collectionName,
15281528
final String documentKey,
15291529
final Object value,
1530-
final Long rev,
1530+
final String rev,
15311531
final Boolean waitForSync,
15321532
final Boolean keepNull) throws ArangoException {
15331533
return updateDocument(createDocumentHandle(collectionName, documentKey), value, rev, waitForSync, keepNull);
@@ -1555,7 +1555,7 @@ public DocumentEntity<?> updateDocument(
15551555
public <T> DocumentEntity<T> updateDocument(
15561556
final String documentHandle,
15571557
final T value,
1558-
final Long rev,
1558+
final String rev,
15591559
final Boolean waitForSync,
15601560
final Boolean keepNull) throws ArangoException {
15611561
return documentDriver.updateDocument(getDefaultDatabase(), documentHandle, value, rev, waitForSync, keepNull);
@@ -1671,10 +1671,10 @@ public boolean exists(final String documentHandle) throws ArangoException {
16711671
* The collection id.
16721672
* @param documentId
16731673
* The document id
1674-
* @return the document revision number
1674+
* @return the document revision
16751675
* @throws ArangoException
16761676
*/
1677-
public long checkDocument(final long collectionId, final long documentId) throws ArangoException {
1677+
public String checkDocument(final long collectionId, final long documentId) throws ArangoException {
16781678
return checkDocument(createDocumentHandle(collectionId, String.valueOf(documentId)));
16791679
}
16801680

@@ -1685,10 +1685,10 @@ public long checkDocument(final long collectionId, final long documentId) throws
16851685
* The collection name.
16861686
* @param documentId
16871687
* The document id
1688-
* @return the document revision number
1688+
* @return the document revision
16891689
* @throws ArangoException
16901690
*/
1691-
public long checkDocument(final String collectionName, final long documentId) throws ArangoException {
1691+
public String checkDocument(final String collectionName, final long documentId) throws ArangoException {
16921692
return checkDocument(createDocumentHandle(collectionName, String.valueOf(documentId)));
16931693
}
16941694

@@ -1699,10 +1699,10 @@ public long checkDocument(final String collectionName, final long documentId) th
16991699
* The collection id.
17001700
* @param documentKey
17011701
* The document key
1702-
* @return the document revision number
1702+
* @return the document revision
17031703
* @throws ArangoException
17041704
*/
1705-
public long checkDocument(final long collectionId, final String documentKey) throws ArangoException {
1705+
public String checkDocument(final long collectionId, final String documentKey) throws ArangoException {
17061706
return checkDocument(createDocumentHandle(collectionId, documentKey));
17071707
}
17081708

@@ -1713,10 +1713,10 @@ public long checkDocument(final long collectionId, final String documentKey) thr
17131713
* The collection name.
17141714
* @param documentKey
17151715
* The document key
1716-
* @return the document revision number
1716+
* @return the document revision
17171717
* @throws ArangoException
17181718
*/
1719-
public long checkDocument(final String collectionName, final String documentKey) throws ArangoException {
1719+
public String checkDocument(final String collectionName, final String documentKey) throws ArangoException {
17201720
return checkDocument(createDocumentHandle(collectionName, documentKey));
17211721
}
17221722

@@ -1725,10 +1725,10 @@ public long checkDocument(final String collectionName, final String documentKey)
17251725
*
17261726
* @param documentHandle
17271727
* The document handle
1728-
* @return the document revision number
1728+
* @return the document revision
17291729
* @throws ArangoException
17301730
*/
1731-
public long checkDocument(final String documentHandle) throws ArangoException {
1731+
public String checkDocument(final String documentHandle) throws ArangoException {
17321732
return documentDriver.checkDocument(getDefaultDatabase(), documentHandle);
17331733
}
17341734

@@ -1843,8 +1843,8 @@ public <T> DocumentEntity<T> getDocument(final String documentHandle, final Clas
18431843
public <T> DocumentEntity<T> getDocument(
18441844
final String documentHandle,
18451845
final Class<T> clazz,
1846-
final Long ifNoneMatchRevision,
1847-
final Long ifMatchRevision) throws ArangoException {
1846+
final String ifNoneMatchRevision,
1847+
final String ifMatchRevision) throws ArangoException {
18481848
return documentDriver.getDocument(getDefaultDatabase(), documentHandle, clazz, ifNoneMatchRevision,
18491849
ifMatchRevision);
18501850
}
@@ -2938,7 +2938,7 @@ public UserEntity getUser(final String username) throws ArangoException {
29382938
* @return a DefaultEntity object
29392939
* @throws ArangoException
29402940
*/
2941-
public DefaultEntity grantDatabaseAccess(String username, String database) throws ArangoException {
2941+
public DefaultEntity grantDatabaseAccess(final String username, final String database) throws ArangoException {
29422942
return usersDriver.grantDatabaseAccess(username, database);
29432943
}
29442944

@@ -3051,7 +3051,7 @@ public ImportResultEntity importDocumentsByHeaderValues(
30513051
public ImportResultEntity importDocumentsByHeaderValues(
30523052
final String collection,
30533053
final Collection<? extends Collection<?>> headerValues,
3054-
ImportOptions importOptions) throws ArangoException {
3054+
final ImportOptions importOptions) throws ArangoException {
30553055
return importDriver.importDocumentsByHeaderValues(getDefaultDatabase(), collection, headerValues,
30563056
importOptions);
30573057
}
@@ -3071,8 +3071,8 @@ public ImportResultEntity importDocumentsByHeaderValues(
30713071
*/
30723072
public ImportResultEntity importDocumentsByHeaderValuesRaw(
30733073
final String collection,
3074-
String headerValues,
3075-
ImportOptions importOptions) throws ArangoException {
3074+
final String headerValues,
3075+
final ImportOptions importOptions) throws ArangoException {
30763076
return importDriver.importDocumentsByHeaderValuesRaw(getDefaultDatabase(), collection, headerValues,
30773077
importOptions);
30783078
}
@@ -3816,8 +3816,8 @@ public <T> VertexEntity<T> graphGetVertex(
38163816
final String collectionName,
38173817
final String key,
38183818
final Class<T> clazz,
3819-
final Long ifNoneMatchRevision,
3820-
final Long ifMatchRevision) throws ArangoException {
3819+
final String ifNoneMatchRevision,
3820+
final String ifMatchRevision) throws ArangoException {
38213821
return graphDriver.getVertex(getDefaultDatabase(), graphName, collectionName, key, clazz, ifMatchRevision,
38223822
ifNoneMatchRevision);
38233823
}
@@ -3889,8 +3889,8 @@ public DeletedEntity graphDeleteVertex(
38893889
final String collectionName,
38903890
final String key,
38913891
final Boolean waitForSync,
3892-
final Long ifMatchRevision,
3893-
final Long ifNoneMatchRevision) throws ArangoException {
3892+
final String ifMatchRevision,
3893+
final String ifNoneMatchRevision) throws ArangoException {
38943894
return graphDriver.deleteVertex(getDefaultDatabase(), graphName, collectionName, key, waitForSync,
38953895
ifMatchRevision, ifNoneMatchRevision);
38963896
}
@@ -3948,8 +3948,8 @@ public <T> VertexEntity<T> graphReplaceVertex(
39483948
final String key,
39493949
final T vertex,
39503950
final Boolean waitForSync,
3951-
final Long ifMatchRevision,
3952-
final Long ifNoneMatchRevision) throws ArangoException {
3951+
final String ifMatchRevision,
3952+
final String ifNoneMatchRevision) throws ArangoException {
39533953
return graphDriver.replaceVertex(getDefaultDatabase(), graphName, collectionName, key, vertex, waitForSync,
39543954
ifMatchRevision, ifNoneMatchRevision);
39553955
}
@@ -4015,8 +4015,8 @@ public <T> VertexEntity<T> graphUpdateVertex(
40154015
final T vertex,
40164016
final Boolean keepNull,
40174017
final Boolean waitForSync,
4018-
final Long ifMatchRevision,
4019-
final Long ifNoneMatchRevision) throws ArangoException {
4018+
final String ifMatchRevision,
4019+
final String ifNoneMatchRevision) throws ArangoException {
40204020
return graphDriver.updateVertex(getDefaultDatabase(), graphName, collectionName, key, vertex, keepNull,
40214021
waitForSync, ifMatchRevision, ifNoneMatchRevision);
40224022
}
@@ -4135,8 +4135,8 @@ public <T> EdgeEntity<T> graphGetEdge(
41354135
final String edgeCollectionName,
41364136
final String key,
41374137
final Class<T> clazz,
4138-
final Long ifMatchRevision,
4139-
final Long ifNoneMatchRevision) throws ArangoException {
4138+
final String ifMatchRevision,
4139+
final String ifNoneMatchRevision) throws ArangoException {
41404140
return graphDriver.getEdge(getDefaultDatabase(), graphName, edgeCollectionName, key, clazz, ifMatchRevision,
41414141
ifNoneMatchRevision);
41424142
}
@@ -4228,8 +4228,8 @@ public DeletedEntity graphDeleteEdge(
42284228
final String edgeCollectionName,
42294229
final String key,
42304230
final Boolean waitForSync,
4231-
final Long ifMatchRevision,
4232-
final Long ifNoneMatchRevision) throws ArangoException {
4231+
final String ifMatchRevision,
4232+
final String ifNoneMatchRevision) throws ArangoException {
42334233
return graphDriver.deleteEdge(getDefaultDatabase(), graphName, edgeCollectionName, key, waitForSync,
42344234
ifMatchRevision, ifNoneMatchRevision);
42354235
}
@@ -4304,8 +4304,8 @@ public <T> EdgeEntity<T> graphReplaceEdge(
43044304
final String toHandle,
43054305
final T value,
43064306
final Boolean waitForSync,
4307-
final Long ifMatchRevision,
4308-
final Long ifNoneMatchRevision) throws ArangoException {
4307+
final String ifMatchRevision,
4308+
final String ifNoneMatchRevision) throws ArangoException {
43094309
return graphDriver.replaceEdge(getDefaultDatabase(), graphName, edgeCollectionName, key, fromHandle, toHandle,
43104310
value, waitForSync, ifMatchRevision, ifNoneMatchRevision);
43114311
}
@@ -4385,8 +4385,8 @@ public <T> EdgeEntity<T> graphUpdateEdge(
43854385
final T value,
43864386
final Boolean waitForSync,
43874387
final Boolean keepNull,
4388-
final Long ifMatchRevision,
4389-
final Long ifNoneMatchRevision) throws ArangoException {
4388+
final String ifMatchRevision,
4389+
final String ifNoneMatchRevision) throws ArangoException {
43904390
return graphDriver.updateEdge(getDefaultDatabase(), graphName, edgeCollectionName, key, fromHandle, toHandle,
43914391
value, waitForSync, keepNull, ifMatchRevision, ifNoneMatchRevision);
43924392
}
@@ -4487,7 +4487,7 @@ public <T> EdgeCursor<T> graphGetEdgeCursor(
44874487
tmpAqlQueryOptions = getDefaultAqlQueryOptions().setCount(true);
44884488
}
44894489

4490-
DocumentCursorResult<T, EdgeEntity<T>> cursor = executeAqlQueryWithDocumentCursorResult(query, bindVars,
4490+
final DocumentCursorResult<T, EdgeEntity<T>> cursor = executeAqlQueryWithDocumentCursorResult(query, bindVars,
44914491
tmpAqlQueryOptions, EdgeEntity.class, clazz);
44924492

44934493
return new EdgeCursor<T>(cursor);
@@ -4977,7 +4977,7 @@ public CursorRawResult executeAqlQueryRaw(
49774977
public DocumentEntity<String> replaceDocumentRaw(
49784978
final String documentHandle,
49794979
final String rawJsonString,
4980-
final Long rev,
4980+
final String rev,
49814981
final Boolean waitForSync) throws ArangoException {
49824982
return documentDriver.replaceDocumentRaw(getDefaultDatabase(), documentHandle, rawJsonString, rev, waitForSync);
49834983
}
@@ -5004,7 +5004,7 @@ public DocumentEntity<String> replaceDocumentRaw(
50045004
public DocumentEntity<String> updateDocumentRaw(
50055005
final String documentHandle,
50065006
final String rawJsonString,
5007-
final Long rev,
5007+
final String rev,
50085008
final Boolean waitForSync,
50095009
final Boolean keepNull) throws ArangoException {
50105010
return documentDriver.updateDocumentRaw(getDefaultDatabase(), documentHandle, rawJsonString, rev, waitForSync,

src/main/java/com/arangodb/InternalDocumentDriver.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,42 @@ <T> DocumentEntity<T> replaceDocument(
2727
String database,
2828
String documentHandle,
2929
T value,
30-
Long rev,
30+
String rev,
3131
Boolean waitForSync) throws ArangoException;
3232

3333
DocumentEntity<String> replaceDocumentRaw(
3434
String database,
3535
String documentHandle,
3636
String rawJsonString,
37-
Long rev,
37+
String rev,
3838
Boolean waitForSync) throws ArangoException;
3939

4040
<T> DocumentEntity<T> updateDocument(
4141
String database,
4242
String documentHandle,
4343
T value,
44-
Long rev,
44+
String rev,
4545
Boolean waitForSync,
4646
Boolean keepNull) throws ArangoException;
4747

4848
DocumentEntity<String> updateDocumentRaw(
4949
String database,
5050
String documentHandle,
5151
String rawJsonString,
52-
Long rev,
52+
String rev,
5353
Boolean waitForSync,
5454
Boolean keepNull) throws ArangoException;
5555

5656
List<String> getDocuments(String database, String collectionName) throws ArangoException;
5757

58-
long checkDocument(String database, String documentHandle) throws ArangoException;
58+
String checkDocument(String database, String documentHandle) throws ArangoException;
5959

6060
<T> DocumentEntity<T> getDocument(
6161
String database,
6262
String documentHandle,
6363
Class<T> clazz,
64-
Long ifNoneMatchRevision,
65-
Long ifMatchRevision) throws ArangoException;
64+
String ifNoneMatchRevision,
65+
String ifMatchRevision) throws ArangoException;
6666

6767
String getDocumentRaw(String database, String documentHandle, Long ifNoneMatchRevision, Long ifMatchRevision)
6868
throws ArangoException;

0 commit comments

Comments
 (0)
0