BATCH-167: Renamed CompositeKeyRestartDataConverter to just RestartDataConverter.
This commit is contained in:
@@ -20,6 +20,7 @@ import java.util.List;
|
||||
|
||||
import org.springframework.batch.io.support.AbstractDrivingQueryInputSource;
|
||||
import org.springframework.batch.restart.RestartData;
|
||||
import org.springframework.jdbc.core.ColumnMapRowMapper;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -42,13 +43,13 @@ public class CompositeKeySqlDrivingQueryInputSource extends
|
||||
|
||||
private JdbcTemplate jdbcTemplate;
|
||||
|
||||
private RowMapper keyMapper;
|
||||
private RowMapper keyMapper = new ColumnMapRowMapper();
|
||||
|
||||
private String drivingQuery;
|
||||
|
||||
private String restartQuery;
|
||||
|
||||
private CompositeKeyRestartDataConverter restartDataConverter;
|
||||
private RestartDataConverter restartDataConverter;
|
||||
|
||||
public CompositeKeySqlDrivingQueryInputSource() {
|
||||
super();
|
||||
@@ -110,7 +111,7 @@ public class CompositeKeySqlDrivingQueryInputSource extends
|
||||
* @param restartDataConverter
|
||||
*/
|
||||
public void setRestartDataConverter(
|
||||
CompositeKeyRestartDataConverter restartDataConverter) {
|
||||
RestartDataConverter restartDataConverter) {
|
||||
this.restartDataConverter = restartDataConverter;
|
||||
}
|
||||
|
||||
@@ -130,6 +131,5 @@ public class CompositeKeySqlDrivingQueryInputSource extends
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
Assert.notNull(jdbcTemplate, "The JdbcTemplate must not be null.");
|
||||
Assert.hasText(drivingQuery, "The DrivingQuery must not be null or empty.");
|
||||
Assert.notNull(keyMapper, "The key RowMapper must not be null.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.batch.restart.RestartData;
|
||||
* @author Lucas Ward
|
||||
*
|
||||
*/
|
||||
public interface CompositeKeyRestartDataConverter {
|
||||
public interface RestartDataConverter {
|
||||
|
||||
/**
|
||||
* Given the provided composite key, return a RestartData representation.
|
||||
@@ -47,7 +47,7 @@ public class CompositeKeySqlDrivingQueryInputSourceIntegrationTests extends
|
||||
return fooInputSource;
|
||||
}
|
||||
|
||||
private static class FooRestartDataConverter implements CompositeKeyRestartDataConverter{
|
||||
private static class FooRestartDataConverter implements RestartDataConverter{
|
||||
|
||||
private static final String ID_RESTART_KEY = "FooRestartDataConverter.id";
|
||||
private static final String VALUE_RESTART_KEY = "FooRestartDataConverter.value";
|
||||
|
||||
Reference in New Issue
Block a user