diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/TestReader.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/TestReader.java index 15b9d8ae6..630725c1a 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/TestReader.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/TestReader.java @@ -3,15 +3,13 @@ package org.springframework.batch.core.configuration.xml; import java.util.ArrayList; import java.util.Collections; import java.util.List; - import org.springframework.batch.item.ExecutionContext; -import org.springframework.batch.item.ItemReader; -import org.springframework.batch.item.ItemStream; import org.springframework.batch.item.ItemStreamException; +import org.springframework.batch.item.ItemStreamReader; import org.springframework.batch.item.ParseException; import org.springframework.batch.item.UnexpectedInputException; -public class TestReader extends AbstractTestComponent implements ItemReader, ItemStream { +public class TestReader extends AbstractTestComponent implements ItemStreamReader { private boolean opened = false; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/partition/ExampleItemReader.java b/spring-batch-core/src/test/java/org/springframework/batch/core/partition/ExampleItemReader.java index 6c17abb9e..216a80175 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/partition/ExampleItemReader.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/partition/ExampleItemReader.java @@ -3,14 +3,13 @@ package org.springframework.batch.core.partition; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.batch.item.ExecutionContext; -import org.springframework.batch.item.ItemReader; -import org.springframework.batch.item.ItemStream; import org.springframework.batch.item.ItemStreamException; +import org.springframework.batch.item.ItemStreamReader; /** - * {@link ItemReader} with hard-coded input data. + * {@link ItemStreamReader} with hard-coded input data. */ -public class ExampleItemReader implements ItemReader, ItemStream { +public class ExampleItemReader implements ItemStreamReader { private Log logger = LogFactory.getLog(getClass()); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/TaskletStepTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/TaskletStepTests.java index b0425e43e..a019bac2a 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/TaskletStepTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/TaskletStepTests.java @@ -55,6 +55,7 @@ import org.springframework.batch.item.ItemStream; import org.springframework.batch.item.ItemStreamException; import org.springframework.batch.item.ItemStreamSupport; import org.springframework.batch.item.ItemWriter; +import org.springframework.batch.item.support.AbstractItemStreamItemReader; import org.springframework.batch.item.support.ListItemReader; import org.springframework.batch.repeat.RepeatStatus; import org.springframework.batch.repeat.policy.DefaultResultCompletionPolicy; @@ -919,8 +920,7 @@ public class TaskletStepTests { } } - private class MockRestartableItemReader extends ItemStreamSupport implements ItemReader, - StepExecutionListener { + private class MockRestartableItemReader extends AbstractItemStreamItemReader implements StepExecutionListener { private boolean getExecutionAttributesCalled = false; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/AbstractPagingItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/AbstractPagingItemReader.java index 81dd39a35..0206f17e2 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/AbstractPagingItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/AbstractPagingItemReader.java @@ -25,7 +25,7 @@ import org.springframework.util.Assert; import org.springframework.util.ClassUtils; /** - * Abstract {@link org.springframework.batch.item.ItemReader} for to extend when + * Abstract {@link org.springframework.batch.item.ItemStreamReader} for to extend when * reading database records in a paging fashion. * *

@@ -39,8 +39,8 @@ import org.springframework.util.ClassUtils; * @author Dave Syer * @since 2.0 */ -public abstract class AbstractPagingItemReader extends AbstractItemCountingItemStreamItemReader implements -InitializingBean { +public abstract class AbstractPagingItemReader extends AbstractItemCountingItemStreamItemReader + implements InitializingBean { protected Log logger = LogFactory.getLog(getClass()); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateCursorItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateCursorItemReader.java index 9d0b8bfca..3b7b8692b 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateCursorItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernateCursorItemReader.java @@ -22,8 +22,7 @@ import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.StatelessSession; import org.springframework.batch.item.ExecutionContext; -import org.springframework.batch.item.ItemReader; -import org.springframework.batch.item.ItemStream; +import org.springframework.batch.item.ItemStreamReader; import org.springframework.batch.item.ItemStreamException; import org.springframework.batch.item.database.orm.HibernateQueryProvider; import org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader; @@ -32,7 +31,7 @@ import org.springframework.util.Assert; import org.springframework.util.ClassUtils; /** - * {@link ItemReader} for reading database records built on top of Hibernate. It + * {@link ItemStreamReader} for reading database records built on top of Hibernate. It * executes the HQL query when initialized iterates over the result set as * {@link #read()} method is called, returning an object corresponding to * current row. The query can be set directly using @@ -55,8 +54,8 @@ import org.springframework.util.ClassUtils; * @author Robert Kasanicky * @author Dave Syer */ -public class HibernateCursorItemReader extends AbstractItemCountingItemStreamItemReader implements ItemStream, -InitializingBean { +public class HibernateCursorItemReader extends AbstractItemCountingItemStreamItemReader + implements InitializingBean { private HibernateItemReaderHelper helper = new HibernateItemReaderHelper(); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernatePagingItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernatePagingItemReader.java index b4c650008..68a4f6057 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernatePagingItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/HibernatePagingItemReader.java @@ -58,7 +58,8 @@ import org.springframework.util.ClassUtils; * * @since 2.1 */ -public class HibernatePagingItemReader extends AbstractPagingItemReader implements ItemStream, InitializingBean { +public class HibernatePagingItemReader extends AbstractPagingItemReader + implements InitializingBean { private HibernateItemReaderHelper helper = new HibernateItemReaderHelper(); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemReader.java index 5de23a0fe..af3918e15 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemReader.java @@ -21,7 +21,12 @@ import java.util.Comparator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.batch.item.*; +import org.springframework.batch.item.ExecutionContext; +import org.springframework.batch.item.ItemStreamException; +import org.springframework.batch.item.ItemStreamReader; +import org.springframework.batch.item.ParseException; +import org.springframework.batch.item.ResourceAware; +import org.springframework.batch.item.UnexpectedInputException; import org.springframework.batch.item.util.ExecutionContextUserSupport; import org.springframework.core.io.Resource; import org.springframework.util.Assert; @@ -38,7 +43,7 @@ import org.springframework.util.ClassUtils; * @author Robert Kasanicky * @author Lucas Ward */ -public class MultiResourceItemReader implements ItemReader, ItemStream { +public class MultiResourceItemReader implements ItemStreamReader { private static final Log logger = LogFactory.getLog(MultiResourceItemReader.class); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemWriter.java index 45b535cf0..553a6f06d 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemWriter.java @@ -19,11 +19,9 @@ package org.springframework.batch.item.file; import java.io.File; import java.io.IOException; import java.util.List; - import org.springframework.batch.item.ExecutionContext; -import org.springframework.batch.item.ItemStream; import org.springframework.batch.item.ItemStreamException; -import org.springframework.batch.item.ItemWriter; +import org.springframework.batch.item.ItemStreamWriter; import org.springframework.batch.item.util.ExecutionContextUserSupport; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.Resource; @@ -44,7 +42,7 @@ import org.springframework.util.ClassUtils; * * @author Robert Kasanicky */ -public class MultiResourceItemWriter extends ExecutionContextUserSupport implements ItemWriter, ItemStream { +public class MultiResourceItemWriter extends ExecutionContextUserSupport implements ItemStreamWriter { final static private String RESOURCE_INDEX_KEY = "resource.index"; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/ResourceAwareItemWriterItemStream.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/ResourceAwareItemWriterItemStream.java index 91be8a6e4..000fd873e 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/ResourceAwareItemWriterItemStream.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/ResourceAwareItemWriterItemStream.java @@ -17,6 +17,7 @@ package org.springframework.batch.item.file; import org.springframework.batch.item.ItemStream; +import org.springframework.batch.item.ItemStreamWriter; import org.springframework.batch.item.ItemWriter; import org.springframework.core.io.Resource; @@ -26,7 +27,7 @@ import org.springframework.core.io.Resource; * * @author Robert Kasanicky */ -public interface ResourceAwareItemWriterItemStream extends ItemStream, ItemWriter { +public interface ResourceAwareItemWriterItemStream extends ItemStreamWriter { void setResource(Resource resource); }