Merge pull request #121 from ddebree/cleanup_interfaces

* cleanup_interfaces:
  Cleaned up some interface references
This commit is contained in:
Michael Minella
2013-02-19 09:34:43 -06:00
9 changed files with 27 additions and 26 deletions

View File

@@ -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<String>, ItemStream {
public class TestReader extends AbstractTestComponent implements ItemStreamReader<String> {
private boolean opened = false;

View File

@@ -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<String>, ItemStream {
public class ExampleItemReader implements ItemStreamReader<String> {
private Log logger = LogFactory.getLog(getClass());

View File

@@ -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<String>,
StepExecutionListener {
private class MockRestartableItemReader extends AbstractItemStreamItemReader<String> implements StepExecutionListener {
private boolean getExecutionAttributesCalled = false;

View File

@@ -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.
*
* <p>
@@ -39,8 +39,8 @@ import org.springframework.util.ClassUtils;
* @author Dave Syer
* @since 2.0
*/
public abstract class AbstractPagingItemReader<T> extends AbstractItemCountingItemStreamItemReader<T> implements
InitializingBean {
public abstract class AbstractPagingItemReader<T> extends AbstractItemCountingItemStreamItemReader<T>
implements InitializingBean {
protected Log logger = LogFactory.getLog(getClass());

View File

@@ -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<T> extends AbstractItemCountingItemStreamItemReader<T> implements ItemStream,
InitializingBean {
public class HibernateCursorItemReader<T> extends AbstractItemCountingItemStreamItemReader<T>
implements InitializingBean {
private HibernateItemReaderHelper<T> helper = new HibernateItemReaderHelper<T>();

View File

@@ -58,7 +58,8 @@ import org.springframework.util.ClassUtils;
*
* @since 2.1
*/
public class HibernatePagingItemReader<T> extends AbstractPagingItemReader<T> implements ItemStream, InitializingBean {
public class HibernatePagingItemReader<T> extends AbstractPagingItemReader<T>
implements InitializingBean {
private HibernateItemReaderHelper<T> helper = new HibernateItemReaderHelper<T>();

View File

@@ -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<T> implements ItemReader<T>, ItemStream {
public class MultiResourceItemReader<T> implements ItemStreamReader<T> {
private static final Log logger = LogFactory.getLog(MultiResourceItemReader.class);

View File

@@ -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<T> extends ExecutionContextUserSupport implements ItemWriter<T>, ItemStream {
public class MultiResourceItemWriter<T> extends ExecutionContextUserSupport implements ItemStreamWriter<T> {
final static private String RESOURCE_INDEX_KEY = "resource.index";

View File

@@ -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<T> extends ItemStream, ItemWriter<T> {
public interface ResourceAwareItemWriterItemStream<T> extends ItemStreamWriter<T> {
void setResource(Resource resource);
}