Skip to content

Commit

Permalink
Fix deprecations in MongoPagingItemReader
Browse files Browse the repository at this point in the history
Resolves #4552
  • Loading branch information
fmbenhassine committed Feb 19, 2024
1 parent b98d1b1 commit 3c46ab8
Showing 1 changed file with 72 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -15,8 +15,14 @@
*/
package org.springframework.batch.item.data;

import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemReader;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.util.ClassUtils;

Expand Down Expand Up @@ -70,4 +76,69 @@ public MongoPagingItemReader() {
setName(ClassUtils.getShortName(MongoPagingItemReader.class));
}

@Override
public void setTemplate(MongoOperations template) {
super.setTemplate(template);
}

@Override
public void setQuery(Query query) {
super.setQuery(query);
}

@Override
public void setQuery(String queryString) {
super.setQuery(queryString);
}

@Override
public void setTargetType(Class<? extends T> type) {
super.setTargetType(type);
}

@Override
public void setParameterValues(List<Object> parameterValues) {
super.setParameterValues(parameterValues);
}

@Override
public void setFields(String fields) {
super.setFields(fields);
}

@Override
public void setSort(Map<String, Sort.Direction> sorts) {
super.setSort(sorts);
}

@Override
public void setCollection(String collection) {
super.setCollection(collection);
}

@Override
public void setHint(String hint) {
super.setHint(hint);
}

@Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
}

@Override
protected Iterator<T> doPageRead() {
return super.doPageRead();
}

@Override
protected String replacePlaceholders(String input, List<Object> values) {
return super.replacePlaceholders(input, values);
}

@Override
protected Sort convertToSort(Map<String, Sort.Direction> sorts) {
return super.convertToSort(sorts);
}

}

0 comments on commit 3c46ab8

Please sign in to comment.