[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

@@ -1,8 +0,0 @@
<html>
<body>
<p>
Infrastructure implementations of cursor based input sources. All input sources within this package
open a cursor against the database, and return back a mapped object for each row.
</p>
</body>
</html>

View File

@@ -1,8 +0,0 @@
<html>
<body>
<p>
Infrastructure implementations of driving query based input sources. All input sources within this package
query a database to return a list of keys, and return back one key per call to read().
</p>
</body>
</html>

View File

@@ -14,11 +14,8 @@
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.MarkFailedException;
import org.springframework.batch.item.ResetFailedException;
/**
* Base class for {@link ItemReader} implementations.

View File

@@ -14,10 +14,8 @@
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.stream.ItemStreamSupport;
/**
* Base class for {@link ItemReader} implementations.

View File

@@ -14,10 +14,8 @@
* limitations under the License.
*/
package org.springframework.batch.item.writer;
package org.springframework.batch.item;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.stream.ItemStreamSupport;
/**
* Base class for {@link ItemWriter} implementations.

View File

@@ -13,11 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.item.writer;
package org.springframework.batch.item;
import org.springframework.batch.item.ClearFailedException;
import org.springframework.batch.item.FlushFailedException;
import org.springframework.batch.item.ItemWriter;
/**
* Abstract {@link ItemWriter} that allows for base classes to only

View File

@@ -16,22 +16,16 @@
package org.springframework.batch.item;
import org.springframework.batch.item.reader.AbstractItemReader;
/**
* Strategy interface for providing the data. <br/>
*
* Implementations are expected to be stateful and will be called multiple times
* for each batch, with each call to {@link #next} returning a different value
* and finally returning <code>null</code> when all input data is exhausted.<br/>
* Implementations are expected to be stateful and will be called multiple times for each batch, with each call to
* {@link #next} returning a different value and finally returning <code>null</code> when all input data is exhausted.<br/>
*
* Implementations need to be thread safe and clients of a {@link ItemReader}
* need to be aware that this is the case. Clients can code to this interface
* without worrying about thread safety by using the {@link AbstractItemReader}
* base class.<br/>
* Implementations need to be thread safe and clients of a {@link ItemReader} need to be aware that this is the case.<br/>
*
* A richer interface (e.g. with a look ahead or peek) is not feasible because
* we need to support transactions in an asynchronous batch.
* A richer interface (e.g. with a look ahead or peek) is not feasible because we need to support transactions in an
* asynchronous batch.
*
* @author Rob Harrop
* @author Dave Syer
@@ -41,11 +35,9 @@ import org.springframework.batch.item.reader.AbstractItemReader;
public interface ItemReader {
/**
* Reads a piece of input data and advance to the next one. Implementations
* <strong>must</strong> return <code>null</code> at the end of the input
* data set. In a transactional setting, caller might get the same item
* twice from successive calls (or otherwise), if the first call was in a
* transaction that rolled back.
* Reads a piece of input data and advance to the next one. Implementations <strong>must</strong> return
* <code>null</code> at the end of the input data set. In a transactional setting, caller might get the same item
* twice from successive calls (or otherwise), if the first call was in a transaction that rolled back.
*
* @throws Exception if an underlying resource is unavailable.
*/
@@ -54,27 +46,22 @@ public interface ItemReader {
/**
* Mark the stream so that it can be reset later and the items backed out.<br/>
*
* In a multi-threaded setting implementations have to ensure that only the
* state from the current thread is saved.
* In a multi-threaded setting implementations have to ensure that only the state from the current thread is saved.
*
* @throws MarkFailedException if there is a problem with the mark. If a
* mark fails inside a transaction, it would be worrying, but not normally
* fatal.
* @throws MarkFailedException if there is a problem with the mark. If a mark fails inside a transaction, it would
* be worrying, but not normally fatal.
*/
void mark() throws MarkFailedException;
/**
* Reset the stream to the last mark. After a reset the stream state will be
* such that changes (items read or written) since the last call to mark
* will not be visible after a call to close.<br/>
* Reset the stream to the last mark. After a reset the stream state will be such that changes (items read or
* written) since the last call to mark will not be visible after a call to close.<br/>
*
* In a multi-threaded setting implementations have to ensure that only the
* state from the current thread is reset.
* In a multi-threaded setting implementations have to ensure that only the state from the current thread is reset.
*
* @throws ResetFailedException if there is a problem with the reset. If a
* reset fails inside a transaction, it would normally be fatal, and would
* leave the stream in an inconsistent state. So while this is an unchecked
* exception, it may be important for a client to catch it explicitly.
* @throws ResetFailedException if there is a problem with the reset. If a reset fails inside a transaction, it
* would normally be fatal, and would leave the stream in an inconsistent state. So while this is an
* unchecked exception, it may be important for a client to catch it explicitly.
*/
void reset() throws ResetFailedException;

View File

@@ -13,11 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.item.stream;
package org.springframework.batch.item;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemStreamException;
/**
* Empty method implementation of {@link ItemStream}.
@@ -25,7 +22,7 @@ import org.springframework.batch.item.ItemStreamException;
* @author Dave Syer
*
*/
public class ItemStreamSupport implements ItemStream {
public abstract class ItemStreamSupport implements ItemStream {
/**
* No-op.

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io;
package org.springframework.batch.item;
/**
* Implementation of this interface indicates to the framework that this object

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;

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.util.Iterator;
import java.util.List;

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.HashSet;
import java.util.Set;

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.cursor;
package org.springframework.batch.item.database;
import java.util.ArrayList;
import java.util.List;
@@ -22,11 +22,11 @@ import org.hibernate.ScrollableResults;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.StatelessSession;
import org.springframework.batch.io.Skippable;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ExecutionContextUserSupport;
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.util.Assert;
import org.springframework.util.StringUtils;

View File

@@ -13,9 +13,9 @@
* 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.IbatisKeyGenerator;
import org.springframework.batch.item.database.support.IbatisKeyGenerator;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import com.ibatis.sqlmap.client.SqlMapClient;
@@ -36,7 +36,7 @@ public class IbatisDrivingQueryItemReader extends DrivingQueryItemReader {
/**
* Overridden read() that uses the returned key as arguments to the details query.
*
* @see org.springframework.batch.io.driving.DrivingQueryItemReader#read()
* @see org.springframework.batch.item.database.DrivingQueryItemReader#read()
*/
public Object read() {
Object key = super.read();

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;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.cursor;
package org.springframework.batch.item.database;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -28,12 +28,12 @@ import javax.sql.DataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.io.Skippable;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ExecutionContextUserSupport;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ResetFailedException;
import org.springframework.batch.item.Skippable;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.InvalidDataAccessResourceUsageException;

View File

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

View File

@@ -0,0 +1,7 @@
<html>
<body>
<p>
Infrastructure implementations of database based item readers and writers.
</p>
</body>
</html>

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.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.driving.support;
package org.springframework.batch.item.database.support;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.jdbc.core.PreparedStatementSetter;

View File

@@ -1,11 +1,11 @@
package org.springframework.batch.io.driving.support;
package org.springframework.batch.item.database.support;
import java.util.List;
import org.springframework.batch.io.driving.DrivingQueryItemReader;
import org.springframework.batch.io.driving.KeyGenerator;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ExecutionContextUserSupport;
import org.springframework.batch.item.database.DrivingQueryItemReader;
import org.springframework.batch.item.database.KeyGenerator;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import org.springframework.util.Assert;

View File

@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.driving.support;
package org.springframework.batch.item.database.support;
import java.util.List;
import org.springframework.batch.io.driving.DrivingQueryItemReader;
import org.springframework.batch.io.driving.KeyGenerator;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.database.DrivingQueryItemReader;
import org.springframework.batch.item.database.KeyGenerator;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;

View File

@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.io.driving.support;
package org.springframework.batch.item.database.support;
import java.util.List;
import org.springframework.batch.io.driving.KeyGenerator;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ExecutionContextUserSupport;
import org.springframework.batch.item.database.KeyGenerator;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.SingleColumnRowMapper;

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.util.HashSet;
@@ -22,16 +22,7 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.io.Skippable;
import org.springframework.batch.io.exception.FlatFileParsingException;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.io.file.mapping.FieldSetMapper;
import org.springframework.batch.io.file.separator.LineReader;
import org.springframework.batch.io.file.separator.RecordSeparatorPolicy;
import org.springframework.batch.io.file.separator.ResourceLineReader;
import org.springframework.batch.io.file.transform.AbstractLineTokenizer;
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.ExecutionContextUserSupport;
import org.springframework.batch.item.ItemReader;
@@ -39,6 +30,15 @@ import org.springframework.batch.item.ItemReaderException;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.ReaderNotOpenException;
import org.springframework.batch.item.Skippable;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.separator.LineReader;
import org.springframework.batch.item.file.separator.RecordSeparatorPolicy;
import org.springframework.batch.item.file.separator.ResourceLineReader;
import org.springframework.batch.item.file.transform.AbstractLineTokenizer;
import org.springframework.batch.item.file.transform.DelimitedLineTokenizer;
import org.springframework.batch.item.file.transform.LineTokenizer;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.Resource;
import org.springframework.util.Assert;

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.BufferedWriter;
import java.io.File;
@@ -27,10 +27,6 @@ import java.nio.charset.UnsupportedCharsetException;
import org.springframework.batch.io.exception.ConfigurationException;
import org.springframework.batch.io.exception.InfrastructureException;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.io.file.mapping.FieldSetCreator;
import org.springframework.batch.io.file.transform.DelimitedLineAggregator;
import org.springframework.batch.io.file.transform.LineAggregator;
import org.springframework.batch.item.ClearFailedException;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ExecutionContextUserSupport;
@@ -38,6 +34,10 @@ import org.springframework.batch.item.FlushFailedException;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSetCreator;
import org.springframework.batch.item.file.transform.DelimitedLineAggregator;
import org.springframework.batch.item.file.transform.LineAggregator;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.Resource;
import org.springframework.dao.DataAccessResourceFailureException;

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.util.ArrayList;
import java.util.HashMap;
@@ -150,7 +150,7 @@ public class BeanWrapperFieldSetMapper extends DefaultPropertyEditorRegistrar im
* the {@link DataBinder} from {@link #createBinder(Object)} has errors
* after binding).
*
* @see org.springframework.batch.io.file.mapping.FieldSetMapper#mapLine(org.springframework.batch.io.file.mapping.DefaultFieldSet)
* @see org.springframework.batch.item.file.mapping.FieldSetMapper#mapLine(org.springframework.batch.item.file.mapping.DefaultFieldSet)
*/
public Object mapLine(FieldSet fs) {
Object copy = getBean();

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;
/**
* @author Dave Syer

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.text.ParseException;

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 java.math.BigDecimal;
import java.sql.ResultSet;

View File

@@ -13,9 +13,9 @@
* 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 org.springframework.batch.io.file.transform.LineTokenizer;
import org.springframework.batch.item.file.transform.LineTokenizer;
/**
* Strategy interface for mapping between arbitrary objects and {@link FieldSet}.

View File

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

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;
/**
@@ -38,7 +38,7 @@ public class PassThroughFieldSetMapper implements FieldSetMapper, FieldSetCreato
* convert to a String with toString() and convert it to a single field
* {@link FieldSet}.
*
* @see org.springframework.batch.io.file.mapping.FieldSetCreator#mapItem(java.lang.Object)
* @see org.springframework.batch.item.file.mapping.FieldSetCreator#mapItem(java.lang.Object)
*/
public FieldSet mapItem(Object data) {
if (data instanceof FieldSet) {

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.beans.PropertyDescriptor;
import java.util.ArrayList;

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 org.springframework.util.StringUtils;
@@ -83,7 +83,7 @@ public class DefaultRecordSeparatorPolicy extends SimpleRecordSeparatorPolicy {
* "), and does not end with a continuation marker ('\'). The test for the
* continuation marker ignores whitespace at the end of the line.
*
* @see org.springframework.batch.io.file.separator.RecordSeparatorPolicy#isEndOfRecord(java.lang.String)
* @see org.springframework.batch.item.file.separator.RecordSeparatorPolicy#isEndOfRecord(java.lang.String)
*/
public boolean isEndOfRecord(String line) {
return !isQuoteUnterminated(line) && !isContinued(line);
@@ -94,7 +94,7 @@ public class DefaultRecordSeparatorPolicy extends SimpleRecordSeparatorPolicy {
* remove the continuation marker (plus whitespace at the end) if it is
* there.
*
* @see org.springframework.batch.io.file.separator.SimpleRecordSeparatorPolicy#preProcess(java.lang.String)
* @see org.springframework.batch.item.file.separator.SimpleRecordSeparatorPolicy#preProcess(java.lang.String)
*/
public String preProcess(String line) {
if (isQuoteUnterminated(line)) {

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.separator;
package org.springframework.batch.item.file.separator;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;

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 java.io.BufferedReader;

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 java.io.BufferedReader;
import java.io.IOException;
@@ -29,10 +29,10 @@ 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.ItemStreamSupport;
import org.springframework.batch.item.MarkFailedException;
import org.springframework.batch.item.ResetFailedException;
import org.springframework.batch.item.UnexpectedInputException;
import org.springframework.batch.item.stream.ItemStreamSupport;
import org.springframework.core.io.Resource;
import org.springframework.util.Assert;
@@ -159,7 +159,7 @@ public class ResourceLineReader extends ItemStreamSupport implements LineReader,
/**
* Close the reader associated with this input source.
*
* @see org.springframework.batch.item.stream.ItemStreamSupport#close(org.springframework.batch.item.ExecutionContext)
* @see org.springframework.batch.item.ItemStreamSupport#close(org.springframework.batch.item.ExecutionContext)
*/
public synchronized void close(ExecutionContext executionContext) {
if (state == null) {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.separator;
package org.springframework.batch.item.file.separator;
/**
@@ -29,7 +29,7 @@ public class SimpleRecordSeparatorPolicy implements RecordSeparatorPolicy {
/**
* Always returns true.
*
* @see org.springframework.batch.io.file.separator.RecordSeparatorPolicy#isEndOfRecord(java.lang.String)
* @see org.springframework.batch.item.file.separator.RecordSeparatorPolicy#isEndOfRecord(java.lang.String)
*/
public boolean isEndOfRecord(String line) {
return true;
@@ -37,7 +37,7 @@ public class SimpleRecordSeparatorPolicy implements RecordSeparatorPolicy {
/**
* Pass the record through. Do nothing.
* @see org.springframework.batch.io.file.separator.RecordSeparatorPolicy#postProcess(java.lang.String)
* @see org.springframework.batch.item.file.separator.RecordSeparatorPolicy#postProcess(java.lang.String)
*/
public String postProcess(String record) {
return record;
@@ -45,7 +45,7 @@ public class SimpleRecordSeparatorPolicy implements RecordSeparatorPolicy {
/**
* Pass the line through. Do nothing.
* @see org.springframework.batch.io.file.separator.RecordSeparatorPolicy#preProcess(java.lang.String)
* @see org.springframework.batch.item.file.separator.RecordSeparatorPolicy#preProcess(java.lang.String)
*/
public String preProcess(String line) {
return line;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.separator;
package org.springframework.batch.item.file.separator;
/**
@@ -59,7 +59,7 @@ public class SuffixRecordSeparatorPolicy extends DefaultRecordSeparatorPolicy {
* whitespace is trimmed before the comparison. Also returns true if the
* line is null, but not if it is empty.
*
* @see org.springframework.batch.io.file.separator.RecordSeparatorPolicy#isEndOfRecord(java.lang.String)
* @see org.springframework.batch.item.file.separator.RecordSeparatorPolicy#isEndOfRecord(java.lang.String)
*/
public boolean isEndOfRecord(String line) {
if (line == null) {
@@ -72,7 +72,7 @@ public class SuffixRecordSeparatorPolicy extends DefaultRecordSeparatorPolicy {
/**
* Remove the suffix from the end of the record.
*
* @see org.springframework.batch.io.file.separator.SimpleRecordSeparatorPolicy#postProcess(java.lang.String)
* @see org.springframework.batch.item.file.separator.SimpleRecordSeparatorPolicy#postProcess(java.lang.String)
*/
public String postProcess(String record) {
if (record==null) {

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import java.util.ArrayList;
import java.util.List;
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;
/**

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.transform;
package org.springframework.batch.item.file.transform;
/**
* @author Dave Syer

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

@@ -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.ArrayList;
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 java.util.Arrays;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.util.Assert;
/**

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.ArrayList;
import java.util.List;

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

@@ -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 org.springframework.batch.io.file.mapping.DefaultFieldSet;
import org.springframework.batch.io.file.mapping.FieldSet;
import org.springframework.batch.item.writer.ItemTransformer;
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.batch.item.transform.ItemTransformer;
/**
* An {@link ItemTransformer} that expects a String[] as input and delegates to
@@ -42,7 +42,7 @@ public class LineAggregatorItemTransformer implements ItemTransformer {
* Assume the item is an array of String (no check is made) and delegate to
* the aggregator.
*
* @see org.springframework.batch.item.writer.ItemTransformer#transform(java.lang.Object)
* @see org.springframework.batch.item.transform.ItemTransformer#transform(java.lang.Object)
*/
public Object transform(Object item) throws Exception {
return aggregator.aggregate(createFieldSet(item));

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

@@ -14,15 +14,15 @@
* limitations under the License.
*/
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
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 PrefixMatchingCompositeLineTokenizer implements LineTokenizer {

View File

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

View File

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

View File

@@ -1,9 +1,9 @@
package org.springframework.batch.io.file.transform;
package org.springframework.batch.item.file.transform;
import java.util.Collection;
import java.util.Iterator;
import org.springframework.batch.item.writer.ItemTransformer;
import org.springframework.batch.item.transform.ItemTransformer;
/**
* An implementation of {@link ItemTransformer} that treats its argument

View File

@@ -21,8 +21,8 @@ import java.util.Collection;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.io.file.mapping.FieldSetMapper;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
/**
* An {@link ItemReader} that delivers a list as its item, storing up objects

View File

@@ -16,8 +16,9 @@
package org.springframework.batch.item.reader;
import org.springframework.batch.io.Skippable;
import org.springframework.batch.item.AbstractItemReader;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.Skippable;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;

View File

@@ -22,6 +22,7 @@ import javax.jms.Message;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.item.AbstractItemReader;
import org.springframework.batch.item.FailedItemIdentifier;
import org.springframework.batch.item.ItemKeyGenerator;
import org.springframework.batch.item.ItemReader;
@@ -110,7 +111,7 @@ public class JmsItemReader extends AbstractItemReader implements ItemRecoverer,
* Send the message back to the proovider using the specified error
* destination property of this provider.
*
* @see org.springframework.batch.item.reader.AbstractItemReader#recover(java.lang.Object,
* @see org.springframework.batch.item.AbstractItemReader#recover(java.lang.Object,
* Throwable)
*/
public boolean recover(Object item, Throwable cause) {
@@ -139,7 +140,7 @@ public class JmsItemReader extends AbstractItemReader implements ItemRecoverer,
* If the message is a {@link Message} then returns the JMS message ID.
* Otherwise just delegate to parent class.
*
* @see org.springframework.batch.item.reader.AbstractItemReader#getKey(java.lang.Object)
* @see org.springframework.batch.item.AbstractItemReader#getKey(java.lang.Object)
*
* @throws UnexpectedInputException if the JMS id cannot be determined from
* a JMS Message

View File

@@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import org.springframework.aop.support.AopUtils;
import org.springframework.batch.item.AbstractItemReader;
import org.springframework.batch.item.ItemReader;
/**

View File

@@ -0,0 +1,7 @@
<html>
<body>
<p>
Generic implementations of ItemStream
</p>
</body>
</html>

View File

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

View File

@@ -0,0 +1,7 @@
<html>
<body>
<p>
Internal support package
</p>
</body>
</html>

View File

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

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.item.writer;
package org.springframework.batch.item.transform;
/**
* Interface for item transformations during processing phase.

View File

@@ -1,6 +1,7 @@
package org.springframework.batch.item.writer;
package org.springframework.batch.item.transform;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.writer.DelegatingItemWriter;
import org.springframework.util.Assert;
/**

View File

@@ -0,0 +1,7 @@
<html>
<body>
<p>
Writer implementation concerned with item transformation before writing.
</p>
</body>
</html>

View File

@@ -13,9 +13,9 @@
* 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 org.springframework.batch.item.validator.Validator;
import org.springframework.batch.item.reader.DelegatingItemReader;
import org.springframework.util.Assert;
/**

View File

@@ -3,6 +3,7 @@ package org.springframework.batch.item.writer;
import java.util.Iterator;
import java.util.List;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.item.ItemWriter;
/**

View File

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

View File

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

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;
@@ -11,17 +11,17 @@ import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.events.StartElement;
import org.springframework.batch.io.Skippable;
import org.springframework.batch.io.xml.stax.DefaultFragmentEventReader;
import org.springframework.batch.io.xml.stax.DefaultTransactionalEventReader;
import org.springframework.batch.io.xml.stax.FragmentEventReader;
import org.springframework.batch.io.xml.stax.TransactionalEventReader;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ExecutionContextUserSupport;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.ReaderNotOpenException;
import org.springframework.batch.item.Skippable;
import org.springframework.batch.item.xml.stax.DefaultFragmentEventReader;
import org.springframework.batch.item.xml.stax.DefaultTransactionalEventReader;
import org.springframework.batch.item.xml.stax.FragmentEventReader;
import org.springframework.batch.item.xml.stax.TransactionalEventReader;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.Resource;
import org.springframework.dao.DataAccessResourceFailureException;
@@ -246,7 +246,7 @@ public class StaxEventItemReader extends ExecutionContextUserSupport implements
* counter, keeping track of the current position, so multiple threads
* cannot be accommodated.
*
* @see org.springframework.batch.item.reader.AbstractItemReader#mark()
* @see org.springframework.batch.item.AbstractItemReader#mark()
*/
public void mark() {
lastCommitPointRecordCount = currentRecordCount;

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.FileOutputStream;
@@ -15,14 +15,14 @@ import javax.xml.stream.XMLEventWriter;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import org.springframework.batch.io.support.FileUtils;
import org.springframework.batch.io.xml.stax.NoStartEndDocumentStreamWriter;
import org.springframework.batch.item.ClearFailedException;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ExecutionContextUserSupport;
import org.springframework.batch.item.FlushFailedException;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.support.FileUtils;
import org.springframework.batch.item.xml.stax.NoStartEndDocumentStreamWriter;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.Resource;
import org.springframework.dao.DataAccessResourceFailureException;

View File

@@ -1,11 +1,11 @@
package org.springframework.batch.io.xml.oxm;
package org.springframework.batch.item.xml.oxm;
import java.io.IOException;
import javax.xml.stream.XMLEventWriter;
import javax.xml.transform.Result;
import org.springframework.batch.io.xml.EventWriterSerializer;
import org.springframework.batch.item.xml.EventWriterSerializer;
import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.oxm.Marshaller;
import org.springframework.xml.transform.StaxResult;

View File

@@ -1,10 +1,10 @@
package org.springframework.batch.io.xml.oxm;
package org.springframework.batch.item.xml.oxm;
import java.io.IOException;
import javax.xml.stream.XMLEventReader;
import org.springframework.batch.io.xml.EventReaderDeserializer;
import org.springframework.batch.item.xml.EventReaderDeserializer;
import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.oxm.Unmarshaller;
import org.springframework.util.Assert;

View File

@@ -1,4 +1,4 @@
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

@@ -1,4 +1,4 @@
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;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.xml.stax;
package org.springframework.batch.item.xml.stax;
import java.util.NoSuchElementException;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.xml.stax;
package org.springframework.batch.item.xml.stax;
import java.util.ArrayList;
import java.util.List;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.io.xml.stax;
package org.springframework.batch.item.xml.stax;
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 javax.xml.stream.XMLEventWriter;
import javax.xml.stream.XMLStreamException;

View File

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