@@ -48,47 +48,123 @@ final class AnyDocumentBundleImpl implements AnyDocumentBundle {
48
48
private DatabaseClient dbClient ;
49
49
private BaseProxy baseProxy ;
50
50
51
- private BaseProxy .DBFunctionRequest req_sendReceiveDocs ;
51
+ private BaseProxy .DBFunctionRequest req_sendReceiveManyDocs ;
52
+ private BaseProxy .DBFunctionRequest req_sendReceiveRequiredDoc ;
53
+ private BaseProxy .DBFunctionRequest req_sendReceiveOptionalDoc ;
54
+ private BaseProxy .DBFunctionRequest req_sendReceiveAnyDocs ;
52
55
53
56
private AnyDocumentBundleImpl (DatabaseClient dbClient , JSONWriteHandle servDecl ) {
54
57
this .dbClient = dbClient ;
55
58
this .baseProxy = new BaseProxy ("/dbf/test/anyDocument/" , servDecl );
56
59
57
- this .req_sendReceiveDocs = this .baseProxy .request (
58
- "sendReceiveDocs.sjs" , BaseProxy .ParameterValuesKind .MULTIPLE_MIXED );
60
+ this .req_sendReceiveManyDocs = this .baseProxy .request (
61
+ "sendReceiveManyDocs.sjs" , BaseProxy .ParameterValuesKind .MULTIPLE_MIXED );
62
+ this .req_sendReceiveRequiredDoc = this .baseProxy .request (
63
+ "sendReceiveRequiredDoc.sjs" , BaseProxy .ParameterValuesKind .MULTIPLE_MIXED );
64
+ this .req_sendReceiveOptionalDoc = this .baseProxy .request (
65
+ "sendReceiveOptionalDoc.sjs" , BaseProxy .ParameterValuesKind .MULTIPLE_MIXED );
66
+ this .req_sendReceiveAnyDocs = this .baseProxy .request (
67
+ "sendReceiveAnyDocs.sjs" , BaseProxy .ParameterValuesKind .MULTIPLE_MIXED );
59
68
}
60
69
61
70
@ Override
62
- public Stream <com .marklogic .client .io .InputStreamHandle > sendReceiveDocs (Stream <String > uris , Stream <com .marklogic .client .io .InputStreamHandle > docs ) {
63
- return sendReceiveDocs (
64
- this .req_sendReceiveDocs .on (this .dbClient ), uris , docs
71
+ public Stream <com .marklogic .client .io .InputStreamHandle > sendReceiveManyDocs (Stream <String > uris , Stream <com .marklogic .client .io .InputStreamHandle > docs ) {
72
+ return sendReceiveManyDocs (
73
+ this .req_sendReceiveManyDocs .on (this .dbClient ), uris , docs
65
74
);
66
75
}
67
- private Stream <com .marklogic .client .io .InputStreamHandle > sendReceiveDocs (BaseProxy .DBFunctionRequest request , Stream <String > uris , Stream <com .marklogic .client .io .InputStreamHandle > docs ) {
68
- /* TODO:
69
- generate code that
70
- instead of wrapping with BaseProxy.AnyDocumentType.toInputStreamHandle()
71
- calls .asStreamOfHandles()
72
- */
73
- return request
74
- .withParams (
75
- BaseProxy .atomicParam ("uris" , true , BaseProxy .StringType .fromString (uris )),
76
- BaseProxy .documentParam ("docs" , true , docs )
77
- ).responseMultiple (true , Format .UNKNOWN )
78
- .asStreamOfHandles (null , new com .marklogic .client .io .InputStreamHandle ());
76
+ private Stream <com .marklogic .client .io .InputStreamHandle > sendReceiveManyDocs (BaseProxy .DBFunctionRequest request , Stream <String > uris , Stream <com .marklogic .client .io .InputStreamHandle > docs ) {
77
+ return request
78
+ .withParams (
79
+ BaseProxy .atomicParam ("uris" , false , BaseProxy .StringType .fromString (uris )),
80
+ BaseProxy .documentParam ("docs" , false , docs )
81
+ ).responseMultiple (false , Format .UNKNOWN )
82
+ .asStreamOfHandles (null , new com .marklogic .client .io .InputStreamHandle ());
83
+ }
84
+
85
+ @ Override
86
+ public com .marklogic .client .io .InputStreamHandle sendReceiveRequiredDoc (String uri , com .marklogic .client .io .InputStreamHandle doc ) {
87
+ return sendReceiveRequiredDoc (
88
+ this .req_sendReceiveRequiredDoc .on (this .dbClient ), uri , doc
89
+ );
90
+ }
91
+ private com .marklogic .client .io .InputStreamHandle sendReceiveRequiredDoc (BaseProxy .DBFunctionRequest request , String uri , com .marklogic .client .io .InputStreamHandle doc ) {
92
+ return request
93
+ .withParams (
94
+ BaseProxy .atomicParam ("uri" , false , BaseProxy .StringType .fromString (uri )),
95
+ BaseProxy .documentParam ("doc" , false , doc )
96
+ ).responseSingle (false , Format .UNKNOWN )
97
+ .asHandle (new com .marklogic .client .io .InputStreamHandle ());
98
+ }
99
+
100
+ @ Override
101
+ public com .marklogic .client .io .InputStreamHandle sendReceiveOptionalDoc (String uri , com .marklogic .client .io .InputStreamHandle doc ) {
102
+ return sendReceiveOptionalDoc (
103
+ this .req_sendReceiveOptionalDoc .on (this .dbClient ), uri , doc
104
+ );
105
+ }
106
+ private com .marklogic .client .io .InputStreamHandle sendReceiveOptionalDoc (BaseProxy .DBFunctionRequest request , String uri , com .marklogic .client .io .InputStreamHandle doc ) {
107
+ return request
108
+ .withParams (
109
+ BaseProxy .atomicParam ("uri" , true , BaseProxy .StringType .fromString (uri )),
110
+ BaseProxy .documentParam ("doc" , true , doc )
111
+ ).responseSingle (true , Format .UNKNOWN )
112
+ .asHandle (new com .marklogic .client .io .InputStreamHandle ());
113
+ }
114
+
115
+ @ Override
116
+ public Stream <com .marklogic .client .io .InputStreamHandle > sendReceiveAnyDocs (Stream <String > uris , Stream <com .marklogic .client .io .InputStreamHandle > docs ) {
117
+ return sendReceiveAnyDocs (
118
+ this .req_sendReceiveAnyDocs .on (this .dbClient ), uris , docs
119
+ );
120
+ }
121
+ private Stream <com .marklogic .client .io .InputStreamHandle > sendReceiveAnyDocs (BaseProxy .DBFunctionRequest request , Stream <String > uris , Stream <com .marklogic .client .io .InputStreamHandle > docs ) {
122
+ return request
123
+ .withParams (
124
+ BaseProxy .atomicParam ("uris" , true , BaseProxy .StringType .fromString (uris )),
125
+ BaseProxy .documentParam ("docs" , true , docs )
126
+ ).responseMultiple (true , Format .UNKNOWN )
127
+ .asStreamOfHandles (null , new com .marklogic .client .io .InputStreamHandle ());
79
128
}
80
129
}
81
130
82
131
return new AnyDocumentBundleImpl (db , serviceDeclaration );
83
132
}
84
133
85
134
/**
86
- * Invokes the sendReceiveDocs operation on the database server
135
+ * Invokes the sendReceiveManyDocs operation on the database server
136
+ *
137
+ * @param uris provides input
138
+ * @param docs provides input
139
+ * @return as output
140
+ */
141
+ Stream <com .marklogic .client .io .InputStreamHandle > sendReceiveManyDocs (Stream <String > uris , Stream <com .marklogic .client .io .InputStreamHandle > docs );
142
+
143
+ /**
144
+ * Invokes the sendReceiveRequiredDoc operation on the database server
145
+ *
146
+ * @param uri provides input
147
+ * @param doc provides input
148
+ * @return as output
149
+ */
150
+ com .marklogic .client .io .InputStreamHandle sendReceiveRequiredDoc (String uri , com .marklogic .client .io .InputStreamHandle doc );
151
+
152
+ /**
153
+ * Invokes the sendReceiveOptionalDoc operation on the database server
154
+ *
155
+ * @param uri provides input
156
+ * @param doc provides input
157
+ * @return as output
158
+ */
159
+ com .marklogic .client .io .InputStreamHandle sendReceiveOptionalDoc (String uri , com .marklogic .client .io .InputStreamHandle doc );
160
+
161
+ /**
162
+ * Invokes the sendReceiveAnyDocs operation on the database server
87
163
*
88
164
* @param uris provides input
89
165
* @param docs provides input
90
166
* @return as output
91
167
*/
92
- Stream <com .marklogic .client .io .InputStreamHandle > sendReceiveDocs (Stream <String > uris , Stream <com .marklogic .client .io .InputStreamHandle > docs );
168
+ Stream <com .marklogic .client .io .InputStreamHandle > sendReceiveAnyDocs (Stream <String > uris , Stream <com .marklogic .client .io .InputStreamHandle > docs );
93
169
94
170
}
0 commit comments