RESOLVED - issue BATCH-330: Modify RestartData to be a typesafe form of map

http://jira.springframework.org/browse/BATCH-330

Remove references to RestartData
This commit is contained in:
dsyer
2008-02-05 09:44:45 +00:00
parent 8c1cb2808f
commit 8ac9c65b78
5 changed files with 15 additions and 45 deletions

View File

@@ -20,12 +20,12 @@ import org.springframework.jdbc.core.PreparedStatementSetter;
import org.springframework.jdbc.core.RowMapper;
/**
* RestartDataRowMapper extends the standard {@link RowMapper} interface to provide for
* converting an object returned from a RowMapper to RestartData and back again. One
* {@link ExecutionAttributesRowMapper} extends the standard {@link RowMapper} interface to provide for
* converting an object returned from a RowMapper to {@link ExecutionAttributes} and back again. One
* of the most common use cases for this type of functionality is the DrivingQuery approach
* to sql processing. Using a RestartDataRowMapper, developers can create each unique key
* to sql processing. Using a {@link ExecutionAttributesRowMapper}, developers can create each unique key
* to suite their specific needs, and also describe how such a key would be converted to
* RestartData, so that it can be serialized and stored.
* {@link ExecutionAttributes}, so that it can be serialized and stored.
*
* @author Lucas Ward
* @see RowMapper
@@ -34,7 +34,7 @@ import org.springframework.jdbc.core.RowMapper;
public interface ExecutionAttributesRowMapper extends RowMapper {
/**
* Given the provided composite key, return a RestartData representation.
* Given the provided composite key, return a {@link ExecutionAttributes} representation.
*
* @param key
* @return ExecutionAttributes representing the composite key.

View File

@@ -177,14 +177,14 @@ public class StaxEventItemReader extends AbstractItemReader implements ItemReade
* @see ItemStream#getExecutionAttributes()
*/
public ExecutionAttributes getExecutionAttributes() {
ExecutionAttributes restartData = new ExecutionAttributes();
restartData.putLong(READ_COUNT_STATISTICS_NAME, currentRecordCount);
return restartData;
ExecutionAttributes executionAttributes = new ExecutionAttributes();
executionAttributes.putLong(READ_COUNT_STATISTICS_NAME, currentRecordCount);
return executionAttributes;
}
/**
* Restores the input source for the given restart data by rereading and
* skipping the number of records stored in the RestartData.
* skipping the number of records stored in the {@link ExecutionAttributes}.
*
* @param ExecutionAttributes that holds the line count from the last commit.
* @throws IllegalStateException if the ItemReader has already been