@@ -162,79 +162,6 @@ public ArangoDriver(ArangoConfigure configure, String database) {
162
162
this .createModuleDrivers (false );
163
163
}
164
164
165
- private void createModuleDrivers (boolean createProxys ) {
166
- if (!createProxys ) {
167
- this .cursorDriver = ImplFactory .createCursorDriver (configure , this .httpManager );
168
- this .batchDriver = ImplFactory .createBatchDriver (configure , this .httpManager );
169
- this .collectionDriver = ImplFactory .createCollectionDriver (configure , this .httpManager );
170
- this .documentDriver = ImplFactory .createDocumentDriver (configure , this .httpManager );
171
- this .indexDriver = ImplFactory .createIndexDriver (configure , this .httpManager );
172
- this .adminDriver = ImplFactory .createAdminDriver (configure , this .httpManager );
173
- this .aqlFunctionsDriver = ImplFactory .createAqlFunctionsDriver (configure , this .httpManager );
174
- this .simpleDriver = ImplFactory .createSimpleDriver (configure , cursorDriver , this .httpManager );
175
- this .usersDriver = ImplFactory .createUsersDriver (configure , this .httpManager );
176
- this .importDriver = ImplFactory .createImportDriver (configure , this .httpManager );
177
- this .databaseDriver = ImplFactory .createDatabaseDriver (configure , this .httpManager );
178
- this .endpointDriver = ImplFactory .createEndpointDriver (configure , this .httpManager );
179
- this .replicationDriver = ImplFactory .createReplicationDriver (configure , this .httpManager );
180
- this .graphDriver = ImplFactory .createGraphDriver (configure , cursorDriver , this .httpManager );
181
- this .edgeDriver = ImplFactory .createEdgeDriver (configure , cursorDriver , this .httpManager );
182
- this .jobsDriver = ImplFactory .createJobsDriver (configure , this .httpManager );
183
- this .transactionDriver = ImplFactory .createTransactionDriver (configure , this .httpManager );
184
- this .traversalDriver = ImplFactory .createTraversalDriver (configure , httpManager );
185
- this .queryCacheDriver = ImplFactory .createQueryCacheDriver (configure , httpManager );
186
- } else {
187
- this .transactionDriver = (InternalTransactionDriver ) Proxy .newProxyInstance (
188
- InternalTransactionDriver .class .getClassLoader (), new Class <?>[] { InternalTransactionDriver .class },
189
- new InvocationHandlerImpl (this .transactionDriver ));
190
- this .jobsDriver = (InternalJobsDriver ) Proxy .newProxyInstance (InternalJobsDriver .class .getClassLoader (),
191
- new Class <?>[] { InternalJobsDriver .class }, new InvocationHandlerImpl (this .jobsDriver ));
192
- this .cursorDriver = (InternalCursorDriver ) Proxy .newProxyInstance (
193
- InternalCursorDriver .class .getClassLoader (), new Class <?>[] { InternalCursorDriver .class },
194
- new InvocationHandlerImpl (this .cursorDriver ));
195
- this .collectionDriver = (InternalCollectionDriver ) Proxy .newProxyInstance (
196
- InternalCollectionDriver .class .getClassLoader (), new Class <?>[] { InternalCollectionDriver .class },
197
- new InvocationHandlerImpl (this .collectionDriver ));
198
- this .documentDriver = (InternalDocumentDriver ) Proxy .newProxyInstance (
199
- InternalDocumentDriver .class .getClassLoader (), new Class <?>[] { InternalDocumentDriver .class },
200
- new InvocationHandlerImpl (this .documentDriver ));
201
- this .indexDriver = (InternalIndexDriver ) Proxy .newProxyInstance (InternalIndexDriver .class .getClassLoader (),
202
- new Class <?>[] { InternalIndexDriver .class }, new InvocationHandlerImpl (this .indexDriver ));
203
- this .adminDriver = (InternalAdminDriver ) Proxy .newProxyInstance (InternalAdminDriver .class .getClassLoader (),
204
- new Class <?>[] { InternalAdminDriver .class }, new InvocationHandlerImpl (this .adminDriver ));
205
- this .aqlFunctionsDriver = (InternalAqlFunctionsDriver ) Proxy .newProxyInstance (
206
- InternalAqlFunctionsDriver .class .getClassLoader (), new Class <?>[] { InternalAqlFunctionsDriver .class },
207
- new InvocationHandlerImpl (this .aqlFunctionsDriver ));
208
- this .simpleDriver = (InternalSimpleDriver ) Proxy .newProxyInstance (
209
- InternalSimpleDriver .class .getClassLoader (), new Class <?>[] { InternalSimpleDriver .class },
210
- new InvocationHandlerImpl (this .simpleDriver ));
211
- this .usersDriver = (InternalUsersDriver ) Proxy .newProxyInstance (InternalUsersDriver .class .getClassLoader (),
212
- new Class <?>[] { InternalUsersDriver .class }, new InvocationHandlerImpl (this .usersDriver ));
213
- this .importDriver = (InternalImportDriver ) Proxy .newProxyInstance (
214
- InternalImportDriver .class .getClassLoader (), new Class <?>[] { InternalImportDriver .class },
215
- new InvocationHandlerImpl (this .importDriver ));
216
- this .databaseDriver = (InternalDatabaseDriver ) Proxy .newProxyInstance (
217
- InternalDatabaseDriver .class .getClassLoader (), new Class <?>[] { InternalDatabaseDriver .class },
218
- new InvocationHandlerImpl (this .databaseDriver ));
219
- this .endpointDriver = (InternalEndpointDriver ) Proxy .newProxyInstance (
220
- InternalEndpointDriver .class .getClassLoader (), new Class <?>[] { InternalEndpointDriver .class },
221
- new InvocationHandlerImpl (this .endpointDriver ));
222
- this .replicationDriver = (InternalReplicationDriver ) Proxy .newProxyInstance (
223
- InternalReplicationDriver .class .getClassLoader (), new Class <?>[] { InternalReplicationDriver .class },
224
- new InvocationHandlerImpl (this .replicationDriver ));
225
- this .graphDriver = (InternalGraphDriver ) Proxy .newProxyInstance (InternalGraphDriver .class .getClassLoader (),
226
- new Class <?>[] { InternalGraphDriver .class }, new InvocationHandlerImpl (this .graphDriver ));
227
- this .edgeDriver = (InternalEdgeDriver ) Proxy .newProxyInstance (InternalEdgeDriver .class .getClassLoader (),
228
- new Class <?>[] { InternalEdgeDriver .class }, new InvocationHandlerImpl (this .edgeDriver ));
229
- this .traversalDriver = (InternalTraversalDriver ) Proxy .newProxyInstance (
230
- InternalTraversalDriver .class .getClassLoader (), new Class <?>[] { InternalTraversalDriver .class },
231
- new InvocationHandlerImpl (this .traversalDriver ));
232
- this .queryCacheDriver = (InternalQueryCacheDriver ) Proxy .newProxyInstance (
233
- InternalQueryCacheDriver .class .getClassLoader (), new Class <?>[] { InternalQueryCacheDriver .class },
234
- new InvocationHandlerImpl (this .queryCacheDriver ));
235
- }
236
- }
237
-
238
165
/**
239
166
* This method enables batch execution. Until 'cancelBatchMode' or
240
167
* 'executeBatch' is called every other call is stacked and will be either
@@ -5771,6 +5698,148 @@ public CursorRawResult executeAqlQueryRaw(
5771
5698
getAqlQueryOptions (aqlQueryOptions ));
5772
5699
}
5773
5700
5701
+ /**
5702
+ * This method replaces the content of the document defined by
5703
+ * documentHandle. This method offers a parameter rev (revision). If the
5704
+ * revision of the document on the server does not match the given revision
5705
+ * the policy parameter is used. If it is set to *last* the operation is
5706
+ * performed anyway. if it is set to *error* an error is thrown.
5707
+ *
5708
+ * @param documentHandle
5709
+ * The document's handle.
5710
+ * @param rawJsonString
5711
+ * A string containing a JSON object
5712
+ * @param rev
5713
+ * the desired revision.
5714
+ * @param policy
5715
+ * The update policy
5716
+ * @param waitForSync
5717
+ * if set to true the response is returned when the server has
5718
+ * finished.
5719
+ * @return DocumentEntity<String>
5720
+ * @throws ArangoException
5721
+ */
5722
+ public DocumentEntity <String > replaceDocumentRaw (
5723
+ String documentHandle ,
5724
+ String rawJsonString ,
5725
+ Long rev ,
5726
+ Policy policy ,
5727
+ Boolean waitForSync ) throws ArangoException {
5728
+ return documentDriver .replaceDocumentRaw (getDefaultDatabase (), documentHandle , rawJsonString , rev , policy ,
5729
+ waitForSync );
5730
+ }
5731
+
5732
+ /**
5733
+ * This method updates a document defined by documentHandle. This method
5734
+ * offers a parameter rev (revision). If the revision of the document on the
5735
+ * server does not match the given revision the policy parameter is used. If
5736
+ * it is set to *last* the operation is performed anyway. if it is set to
5737
+ * *error* an error is thrown.
5738
+ *
5739
+ * @param documentHandle
5740
+ * The document handle.
5741
+ * @param rawJsonString
5742
+ * A string containing a JSON object
5743
+ * @param rev
5744
+ * The desired revision
5745
+ * @param policy
5746
+ * The update policy
5747
+ * @param waitForSync
5748
+ * if set to true the response is returned when the server has
5749
+ * finished.
5750
+ * @param keepNull
5751
+ * If true null values are kept.
5752
+ * @return DocumentEntity<String>
5753
+ * @throws ArangoException
5754
+ */
5755
+ public DocumentEntity <String > updateDocumentRaw (
5756
+ String documentHandle ,
5757
+ String rawJsonString ,
5758
+ Long rev ,
5759
+ Policy policy ,
5760
+ Boolean waitForSync ,
5761
+ Boolean keepNull ) throws ArangoException {
5762
+ return documentDriver .updateDocumentRaw (getDefaultDatabase (), documentHandle , rawJsonString , rev , policy ,
5763
+ waitForSync , keepNull );
5764
+ }
5765
+
5766
+ //
5767
+ // private functions
5768
+ //
5769
+
5770
+ private void createModuleDrivers (boolean createProxys ) {
5771
+ if (!createProxys ) {
5772
+ this .cursorDriver = ImplFactory .createCursorDriver (configure , this .httpManager );
5773
+ this .batchDriver = ImplFactory .createBatchDriver (configure , this .httpManager );
5774
+ this .collectionDriver = ImplFactory .createCollectionDriver (configure , this .httpManager );
5775
+ this .documentDriver = ImplFactory .createDocumentDriver (configure , this .httpManager );
5776
+ this .indexDriver = ImplFactory .createIndexDriver (configure , this .httpManager );
5777
+ this .adminDriver = ImplFactory .createAdminDriver (configure , this .httpManager );
5778
+ this .aqlFunctionsDriver = ImplFactory .createAqlFunctionsDriver (configure , this .httpManager );
5779
+ this .simpleDriver = ImplFactory .createSimpleDriver (configure , cursorDriver , this .httpManager );
5780
+ this .usersDriver = ImplFactory .createUsersDriver (configure , this .httpManager );
5781
+ this .importDriver = ImplFactory .createImportDriver (configure , this .httpManager );
5782
+ this .databaseDriver = ImplFactory .createDatabaseDriver (configure , this .httpManager );
5783
+ this .endpointDriver = ImplFactory .createEndpointDriver (configure , this .httpManager );
5784
+ this .replicationDriver = ImplFactory .createReplicationDriver (configure , this .httpManager );
5785
+ this .graphDriver = ImplFactory .createGraphDriver (configure , cursorDriver , this .httpManager );
5786
+ this .edgeDriver = ImplFactory .createEdgeDriver (configure , cursorDriver , this .httpManager );
5787
+ this .jobsDriver = ImplFactory .createJobsDriver (configure , this .httpManager );
5788
+ this .transactionDriver = ImplFactory .createTransactionDriver (configure , this .httpManager );
5789
+ this .traversalDriver = ImplFactory .createTraversalDriver (configure , httpManager );
5790
+ this .queryCacheDriver = ImplFactory .createQueryCacheDriver (configure , httpManager );
5791
+ } else {
5792
+ this .transactionDriver = (InternalTransactionDriver ) Proxy .newProxyInstance (
5793
+ InternalTransactionDriver .class .getClassLoader (), new Class <?>[] { InternalTransactionDriver .class },
5794
+ new InvocationHandlerImpl (this .transactionDriver ));
5795
+ this .jobsDriver = (InternalJobsDriver ) Proxy .newProxyInstance (InternalJobsDriver .class .getClassLoader (),
5796
+ new Class <?>[] { InternalJobsDriver .class }, new InvocationHandlerImpl (this .jobsDriver ));
5797
+ this .cursorDriver = (InternalCursorDriver ) Proxy .newProxyInstance (
5798
+ InternalCursorDriver .class .getClassLoader (), new Class <?>[] { InternalCursorDriver .class },
5799
+ new InvocationHandlerImpl (this .cursorDriver ));
5800
+ this .collectionDriver = (InternalCollectionDriver ) Proxy .newProxyInstance (
5801
+ InternalCollectionDriver .class .getClassLoader (), new Class <?>[] { InternalCollectionDriver .class },
5802
+ new InvocationHandlerImpl (this .collectionDriver ));
5803
+ this .documentDriver = (InternalDocumentDriver ) Proxy .newProxyInstance (
5804
+ InternalDocumentDriver .class .getClassLoader (), new Class <?>[] { InternalDocumentDriver .class },
5805
+ new InvocationHandlerImpl (this .documentDriver ));
5806
+ this .indexDriver = (InternalIndexDriver ) Proxy .newProxyInstance (InternalIndexDriver .class .getClassLoader (),
5807
+ new Class <?>[] { InternalIndexDriver .class }, new InvocationHandlerImpl (this .indexDriver ));
5808
+ this .adminDriver = (InternalAdminDriver ) Proxy .newProxyInstance (InternalAdminDriver .class .getClassLoader (),
5809
+ new Class <?>[] { InternalAdminDriver .class }, new InvocationHandlerImpl (this .adminDriver ));
5810
+ this .aqlFunctionsDriver = (InternalAqlFunctionsDriver ) Proxy .newProxyInstance (
5811
+ InternalAqlFunctionsDriver .class .getClassLoader (), new Class <?>[] { InternalAqlFunctionsDriver .class },
5812
+ new InvocationHandlerImpl (this .aqlFunctionsDriver ));
5813
+ this .simpleDriver = (InternalSimpleDriver ) Proxy .newProxyInstance (
5814
+ InternalSimpleDriver .class .getClassLoader (), new Class <?>[] { InternalSimpleDriver .class },
5815
+ new InvocationHandlerImpl (this .simpleDriver ));
5816
+ this .usersDriver = (InternalUsersDriver ) Proxy .newProxyInstance (InternalUsersDriver .class .getClassLoader (),
5817
+ new Class <?>[] { InternalUsersDriver .class }, new InvocationHandlerImpl (this .usersDriver ));
5818
+ this .importDriver = (InternalImportDriver ) Proxy .newProxyInstance (
5819
+ InternalImportDriver .class .getClassLoader (), new Class <?>[] { InternalImportDriver .class },
5820
+ new InvocationHandlerImpl (this .importDriver ));
5821
+ this .databaseDriver = (InternalDatabaseDriver ) Proxy .newProxyInstance (
5822
+ InternalDatabaseDriver .class .getClassLoader (), new Class <?>[] { InternalDatabaseDriver .class },
5823
+ new InvocationHandlerImpl (this .databaseDriver ));
5824
+ this .endpointDriver = (InternalEndpointDriver ) Proxy .newProxyInstance (
5825
+ InternalEndpointDriver .class .getClassLoader (), new Class <?>[] { InternalEndpointDriver .class },
5826
+ new InvocationHandlerImpl (this .endpointDriver ));
5827
+ this .replicationDriver = (InternalReplicationDriver ) Proxy .newProxyInstance (
5828
+ InternalReplicationDriver .class .getClassLoader (), new Class <?>[] { InternalReplicationDriver .class },
5829
+ new InvocationHandlerImpl (this .replicationDriver ));
5830
+ this .graphDriver = (InternalGraphDriver ) Proxy .newProxyInstance (InternalGraphDriver .class .getClassLoader (),
5831
+ new Class <?>[] { InternalGraphDriver .class }, new InvocationHandlerImpl (this .graphDriver ));
5832
+ this .edgeDriver = (InternalEdgeDriver ) Proxy .newProxyInstance (InternalEdgeDriver .class .getClassLoader (),
5833
+ new Class <?>[] { InternalEdgeDriver .class }, new InvocationHandlerImpl (this .edgeDriver ));
5834
+ this .traversalDriver = (InternalTraversalDriver ) Proxy .newProxyInstance (
5835
+ InternalTraversalDriver .class .getClassLoader (), new Class <?>[] { InternalTraversalDriver .class },
5836
+ new InvocationHandlerImpl (this .traversalDriver ));
5837
+ this .queryCacheDriver = (InternalQueryCacheDriver ) Proxy .newProxyInstance (
5838
+ InternalQueryCacheDriver .class .getClassLoader (), new Class <?>[] { InternalQueryCacheDriver .class },
5839
+ new InvocationHandlerImpl (this .queryCacheDriver ));
5840
+ }
5841
+ }
5842
+
5774
5843
private AqlQueryOptions getAqlQueryOptions (AqlQueryOptions aqlQueryOptions ) {
5775
5844
if (aqlQueryOptions == null ) {
5776
5845
return getDefaultAqlQueryOptions ();
0 commit comments