@@ -61,7 +61,7 @@ public interface ArangoCollection extends ArangoSerdeAccessor {
61
61
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#create-document">API
62
62
* Documentation</a>
63
63
*/
64
- < T > DocumentCreateEntity <T > insertDocument (T value ) throws ArangoDBException ;
64
+ DocumentCreateEntity <Void > insertDocument (Object value ) throws ArangoDBException ;
65
65
66
66
/**
67
67
* Creates a new document from the given document, unless there is already a document with the _key given. If no
@@ -76,27 +76,35 @@ public interface ArangoCollection extends ArangoSerdeAccessor {
76
76
*/
77
77
<T > DocumentCreateEntity <T > insertDocument (T value , DocumentCreateOptions options ) throws ArangoDBException ;
78
78
79
+ /**
80
+ * Creates a new document from the given document, unless there is already a document with the _key given. If no
81
+ * _key is given, a new unique _key is generated automatically.
82
+ *
83
+ * @param value A representation of a single document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
84
+ * @param options Additional options, can be null
85
+ * @param type Deserialization target type for the returned documents.
86
+ * @return information about the document
87
+ * @throws ArangoDBException
88
+ * @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#create-document">API
89
+ * Documentation</a>
90
+ */
91
+ <T > DocumentCreateEntity <T > insertDocument (T value , DocumentCreateOptions options , Class <T > type ) throws ArangoDBException ;
92
+
79
93
/**
80
94
* Creates new documents from the given documents, unless there is already a document with the _key given. If no
81
95
* _key is given, a new unique _key is generated automatically.
82
- * <p>
83
- * Limitations:
84
- * - the fields having {@code null} value are always removed during serialization
85
96
*
86
97
* @param values A List of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
87
98
* @return information about the documents
88
99
* @throws ArangoDBException
89
100
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#create-document">API
90
101
* Documentation</a>
91
102
*/
92
- < T > MultiDocumentEntity <DocumentCreateEntity <T >> insertDocuments (Collection <T > values ) throws ArangoDBException ;
103
+ MultiDocumentEntity <DocumentCreateEntity <Void >> insertDocuments (Collection <? > values ) throws ArangoDBException ;
93
104
94
105
/**
95
106
* Creates new documents from the given documents, unless there is already a document with the _key given. If no
96
107
* _key is given, a new unique _key is generated automatically.
97
- * <p>
98
- * Limitations:
99
- * - the fields having {@code null} value are always removed during serialization
100
108
*
101
109
* @param values A List of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
102
110
* @param options Additional options, can be null
@@ -108,11 +116,23 @@ public interface ArangoCollection extends ArangoSerdeAccessor {
108
116
<T > MultiDocumentEntity <DocumentCreateEntity <T >> insertDocuments (
109
117
Collection <T > values , DocumentCreateOptions options ) throws ArangoDBException ;
110
118
119
+ /**
120
+ * Creates new documents from the given documents, unless there is already a document with the _key given. If no
121
+ * _key is given, a new unique _key is generated automatically.
122
+ *
123
+ * @param values A List of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
124
+ * @param options Additional options, can be null
125
+ * @param type Deserialization target type for the returned documents.
126
+ * @return information about the documents
127
+ * @throws ArangoDBException
128
+ * @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#create-document">API
129
+ * Documentation</a>
130
+ */
131
+ <T > MultiDocumentEntity <DocumentCreateEntity <T >> insertDocuments (
132
+ Collection <T > values , DocumentCreateOptions options , Class <T > type ) throws ArangoDBException ;
133
+
111
134
/**
112
135
* Bulk imports the given values into the collection.
113
- * <p>
114
- * Limitations:
115
- * - the fields having {@code null} value are always removed during serialization
116
136
*
117
137
* @param values a list of Objects that will be stored as documents
118
138
* @return information about the import
@@ -122,9 +142,6 @@ <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(
122
142
123
143
/**
124
144
* Bulk imports the given values into the collection.
125
- * <p>
126
- * Limitations:
127
- * - the fields having {@code null} value are always removed during serialization
128
145
*
129
146
* @param values a list of Objects that will be stored as documents
130
147
* @param options Additional options, can be null
@@ -135,9 +152,6 @@ <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(
135
152
136
153
/**
137
154
* Bulk imports the given values into the collection.
138
- * <p>
139
- * Limitations:
140
- * - the fields having {@code null} value are always removed during serialization
141
155
*
142
156
* @param values JSON-encoded array of objects that will be stored as documents
143
157
* @return information about the import
@@ -147,9 +161,6 @@ <T> MultiDocumentEntity<DocumentCreateEntity<T>> insertDocuments(
147
161
148
162
/**
149
163
* Bulk imports the given values into the collection.
150
- * <p>
151
- * Limitations:
152
- * - the fields having {@code null} value are always removed during serialization
153
164
*
154
165
* @param values JSON-encoded array of objects that will be stored as documents
155
166
* @param options Additional options, can be null
@@ -216,7 +227,7 @@ <T> MultiDocumentEntity<T> getDocuments(Collection<String> keys, Class<T> type,
216
227
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#replace-document">API
217
228
* Documentation</a>
218
229
*/
219
- < T > DocumentUpdateEntity <T > replaceDocument (String key , T value ) throws ArangoDBException ;
230
+ DocumentUpdateEntity <Void > replaceDocument (String key , Object value ) throws ArangoDBException ;
220
231
221
232
/**
222
233
* Replaces the document with {@code key} with the one in the body, provided there is such a document and no
@@ -233,27 +244,37 @@ <T> MultiDocumentEntity<T> getDocuments(Collection<String> keys, Class<T> type,
233
244
<T > DocumentUpdateEntity <T > replaceDocument (String key , T value , DocumentReplaceOptions options )
234
245
throws ArangoDBException ;
235
246
247
+ /**
248
+ * Replaces the document with {@code key} with the one in the body, provided there is such a document and no
249
+ * precondition is violated
250
+ *
251
+ * @param key The key of the document
252
+ * @param value A representation of a single document (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
253
+ * @param options Additional options, can be null
254
+ * @param type Deserialization target type for the returned documents.
255
+ * @return information about the document
256
+ * @throws ArangoDBException
257
+ * @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#replace-document">API
258
+ * Documentation</a>
259
+ */
260
+ <T > DocumentUpdateEntity <T > replaceDocument (String key , T value , DocumentReplaceOptions options , Class <T > type )
261
+ throws ArangoDBException ;
262
+
236
263
/**
237
264
* Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are
238
265
* specified by the _key attributes in the documents in values.
239
- * <p>
240
- * Limitations:
241
- * - the fields having {@code null} value are always removed during serialization
242
266
*
243
267
* @param values A List of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
244
268
* @return information about the documents
245
269
* @throws ArangoDBException
246
270
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#replace-documents">API
247
271
* Documentation</a>
248
272
*/
249
- < T > MultiDocumentEntity <DocumentUpdateEntity <T >> replaceDocuments (Collection <T > values ) throws ArangoDBException ;
273
+ MultiDocumentEntity <DocumentUpdateEntity <Void >> replaceDocuments (Collection <? > values ) throws ArangoDBException ;
250
274
251
275
/**
252
276
* Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are
253
277
* specified by the _key attributes in the documents in values.
254
- * <p>
255
- * Limitations:
256
- * - the fields having {@code null} value are always removed during serialization
257
278
*
258
279
* @param values A List of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
259
280
* @param options Additional options, can be null
@@ -265,6 +286,21 @@ <T> DocumentUpdateEntity<T> replaceDocument(String key, T value, DocumentReplace
265
286
<T > MultiDocumentEntity <DocumentUpdateEntity <T >> replaceDocuments (
266
287
Collection <T > values , DocumentReplaceOptions options ) throws ArangoDBException ;
267
288
289
+ /**
290
+ * Replaces multiple documents in the specified collection with the ones in the values, the replaced documents are
291
+ * specified by the _key attributes in the documents in values.
292
+ *
293
+ * @param values A List of documents (POJO, {@link com.arangodb.util.RawJson} or {@link com.arangodb.util.RawBytes})
294
+ * @param options Additional options, can be null
295
+ * @param type Deserialization target type for the returned documents.
296
+ * @return information about the documents
297
+ * @throws ArangoDBException
298
+ * @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#replace-documents">API
299
+ * Documentation</a>
300
+ */
301
+ <T > MultiDocumentEntity <DocumentUpdateEntity <T >> replaceDocuments (
302
+ Collection <T > values , DocumentReplaceOptions options , Class <T > type ) throws ArangoDBException ;
303
+
268
304
/**
269
305
* Partially updates the document identified by document-key. The value must contain a document with the attributes
270
306
* to patch (the patch document). All attributes from the patch document will be added to the existing document if
@@ -277,7 +313,7 @@ <T> MultiDocumentEntity<DocumentUpdateEntity<T>> replaceDocuments(
277
313
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#update-document">API
278
314
* Documentation</a>
279
315
*/
280
- < T > DocumentUpdateEntity <T > updateDocument (String key , T value ) throws ArangoDBException ;
316
+ DocumentUpdateEntity <Void > updateDocument (String key , Object value ) throws ArangoDBException ;
281
317
282
318
/**
283
319
* Partially updates the document identified by document-key. The value must contain a document with the attributes
@@ -324,7 +360,7 @@ <T, U> DocumentUpdateEntity<U> updateDocument(String key, T value, DocumentUpdat
324
360
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#update-documents">API
325
361
* Documentation</a>
326
362
*/
327
- < T > MultiDocumentEntity <DocumentUpdateEntity <T >> updateDocuments (Collection <T > values ) throws ArangoDBException ;
363
+ MultiDocumentEntity <DocumentUpdateEntity <Void >> updateDocuments (Collection <? > values ) throws ArangoDBException ;
328
364
329
365
/**
330
366
* Partially updates documents, the documents to update are specified by the _key attributes in the objects on
@@ -370,6 +406,19 @@ <T, U> MultiDocumentEntity<DocumentUpdateEntity<U>> updateDocuments(
370
406
*/
371
407
DocumentDeleteEntity <Void > deleteDocument (String key ) throws ArangoDBException ;
372
408
409
+ /**
410
+ * Deletes the document with the given {@code key} from the collection.
411
+ *
412
+ * @param key The key of the document
413
+ * @param options Additional options, can be null
414
+ * @return information about the document
415
+ * @throws ArangoDBException
416
+ * @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#removes-a-document">API
417
+ * Documentation</a>
418
+ */
419
+ <T > DocumentDeleteEntity <T > deleteDocument (String key , DocumentDeleteOptions options )
420
+ throws ArangoDBException ;
421
+
373
422
/**
374
423
* Deletes the document with the given {@code key} from the collection.
375
424
*
@@ -382,7 +431,7 @@ <T, U> MultiDocumentEntity<DocumentUpdateEntity<U>> updateDocuments(
382
431
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#removes-a-document">API
383
432
* Documentation</a>
384
433
*/
385
- <T > DocumentDeleteEntity <T > deleteDocument (String key , Class <T > type , DocumentDeleteOptions options )
434
+ <T > DocumentDeleteEntity <T > deleteDocument (String key , DocumentDeleteOptions options , Class <T > type )
386
435
throws ArangoDBException ;
387
436
388
437
/**
@@ -397,6 +446,20 @@ <T> DocumentDeleteEntity<T> deleteDocument(String key, Class<T> type, DocumentDe
397
446
*/
398
447
MultiDocumentEntity <DocumentDeleteEntity <Void >> deleteDocuments (Collection <?> values ) throws ArangoDBException ;
399
448
449
+ /**
450
+ * Deletes multiple documents from the collection.
451
+ *
452
+ * @param values The keys of the documents or the documents themselves
453
+ * @param options Additional options, can be null
454
+ * @return information about the documents
455
+ * @throws ArangoDBException
456
+ * @see <a href=
457
+ * "https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#removes-multiple-documents">API
458
+ * Documentation</a>
459
+ */
460
+ <T > MultiDocumentEntity <DocumentDeleteEntity <T >> deleteDocuments (
461
+ Collection <?> values , DocumentDeleteOptions options ) throws ArangoDBException ;
462
+
400
463
/**
401
464
* Deletes multiple documents from the collection.
402
465
*
@@ -411,7 +474,7 @@ <T> DocumentDeleteEntity<T> deleteDocument(String key, Class<T> type, DocumentDe
411
474
* Documentation</a>
412
475
*/
413
476
<T > MultiDocumentEntity <DocumentDeleteEntity <T >> deleteDocuments (
414
- Collection <?> values , Class <T > type , DocumentDeleteOptions options ) throws ArangoDBException ;
477
+ Collection <?> values , DocumentDeleteOptions options , Class <T > type ) throws ArangoDBException ;
415
478
416
479
/**
417
480
* Checks if the document exists by reading a single document head
0 commit comments