@@ -220,37 +220,73 @@ inline fun <reified T : Any> MongoOperations.group(criteria: Criteria, inputColl
220
220
* @author Sebastien Deleuze
221
221
* @since 2.0
222
222
*/
223
- @Deprecated(" Since 2.2, use the reified variant" , replaceWith = ReplaceWith (" aggregate<T>(aggregation)" ))
224
- inline fun <reified O : Any > MongoOperations.aggregate (aggregation : Aggregation , inputType : KClass <* >): AggregationResults <O > =
225
- aggregate(aggregation, inputType.java, O ::class .java)
223
+ @Deprecated(
224
+ " Since 2.2, use the reified variant" ,
225
+ replaceWith = ReplaceWith (" aggregate<I, O>(aggregation)" )
226
+ )
227
+ inline fun <reified O : Any > MongoOperations.aggregate (
228
+ aggregation : Aggregation ,
229
+ inputType : KClass <* >
230
+ ): AggregationResults <O > =
231
+ aggregate(aggregation, inputType.java, O ::class .java)
232
+
233
+ /* *
234
+ * Extension for [MongoOperations.aggregate] leveraging reified type parameters.
235
+ *
236
+ * @author Mark Paluch
237
+ * @since 3.2
238
+ */
239
+ inline fun <reified I : Any , reified O : Any > MongoOperations.aggregate (aggregation : Aggregation ): AggregationResults <O > =
240
+ aggregate(aggregation, I ::class .java, O ::class .java)
226
241
227
242
/* *
228
243
* Extension for [MongoOperations.aggregate] leveraging reified type parameters.
229
244
*
230
245
* @author Sebastien Deleuze
231
246
* @since 2.0
232
247
*/
233
- inline fun <reified O : Any > MongoOperations.aggregate (aggregation : Aggregation , collectionName : String ): AggregationResults <O > =
234
- aggregate(aggregation, collectionName, O ::class .java)
248
+ inline fun <reified O : Any > MongoOperations.aggregate (
249
+ aggregation : Aggregation ,
250
+ collectionName : String
251
+ ): AggregationResults <O > =
252
+ aggregate(aggregation, collectionName, O ::class .java)
235
253
236
254
/* *
237
255
* Extension for [MongoOperations.aggregateStream] leveraging reified type parameters.
238
256
*
239
257
* @author Sebastien Deleuze
240
258
* @since 2.0
241
259
*/
242
- @Deprecated(" Since 2.2, use the reified variant" , replaceWith = ReplaceWith (" aggregateStream<T>(aggregation)" ))
243
- inline fun <reified O : Any > MongoOperations.aggregateStream (aggregation : Aggregation , inputType : KClass <* >): CloseableIterator <O > =
244
- aggregateStream(aggregation, inputType.java, O ::class .java)
260
+ @Deprecated(
261
+ " Since 2.2, use the reified variant" ,
262
+ replaceWith = ReplaceWith (" aggregateStream<I, O>(aggregation)" )
263
+ )
264
+ inline fun <reified O : Any > MongoOperations.aggregateStream (
265
+ aggregation : Aggregation ,
266
+ inputType : KClass <* >
267
+ ): CloseableIterator <O > =
268
+ aggregateStream(aggregation, inputType.java, O ::class .java)
269
+
270
+ /* *
271
+ * Extension for [MongoOperations.aggregateStream] leveraging reified type parameters.
272
+ *
273
+ * @author Mark Paluch
274
+ * @since 3.2
275
+ */
276
+ inline fun <reified I : Any , reified O : Any > MongoOperations.aggregateStream (aggregation : Aggregation ): CloseableIterator <O > =
277
+ aggregateStream(aggregation, I ::class .java, O ::class .java)
245
278
246
279
/* *
247
280
* Extension for [MongoOperations.aggregateStream] leveraging reified type parameters.
248
281
*
249
282
* @author Sebastien Deleuze
250
283
* @since 2.0
251
284
*/
252
- inline fun <reified O : Any > MongoOperations.aggregateStream (aggregation : Aggregation , collectionName : String ): CloseableIterator <O > =
253
- aggregateStream(aggregation, collectionName, O ::class .java)
285
+ inline fun <reified O : Any > MongoOperations.aggregateStream (
286
+ aggregation : Aggregation ,
287
+ collectionName : String
288
+ ): CloseableIterator <O > =
289
+ aggregateStream(aggregation, collectionName, O ::class .java)
254
290
255
291
/* *
256
292
* Extension for [MongoOperations.mapReduce] leveraging reified type parameters.
0 commit comments