Skip to content

Commit 01cb0ae

Browse files
committed
Fix deprecations in MongoPagingItemReader
Resolves #4552
1 parent 894f9f9 commit 01cb0ae

File tree

1 file changed

+72
-1
lines changed

1 file changed

+72
-1
lines changed

Diff for: spring-batch-infrastructure/src/main/java/org/springframework/batch/item/data/MongoPagingItemReader.java

+72-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,8 +15,14 @@
1515
*/
1616
package org.springframework.batch.item.data;
1717

18+
import java.util.Iterator;
19+
import java.util.List;
20+
import java.util.Map;
21+
1822
import org.springframework.batch.item.ExecutionContext;
1923
import org.springframework.batch.item.ItemReader;
24+
import org.springframework.data.domain.Sort;
25+
import org.springframework.data.mongodb.core.MongoOperations;
2026
import org.springframework.data.mongodb.core.query.Query;
2127
import org.springframework.util.ClassUtils;
2228

@@ -70,4 +76,69 @@ public MongoPagingItemReader() {
7076
setName(ClassUtils.getShortName(MongoPagingItemReader.class));
7177
}
7278

79+
@Override
80+
public void setTemplate(MongoOperations template) {
81+
super.setTemplate(template);
82+
}
83+
84+
@Override
85+
public void setQuery(Query query) {
86+
super.setQuery(query);
87+
}
88+
89+
@Override
90+
public void setQuery(String queryString) {
91+
super.setQuery(queryString);
92+
}
93+
94+
@Override
95+
public void setTargetType(Class<? extends T> type) {
96+
super.setTargetType(type);
97+
}
98+
99+
@Override
100+
public void setParameterValues(List<Object> parameterValues) {
101+
super.setParameterValues(parameterValues);
102+
}
103+
104+
@Override
105+
public void setFields(String fields) {
106+
super.setFields(fields);
107+
}
108+
109+
@Override
110+
public void setSort(Map<String, Sort.Direction> sorts) {
111+
super.setSort(sorts);
112+
}
113+
114+
@Override
115+
public void setCollection(String collection) {
116+
super.setCollection(collection);
117+
}
118+
119+
@Override
120+
public void setHint(String hint) {
121+
super.setHint(hint);
122+
}
123+
124+
@Override
125+
public void afterPropertiesSet() throws Exception {
126+
super.afterPropertiesSet();
127+
}
128+
129+
@Override
130+
protected Iterator<T> doPageRead() {
131+
return super.doPageRead();
132+
}
133+
134+
@Override
135+
protected String replacePlaceholders(String input, List<Object> values) {
136+
return super.replacePlaceholders(input, values);
137+
}
138+
139+
@Override
140+
protected Sort convertToSort(Map<String, Sort.Direction> sorts) {
141+
return super.convertToSort(sorts);
142+
}
143+
73144
}

0 commit comments

Comments
 (0)