RESOLVED - issue BATCH-789: Remove mark/reset from ItemReader

Removed unneeded exception classes
This commit is contained in:
dsyer
2008-08-21 12:50:11 +00:00
parent c52b277358
commit a1030c2609
13 changed files with 35 additions and 259 deletions

View File

@@ -3,8 +3,6 @@ package org.springframework.batch.sample.domain.trade.internal;
import java.math.BigDecimal;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.MarkFailedException;
import org.springframework.batch.item.ResetFailedException;
import org.springframework.batch.sample.domain.trade.Trade;
/**
@@ -18,8 +16,6 @@ public class GeneratingTradeItemReader implements ItemReader<Trade> {
private int counter = 0;
private int marked;
public Trade read() throws Exception {
if (counter < limit) {
counter++;
@@ -47,19 +43,5 @@ public class GeneratingTradeItemReader implements ItemReader<Trade> {
public int getLimit() {
return limit;
}
/* (non-Javadoc)
* @see org.springframework.batch.item.ItemStream#mark()
*/
public void mark() throws MarkFailedException {
this.marked = this.counter;
}
/* (non-Javadoc)
* @see org.springframework.batch.item.ItemStream#reset()
*/
public void reset() throws ResetFailedException {
this.counter = this.marked;
}
}