IN PROGRESS - issue BATCH-476: samples cleanup
http://jira.springframework.org/browse/BATCH-476
This commit is contained in:
@@ -53,8 +53,8 @@ public class FlatFileCustomerCreditDao implements CustomerCreditDao,
|
||||
this.separator = separator;
|
||||
}
|
||||
|
||||
public void setOutputSource(ItemWriter outputSource) {
|
||||
this.itemWriter = outputSource;
|
||||
public void setItemWriter(ItemWriter itemWriter) {
|
||||
this.itemWriter = itemWriter;
|
||||
}
|
||||
|
||||
public void open(ExecutionContext executionContext) throws Exception {
|
||||
|
||||
@@ -38,11 +38,8 @@ public class CustomerCreditUpdateWriter extends AbstractItemWriter {
|
||||
this.creditFilter = creditFilter;
|
||||
}
|
||||
|
||||
public void setWriter(CustomerCreditDao writer) {
|
||||
this.dao = writer;
|
||||
public void setDao(CustomerCreditDao dao) {
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
public void close() throws Exception {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,10 +41,4 @@ public class CustomerUpdateWriter extends AbstractItemWriter {
|
||||
public void setDao(JdbcCustomerDebitDao outputSource) {
|
||||
this.dao = outputSource;
|
||||
}
|
||||
|
||||
public void close() {
|
||||
}
|
||||
|
||||
public void init() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,27 +15,16 @@
|
||||
*/
|
||||
package org.springframework.batch.sample.item.writer;
|
||||
|
||||
import org.springframework.batch.item.ClearFailedException;
|
||||
import org.springframework.batch.item.FlushFailedException;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.item.AbstractItemWriter;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
public class DummyItemWriter implements ItemWriter {
|
||||
public class DummyItemWriter extends AbstractItemWriter {
|
||||
|
||||
public void write(Object item) throws Exception {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
public void close() throws Exception {
|
||||
}
|
||||
|
||||
public void clear() throws ClearFailedException {
|
||||
}
|
||||
|
||||
public void flush() throws FlushFailedException {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,9 +36,4 @@ public class PersonWriter extends AbstractItemWriter {
|
||||
log.debug("Processing: " + data);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
}
|
||||
|
||||
public void init() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.springframework.batch.sample.domain.Player;
|
||||
|
||||
public class PlayerItemWriter extends AbstractItemWriter {
|
||||
|
||||
PlayerDao playerDao;
|
||||
private PlayerDao playerDao;
|
||||
|
||||
public void write(Object data) throws Exception {
|
||||
playerDao.savePlayer((Player)data);
|
||||
@@ -15,7 +15,5 @@ public class PlayerItemWriter extends AbstractItemWriter {
|
||||
public void setPlayerDao(PlayerDao playerDao) {
|
||||
this.playerDao = playerDao;
|
||||
}
|
||||
|
||||
public void close() throws Exception {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -84,9 +84,6 @@ public class StagingItemWriter extends JdbcDaoSupport implements StepListener, I
|
||||
});
|
||||
}
|
||||
|
||||
public void close() throws Exception {
|
||||
}
|
||||
|
||||
public void clear() throws ClearFailedException {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user