@@ -220,37 +220,73 @@ inline fun <reified T : Any> MongoOperations.group(criteria: Criteria, inputColl
220220 * @author Sebastien Deleuze
221221 * @since 2.0
222222 */
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)
226241
227242/* *
228243 * Extension for [MongoOperations.aggregate] leveraging reified type parameters.
229244 *
230245 * @author Sebastien Deleuze
231246 * @since 2.0
232247 */
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)
235253
236254/* *
237255 * Extension for [MongoOperations.aggregateStream] leveraging reified type parameters.
238256 *
239257 * @author Sebastien Deleuze
240258 * @since 2.0
241259 */
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)
245278
246279/* *
247280 * Extension for [MongoOperations.aggregateStream] leveraging reified type parameters.
248281 *
249282 * @author Sebastien Deleuze
250283 * @since 2.0
251284 */
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)
254290
255291/* *
256292 * Extension for [MongoOperations.mapReduce] leveraging reified type parameters.
0 commit comments