[BATCH-430] Incremental commit of io package moving

This commit is contained in:
nebhale
2008-03-07 12:55:27 +00:00
parent 8c2901093e
commit 48195945ee
230 changed files with 529 additions and 514 deletions

View File

@@ -18,7 +18,6 @@ package org.springframework.batch.item;
import junit.framework.TestCase;
import org.springframework.batch.item.reader.AbstractItemReader;
public class ItemProviderTests extends TestCase {

View File

@@ -1,10 +1,10 @@
package org.springframework.batch.io.support;
package org.springframework.batch.item.database;
import org.springframework.batch.io.Skippable;
import org.springframework.batch.io.sample.domain.Foo;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.Skippable;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
import org.springframework.util.Assert;
@@ -28,7 +28,7 @@ public abstract class AbstractDataSourceItemReaderIntegrationTests extends
protected abstract ItemReader createItemReader() throws Exception;
protected String[] getConfigLocations() {
return new String[] { "org/springframework/batch/io/sql/data-source-context.xml" };
return new String[] { "org/springframework/batch/item/database/data-source-context.xml" };
}
/*

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.sql;
package org.springframework.batch.item.database;
import org.springframework.batch.io.sample.domain.Foo;
import org.springframework.batch.item.ExecutionContext;
@@ -27,7 +27,7 @@ public abstract class AbstractJdbcItemReaderIntegrationTests extends AbstractTra
protected abstract ItemReader createItemReader() throws Exception;
protected String[] getConfigLocations(){
return new String[] { "org/springframework/batch/io/sql/data-source-context.xml"};
return new String[] { "org/springframework/batch/item/database/data-source-context.xml"};
}
protected void onSetUp()throws Exception{

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.support;
package org.springframework.batch.item.database;
import java.sql.PreparedStatement;
import java.sql.SQLException;
@@ -27,6 +27,8 @@ import java.util.Map;
import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.item.database.BatchSqlUpdateItemWriter;
import org.springframework.batch.item.database.ItemPreparedStatementSetter;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;
@@ -98,7 +100,7 @@ public class BatchSqlUpdateItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.BatchSqlUpdateItemWriter#afterPropertiesSet()}.
* {@link org.springframework.batch.item.database.BatchSqlUpdateItemWriter#afterPropertiesSet()}.
* @throws Exception
*/
public void testAfterPropertiesSet() throws Exception {
@@ -114,7 +116,7 @@ public class BatchSqlUpdateItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.BatchSqlUpdateItemWriter#write(java.lang.Object)}.
* {@link org.springframework.batch.item.database.BatchSqlUpdateItemWriter#write(java.lang.Object)}.
* @throws Exception
*/
public void testWrite() throws Exception {
@@ -126,7 +128,7 @@ public class BatchSqlUpdateItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.BatchSqlUpdateItemWriter#clear()}.
* {@link org.springframework.batch.item.database.BatchSqlUpdateItemWriter#clear()}.
*/
public void testClear() {
assertTrue(TransactionSynchronizationManager.hasResource(BatchSqlUpdateItemWriter.ITEMS_PROCESSED));
@@ -136,7 +138,7 @@ public class BatchSqlUpdateItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.BatchSqlUpdateItemWriter#flush()}.
* {@link org.springframework.batch.item.database.BatchSqlUpdateItemWriter#flush()}.
*/
public void testFlush() {
assertTrue(TransactionSynchronizationManager.hasResource(BatchSqlUpdateItemWriter.ITEMS_PROCESSED));
@@ -148,7 +150,7 @@ public class BatchSqlUpdateItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.BatchSqlUpdateItemWriter#flush()}.
* {@link org.springframework.batch.item.database.BatchSqlUpdateItemWriter#flush()}.
* @throws Exception
*/
public void testWriteAndFlush() throws Exception {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.driving;
package org.springframework.batch.item.database;
import java.sql.ResultSet;
import java.sql.SQLException;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.driving;
package org.springframework.batch.item.database;
import java.util.ArrayList;
import java.util.List;
@@ -11,6 +11,8 @@ import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.NoWorkFoundException;
import org.springframework.batch.item.database.DrivingQueryItemReader;
import org.springframework.batch.item.database.KeyGenerator;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.transaction.support.TransactionSynchronizationManager;
import org.springframework.util.Assert;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.driving;
package org.springframework.batch.item.database;
import org.springframework.batch.io.sample.domain.Foo;
import org.springframework.jdbc.core.JdbcTemplate;

View File

@@ -1,8 +1,9 @@
package org.springframework.batch.io.driving;
package org.springframework.batch.item.database;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.database.DrivingQueryItemReader;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.jdbc.core.JdbcTemplate;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.driving;
package org.springframework.batch.item.database;
import java.sql.ResultSet;
import java.sql.SQLException;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.support;
package org.springframework.batch.item.database;
import java.util.ArrayList;
import java.util.Iterator;
@@ -25,6 +25,7 @@ import junit.framework.TestCase;
import org.springframework.batch.item.ClearFailedException;
import org.springframework.batch.item.FlushFailedException;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.database.HibernateAwareItemWriter;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;
import org.springframework.dao.DataAccessException;
@@ -93,7 +94,7 @@ public class HibernateAwareItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.HibernateAwareItemWriter#initDao()}.
* {@link org.springframework.batch.item.database.HibernateAwareItemWriter#initDao()}.
*
* @throws Exception
*/
@@ -111,7 +112,7 @@ public class HibernateAwareItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.HibernateAwareItemWriter#initDao()}.
* {@link org.springframework.batch.item.database.HibernateAwareItemWriter#initDao()}.
*
* @throws Exception
*/
@@ -121,7 +122,7 @@ public class HibernateAwareItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.HibernateAwareItemWriter#write(java.lang.Object)}.
* {@link org.springframework.batch.item.database.HibernateAwareItemWriter#write(java.lang.Object)}.
* @throws Exception
*/
public void testWrite() throws Exception {
@@ -132,7 +133,7 @@ public class HibernateAwareItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.HibernateAwareItemWriter#write(java.lang.Object)}.
* {@link org.springframework.batch.item.database.HibernateAwareItemWriter#write(java.lang.Object)}.
*/
public void testFlushWithFailure() throws Exception{
final RuntimeException ex = new RuntimeException("bar");
@@ -151,7 +152,7 @@ public class HibernateAwareItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.HibernateAwareItemWriter#write(java.lang.Object)}.
* {@link org.springframework.batch.item.database.HibernateAwareItemWriter#write(java.lang.Object)}.
* @throws Exception
*/
public void testWriteAndFlushWithFailure() throws Exception {
@@ -183,7 +184,7 @@ public class HibernateAwareItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.HibernateAwareItemWriter#close(org.springframework.batch.repeat.RepeatContext)}.
* {@link org.springframework.batch.item.database.HibernateAwareItemWriter#close(org.springframework.batch.repeat.RepeatContext)}.
*/
public void testFlush() throws Exception{
writer.flush();
@@ -195,7 +196,7 @@ public class HibernateAwareItemWriterTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.support.HibernateAwareItemWriter#close(org.springframework.batch.repeat.RepeatContext)}.
* {@link org.springframework.batch.item.database.HibernateAwareItemWriter#close(org.springframework.batch.repeat.RepeatContext)}.
*/
public void testClear() throws Exception{
writer.clear();

View File

@@ -1,10 +1,10 @@
package org.springframework.batch.io.cursor;
package org.springframework.batch.item.database;
import org.hibernate.SessionFactory;
import org.hibernate.StatelessSession;
import org.springframework.batch.io.support.AbstractDataSourceItemReaderIntegrationTests;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.database.HibernateCursorItemReader;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.orm.hibernate3.LocalSessionFactoryBean;

View File

@@ -1,6 +1,7 @@
package org.springframework.batch.io.cursor;
package org.springframework.batch.item.database;
import org.hibernate.Session;
import org.springframework.batch.item.database.HibernateCursorItemReader;
/**
* Tests for {@link HibernateCursorItemReader} using standard hibernate {@link Session}.

View File

@@ -1,8 +1,8 @@
package org.springframework.batch.io.driving;
package org.springframework.batch.item.database;
import org.springframework.batch.io.driving.support.IbatisKeyGenerator;
import org.springframework.batch.io.support.AbstractDataSourceItemReaderIntegrationTests;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.database.IbatisDrivingQueryItemReader;
import org.springframework.batch.item.database.support.IbatisKeyGenerator;
import org.springframework.core.io.ClassPathResource;
import org.springframework.orm.ibatis.SqlMapClientFactoryBean;

View File

@@ -1,8 +1,7 @@
package org.springframework.batch.io.cursor;
package org.springframework.batch.item.database;
import org.springframework.batch.io.driving.FooRowMapper;
import org.springframework.batch.io.support.AbstractDataSourceItemReaderIntegrationTests;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.database.JdbcCursorItemReader;
/**
* Tests for {@link JdbcCursorItemReader}

View File

@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.driving;
package org.springframework.batch.item.database;
import org.springframework.batch.io.driving.support.MultipleColumnJdbcKeyGenerator;
import org.springframework.batch.io.sql.AbstractJdbcItemReaderIntegrationTests;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.database.DrivingQueryItemReader;
import org.springframework.batch.item.database.support.MultipleColumnJdbcKeyGenerator;
/**
* @author Lucas Ward

View File

@@ -1,8 +1,8 @@
package org.springframework.batch.io.driving;
package org.springframework.batch.item.database;
import org.springframework.batch.io.driving.support.SingleColumnJdbcKeyGenerator;
import org.springframework.batch.io.sql.AbstractJdbcItemReaderIntegrationTests;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.database.DrivingQueryItemReader;
import org.springframework.batch.item.database.support.SingleColumnJdbcKeyGenerator;
public class SingleColumnJdbcDrivingQueryItemReaderIntegrationTests extends AbstractJdbcItemReaderIntegrationTests {

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.driving;
package org.springframework.batch.item.database;
import java.sql.ResultSet;
import java.sql.SQLException;

View File

@@ -1,7 +1,7 @@
/**
*
*/
package org.springframework.batch.io.driving.support;
package org.springframework.batch.item.database.support;
import java.sql.PreparedStatement;
import java.util.HashMap;
@@ -12,6 +12,7 @@ import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.database.support.ColumnMapExecutionContextRowMapper;
import org.springframework.core.CollectionFactory;
import org.springframework.jdbc.core.PreparedStatementSetter;

View File

@@ -1,7 +1,7 @@
/**
*
*/
package org.springframework.batch.io.driving.support;
package org.springframework.batch.item.database.support;
import java.sql.ResultSet;
import java.sql.SQLException;
@@ -12,6 +12,9 @@ import java.util.Properties;
import java.util.Map.Entry;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.database.support.ColumnMapExecutionContextRowMapper;
import org.springframework.batch.item.database.support.ExecutionContextRowMapper;
import org.springframework.batch.item.database.support.MultipleColumnJdbcKeyGenerator;
import org.springframework.core.CollectionFactory;
import org.springframework.jdbc.core.PreparedStatementSetter;
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
@@ -27,7 +30,7 @@ public class MultipleColumnJdbcKeyGeneratorIntegrationTests extends AbstractTran
ExecutionContext executionContext;
protected String[] getConfigLocations(){
return new String[] { "org/springframework/batch/io/sql/data-source-context.xml"};
return new String[] { "org/springframework/batch/item/database/data-source-context.xml"};
}
protected void onSetUpBeforeTransaction() throws Exception {

View File

@@ -1,8 +1,9 @@
package org.springframework.batch.io.driving.support;
package org.springframework.batch.item.database.support;
import java.util.List;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.database.support.SingleColumnJdbcKeyGenerator;
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
/**
@@ -17,7 +18,7 @@ public class SingleColumnJdbcKeyGeneratorIntegrationTests extends AbstractTransa
ExecutionContext executionContext;
protected String[] getConfigLocations(){
return new String[] { "org/springframework/batch/io/sql/data-source-context.xml"};
return new String[] { "org/springframework/batch/item/database/data-source-context.xml"};
}

View File

@@ -14,15 +14,15 @@
* limitations under the License.
*/
package org.springframework.batch.io.file;
package org.springframework.batch.item.file;
import java.math.BigDecimal;
import java.text.ParseException;
import junit.framework.TestCase;
import org.springframework.batch.io.file.mapping.DefaultFieldSet;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
public class FieldSetTests extends TestCase {
FieldSet fieldSet;

View File

@@ -14,17 +14,17 @@
* limitations under the License.
*/
package org.springframework.batch.io.file;
package org.springframework.batch.item.file;
import java.io.IOException;
import junit.framework.TestCase;
import org.springframework.batch.io.file.mapping.DefaultFieldSet;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.io.file.mapping.FieldSetMapper;
import org.springframework.batch.io.file.transform.LineTokenizer;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.transform.LineTokenizer;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.Resource;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file;
package org.springframework.batch.item.file;
import java.io.IOException;
import java.io.InputStream;
@@ -22,15 +22,15 @@ import java.io.InputStream;
import junit.framework.TestCase;
import org.springframework.batch.io.exception.FlatFileParsingException;
import org.springframework.batch.io.file.mapping.DefaultFieldSet;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.io.file.mapping.FieldSetMapper;
import org.springframework.batch.io.file.separator.DefaultRecordSeparatorPolicy;
import org.springframework.batch.io.file.transform.DelimitedLineTokenizer;
import org.springframework.batch.io.file.transform.LineTokenizer;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.ReaderNotOpenException;
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.separator.DefaultRecordSeparatorPolicy;
import org.springframework.batch.item.file.transform.DelimitedLineTokenizer;
import org.springframework.batch.item.file.transform.LineTokenizer;
import org.springframework.core.io.AbstractResource;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.Resource;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file;
package org.springframework.batch.item.file;
import java.io.BufferedReader;
import java.io.File;
@@ -23,11 +23,11 @@ import java.io.IOException;
import junit.framework.TestCase;
import org.springframework.batch.io.file.mapping.DefaultFieldSet;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.io.file.mapping.FieldSetCreator;
import org.springframework.batch.io.file.mapping.PassThroughFieldSetMapper;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSetCreator;
import org.springframework.batch.item.file.mapping.PassThroughFieldSetMapper;
import org.springframework.core.io.FileSystemResource;
import org.springframework.transaction.support.TransactionSynchronizationManager;

View File

@@ -14,17 +14,16 @@
* limitations under the License.
*/
package org.springframework.batch.io.file;
package org.springframework.batch.item.file;
import java.io.IOException;
import java.io.InputStream;
import junit.framework.TestCase;
import org.springframework.batch.io.file.separator.ResourceLineReader;
import org.springframework.batch.io.file.separator.SuffixRecordSeparatorPolicy;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.UnexpectedInputException;
import org.springframework.batch.item.file.separator.ResourceLineReader;
import org.springframework.batch.item.file.separator.SuffixRecordSeparatorPolicy;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.InputStreamResource;
import org.springframework.core.io.Resource;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.mapping;
package org.springframework.batch.item.file.mapping;
import java.text.NumberFormat;
import java.util.ArrayList;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.file.mapping;
package org.springframework.batch.item.file.mapping;
import junit.framework.TestCase;
@@ -27,7 +27,7 @@ public class PassThroughFieldSetMapperTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.mapping.PassThroughFieldSetMapper#mapLine(org.springframework.batch.io.file.mapping.FieldSet)}.
* {@link org.springframework.batch.item.file.mapping.PassThroughFieldSetMapper#mapLine(org.springframework.batch.item.file.mapping.FieldSet)}.
*/
public void testMapLine() {
FieldSet fieldSet = new DefaultFieldSet(new String[] { "foo", "bar" });
@@ -36,7 +36,7 @@ public class PassThroughFieldSetMapperTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.mapping.PassThroughFieldSetMapper#mapItem(java.lang.Object)}.
* {@link org.springframework.batch.item.file.mapping.PassThroughFieldSetMapper#mapItem(java.lang.Object)}.
*/
public void testUnmapItemAsFieldSet() {
FieldSet fieldSet = new DefaultFieldSet(new String[] { "foo", "bar" });
@@ -45,7 +45,7 @@ public class PassThroughFieldSetMapperTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.mapping.PassThroughFieldSetMapper#mapItem(java.lang.Object)}.
* {@link org.springframework.batch.item.file.mapping.PassThroughFieldSetMapper#mapItem(java.lang.Object)}.
*/
public void testUnmapItemAsString() {
assertEquals(new DefaultFieldSet(new String[] { "foo" }), mapper.mapItem("foo"));
@@ -53,7 +53,7 @@ public class PassThroughFieldSetMapperTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.mapping.PassThroughFieldSetMapper#mapItem(java.lang.Object)}.
* {@link org.springframework.batch.item.file.mapping.PassThroughFieldSetMapper#mapItem(java.lang.Object)}.
*/
public void testUnmapItemAsNonString() {
Object object = new Object();

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.mapping;
package org.springframework.batch.item.file.mapping;
import junit.framework.TestCase;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.mapping;
package org.springframework.batch.item.file.mapping;
import java.math.BigDecimal;
import java.util.Date;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.separator;
package org.springframework.batch.item.file.separator;
import junit.framework.TestCase;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.separator;
package org.springframework.batch.item.file.separator;
import junit.framework.TestCase;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.separator;
package org.springframework.batch.item.file.separator;
import junit.framework.TestCase;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import java.util.List;

View File

@@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import junit.framework.TestCase;
import org.springframework.batch.io.file.mapping.DefaultFieldSet;
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
/**
* Unit tests for {@link DelimitedLineAggregator}

View File

@@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import junit.framework.TestCase;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
public class DelimitedLineTokenizerTests extends TestCase {

View File

@@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import junit.framework.TestCase;
import org.springframework.batch.io.file.mapping.DefaultFieldSet;
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
/**
* Unit tests for {@link FixedLengthLineAggregator}

View File

@@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import junit.framework.TestCase;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
public class FixedLengthTokenizerTests extends TestCase {

View File

@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import junit.framework.TestCase;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
/**
* @author Dave Syer
@@ -28,7 +28,7 @@ public class LineAggregatorItemTransformerTests extends TestCase {
private LineAggregatorItemTransformer transformer = new LineAggregatorItemTransformer();
/**
* Test method for {@link org.springframework.batch.io.file.transform.LineAggregatorItemTransformer#setAggregator(org.springframework.batch.io.file.transform.LineAggregator)}.
* Test method for {@link org.springframework.batch.item.file.transform.LineAggregatorItemTransformer#setAggregator(org.springframework.batch.item.file.transform.LineAggregator)}.
* @throws Exception
*/
public void testSetAggregator() throws Exception {
@@ -42,7 +42,7 @@ public class LineAggregatorItemTransformerTests extends TestCase {
}
/**
* Test method for {@link org.springframework.batch.io.file.transform.LineAggregatorItemTransformer#transform(java.lang.Object)}.
* Test method for {@link org.springframework.batch.item.file.transform.LineAggregatorItemTransformer#transform(java.lang.Object)}.
* @throws Exception
*/
public void testTransform() throws Exception {
@@ -51,7 +51,7 @@ public class LineAggregatorItemTransformerTests extends TestCase {
}
/**
* Test method for {@link org.springframework.batch.io.file.transform.LineAggregatorItemTransformer#transform(java.lang.Object)}.
* Test method for {@link org.springframework.batch.item.file.transform.LineAggregatorItemTransformer#transform(java.lang.Object)}.
* @throws Exception
*/
public void testTransformWrongType() throws Exception {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import java.util.Collections;
import java.util.HashMap;
@@ -23,8 +23,8 @@ import java.util.Map;
import junit.framework.TestCase;
import org.springframework.batch.io.file.mapping.DefaultFieldSet;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
public class PrefixMatchingCompositeLineTokenizerTests extends TestCase {

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import junit.framework.TestCase;

View File

@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import java.util.Arrays;
import java.util.Collections;
import junit.framework.TestCase;
import org.springframework.batch.item.writer.ItemTransformer;
import org.springframework.batch.item.transform.ItemTransformer;
import org.springframework.util.StringUtils;
/**
@@ -35,7 +35,7 @@ public class RecursiveCollectionItemTransformerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.transform.RecursiveCollectionItemTransformer#setDelegate(org.springframework.batch.item.writer.ItemTransformer)}.
* {@link org.springframework.batch.item.file.transform.RecursiveCollectionItemTransformer#setDelegate(org.springframework.batch.item.transform.ItemTransformer)}.
* @throws Exception
*/
public void testSetDelegate() throws Exception {
@@ -49,7 +49,7 @@ public class RecursiveCollectionItemTransformerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.transform.RecursiveCollectionItemTransformer#setDelegate(org.springframework.batch.item.writer.ItemTransformer)}.
* {@link org.springframework.batch.item.file.transform.RecursiveCollectionItemTransformer#setDelegate(org.springframework.batch.item.transform.ItemTransformer)}.
* @throws Exception
*/
public void testSetDelegateAndPassInString() throws Exception {
@@ -63,7 +63,7 @@ public class RecursiveCollectionItemTransformerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.transform.RecursiveCollectionItemTransformer#setDelegate(org.springframework.batch.item.writer.ItemTransformer)}.
* {@link org.springframework.batch.item.file.transform.RecursiveCollectionItemTransformer#setDelegate(org.springframework.batch.item.transform.ItemTransformer)}.
* @throws Exception
*/
public void testSetDelegateReturnsList() throws Exception {
@@ -79,7 +79,7 @@ public class RecursiveCollectionItemTransformerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.transform.RecursiveCollectionItemTransformer#transform(java.lang.Object)}.
* {@link org.springframework.batch.item.file.transform.RecursiveCollectionItemTransformer#transform(java.lang.Object)}.
* @throws Exception
*/
public void testTransformString() throws Exception {
@@ -88,7 +88,7 @@ public class RecursiveCollectionItemTransformerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.transform.RecursiveCollectionItemTransformer#transform(java.lang.Object)}.
* {@link org.springframework.batch.item.file.transform.RecursiveCollectionItemTransformer#transform(java.lang.Object)}.
* @throws Exception
*/
public void testTransformArray() throws Exception {
@@ -100,7 +100,7 @@ public class RecursiveCollectionItemTransformerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.transform.RecursiveCollectionItemTransformer#transform(java.lang.Object)}.
* {@link org.springframework.batch.item.file.transform.RecursiveCollectionItemTransformer#transform(java.lang.Object)}.
* @throws Exception
*/
public void testTransformList() throws Exception {
@@ -112,7 +112,7 @@ public class RecursiveCollectionItemTransformerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.io.file.transform.RecursiveCollectionItemTransformer#transform(java.lang.Object)}.
* {@link org.springframework.batch.item.file.transform.RecursiveCollectionItemTransformer#transform(java.lang.Object)}.
* @throws Exception
*/
public void testTransformArrayOfArrays() throws Exception {

View File

@@ -14,9 +14,9 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
/**

View File

@@ -18,10 +18,11 @@ package org.springframework.batch.item.reader;
import junit.framework.TestCase;
import org.springframework.batch.io.Skippable;
import org.springframework.batch.item.AbstractItemReader;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.Skippable;
/**
* Unit test for {@link DelegatingItemReader}

View File

@@ -23,6 +23,7 @@ import junit.framework.TestCase;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.ItemStreamSupport;
/**
* @author Dave Syer

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.support;
package org.springframework.batch.item.support;
import java.io.BufferedWriter;
import java.io.File;
@@ -7,6 +7,7 @@ import java.io.IOException;
import junit.framework.TestCase;
import org.springframework.batch.item.support.FileUtils;
import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.util.Assert;

View File

@@ -1,10 +1,12 @@
package org.springframework.batch.item.writer;
package org.springframework.batch.item.transform;
import java.util.ArrayList;
import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.item.transform.CompositeItemTransformer;
import org.springframework.batch.item.transform.ItemTransformer;
/**
* Tests for {@link CompositeItemTransformer}.

View File

@@ -1,9 +1,11 @@
package org.springframework.batch.item.writer;
package org.springframework.batch.item.transform;
import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.transform.ItemTransformer;
import org.springframework.batch.item.transform.ItemTransformerItemWriter;
/**
* Tests for {@link ItemTransformerItemWriter}.

View File

@@ -13,13 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item.validator;
import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.io.exception.ValidationException;
import org.springframework.batch.item.AbstractItemReader;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.validator.ValidatingItemReader;
import org.springframework.batch.item.validator.Validator;
/**

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.xml;
package org.springframework.batch.item.xml;
import javax.xml.stream.events.EndElement;
import javax.xml.stream.events.StartElement;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.xml;
package org.springframework.batch.item.xml;
import java.io.IOException;
import java.io.InputStream;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.xml;
package org.springframework.batch.item.xml;
import java.io.File;
import java.io.IOException;
@@ -11,8 +11,8 @@ import javax.xml.transform.Result;
import junit.framework.TestCase;
import org.apache.commons.io.FileUtils;
import org.springframework.batch.io.xml.oxm.MarshallingEventWriterSerializer;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.xml.oxm.MarshallingEventWriterSerializer;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
import org.springframework.oxm.Marshaller;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.xml.oxm;
package org.springframework.batch.item.xml.oxm;
import java.io.IOException;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.xml.stax;
package org.springframework.batch.item.xml.stax;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLStreamException;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.xml.stax;
package org.springframework.batch.item.xml.stax;
import javax.xml.namespace.NamespaceContext;
import javax.xml.stream.XMLEventReader;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.xml.stax;
package org.springframework.batch.item.xml.stax;
import java.util.NoSuchElementException;
@@ -9,7 +9,7 @@ import javax.xml.stream.events.XMLEvent;
import junit.framework.TestCase;
import org.springframework.batch.io.xml.EventHelper;
import org.springframework.batch.item.xml.EventHelper;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.Resource;

View File

@@ -1,11 +1,11 @@
package org.springframework.batch.io.xml.stax;
package org.springframework.batch.item.xml.stax;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
import junit.framework.TestCase;
import org.springframework.batch.io.xml.EventHelper;
import org.springframework.batch.item.xml.EventHelper;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.Resource;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.xml.stax;
package org.springframework.batch.item.xml.stax;
import javax.xml.stream.XMLEventFactory;
import javax.xml.stream.events.XMLEvent;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.xml.stax;
package org.springframework.batch.item.xml.stax;
import javax.xml.stream.XMLEventFactory;
import javax.xml.stream.XMLEventWriter;

View File

@@ -22,8 +22,8 @@ import java.util.List;
import junit.framework.TestCase;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.item.writer.AbstractItemWriter;
public class ItemReaderRepeatCallbackTests extends TestCase {

View File

@@ -18,11 +18,11 @@ package org.springframework.batch.repeat.support;
import junit.framework.TestCase;
import org.springframework.batch.io.file.FlatFileItemReader;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.io.file.mapping.FieldSetMapper;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.writer.AbstractItemWriter;
import org.springframework.batch.item.file.FlatFileItemReader;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

View File

@@ -16,8 +16,8 @@
package org.springframework.batch.repeat.support;
import org.springframework.batch.item.AbstractItemReader;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.reader.AbstractItemReader;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.RepeatCallback;
import org.springframework.batch.repeat.RepeatContext;

View File

@@ -18,7 +18,7 @@ package org.springframework.batch.repeat.support;
import java.math.BigDecimal;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
/**
* @author Rob Harrop

View File

@@ -22,7 +22,7 @@ import java.util.List;
import junit.framework.TestCase;
import org.springframework.batch.item.writer.AbstractItemWriter;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.retry.ListItemReaderRecoverer;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.context.RetryContextSupport;

View File

@@ -23,11 +23,11 @@ import java.util.List;
import junit.framework.TestCase;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.item.FailedItemIdentifier;
import org.springframework.batch.item.ItemKeyGenerator;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.item.writer.AbstractItemWriter;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.support;
package org.springframework.batch.support;
import java.util.Collections;
import java.util.Properties;