IN PROGRESS - issue BATCH-412: consistent ItemStream key prefixes

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

all keys made private (not referenced outside tests)
This commit is contained in:
robokaso
2008-03-05 12:22:31 +00:00
parent 2aa867c535
commit 840d30426a
14 changed files with 26 additions and 30 deletions

View File

@@ -51,9 +51,9 @@ import org.springframework.util.StringUtils;
*/
public class HibernateCursorItemReader extends ExecutionContextUserSupport implements ItemReader, ItemStream, Skippable, InitializingBean {
private static final String RESTART_DATA_ROW_NUMBER_KEY = "rowNumber";
private static final String RESTART_DATA_ROW_NUMBER_KEY = "row.number";
private static final String SKIPPED_ROWS = "skippedRows";
private static final String SKIPPED_ROWS = "skipped.rows";
private SessionFactory sessionFactory;

View File

@@ -109,11 +109,11 @@ public class JdbcCursorItemReader extends ExecutionContextUserSupport implements
public static final int VALUE_NOT_SET = -1;
private static final String CURRENT_PROCESSED_ROW = "lastProcessedRowNum";
private static final String CURRENT_PROCESSED_ROW = "last.processed.row.number";
private static final String SKIPPED_ROWS = "skippedRows";
private static final String SKIPPED_ROWS = "skipped.rows";
private static final String SKIP_COUNT = "skippedRrecordCount";
private static final String SKIP_COUNT = "skipped.record.count";
private Connection con;

View File

@@ -22,7 +22,7 @@ import com.ibatis.sqlmap.client.SqlMapClient;
*/
public class IbatisKeyGenerator extends ExecutionContextUserSupport implements KeyGenerator {
public static final String RESTART_KEY = "keyIndex";
private static final String RESTART_KEY = "key.index";
private SqlMapClientTemplate sqlMapClientTemplate;

View File

@@ -20,7 +20,6 @@ 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.jdbc.core.JdbcTemplate;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
@@ -37,9 +36,7 @@ import org.springframework.util.StringUtils;
* @see DrivingQueryItemReader
* @since 1.0
*/
public class MultipleColumnJdbcKeyGenerator extends ExecutionContextUserSupport implements KeyGenerator {
public static final String RESTART_KEY = "key";
public class MultipleColumnJdbcKeyGenerator implements KeyGenerator {
private JdbcTemplate jdbcTemplate;
@@ -50,7 +47,6 @@ public class MultipleColumnJdbcKeyGenerator extends ExecutionContextUserSupport
private String restartSql;
public MultipleColumnJdbcKeyGenerator() {
setName(MultipleColumnJdbcKeyGenerator.class.getSimpleName());
}
/**

View File

@@ -52,7 +52,7 @@ import org.springframework.util.StringUtils;
*/
public class SingleColumnJdbcKeyGenerator extends ExecutionContextUserSupport implements KeyGenerator {
public static final String RESTART_KEY = "key";
private static final String RESTART_KEY = "key";
private JdbcTemplate jdbcTemplate;

View File

@@ -68,9 +68,9 @@ public class FlatFileItemReader extends ExecutionContextUserSupport implements I
private static Log log = LogFactory.getLog(FlatFileItemReader.class);
public static final String READ_STATISTICS_NAME = "lines.read.count";
private static final String READ_STATISTICS_NAME = "lines.read.count";
public static final String SKIPPED_STATISTICS_NAME = "skipped.lines.count";
private static final String SKIPPED_STATISTICS_NAME = "skipped.lines.count";
// default encoding for input files
public static final String DEFAULT_CHARSET = "ISO-8859-1";

View File

@@ -71,11 +71,11 @@ public class FlatFileItemWriter extends ExecutionContextUserSupport implements I
private static final String LINE_SEPARATOR = System.getProperty("line.separator");
public static final String WRITTEN_STATISTICS_NAME = "written";
private static final String WRITTEN_STATISTICS_NAME = "written";
public static final String RESTART_COUNT_STATISTICS_NAME = "restart.count";
private static final String RESTART_COUNT_STATISTICS_NAME = "restart.count";
public static final String RESTART_DATA_NAME = "current.count";
private static final String RESTART_DATA_NAME = "current.count";
private Resource resource;

View File

@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
public class StaxEventItemReader extends ExecutionContextUserSupport implements ItemReader, Skippable, ItemStream,
InitializingBean {
public static final String READ_COUNT_STATISTICS_NAME = "readCount";
private static final String READ_COUNT_STATISTICS_NAME = "read.count";
private FragmentEventReader fragmentReader;

View File

@@ -50,10 +50,10 @@ public class StaxEventItemWriter extends ExecutionContextUserSupport implements
private static final String DEFAULT_ROOT_TAG_NAME = "root";
// restart data property name
public static final String RESTART_DATA_NAME = "position";
private static final String RESTART_DATA_NAME = "position";
// restart data property name
public static final String WRITE_STATISTICS_NAME = "record.count";
private static final String WRITE_STATISTICS_NAME = "record.count";
// file system resource
private Resource resource;