BATCH-949: renamed mapper property to rowMapper

This commit is contained in:
trisberg
2009-02-16 14:22:16 +00:00
parent 2e95ee22c9
commit 46e67ab1cb
8 changed files with 14 additions and 14 deletions

View File

@@ -44,7 +44,7 @@ public class JdbcCursorItemReaderPreparedStatementIntegrationTests {
itemReader.setIgnoreWarnings(true);
itemReader.setVerifyCursorPosition(true);
itemReader.setMapper(new FooRowMapper());
itemReader.setRowMapper(new FooRowMapper());
itemReader.setFetchSize(10);
itemReader.setMaxRows(100);
itemReader.setQueryTimeout(1000);

View File

@@ -142,7 +142,7 @@ public class JdbcCursorItemReader<T> extends AbstractItemCountingItemStreamItemR
private SQLExceptionTranslator exceptionTranslator;
private RowMapper mapper;
private RowMapper rowMapper;
private boolean initialized = false;
@@ -163,7 +163,7 @@ public class JdbcCursorItemReader<T> extends AbstractItemCountingItemStreamItemR
public void afterPropertiesSet() throws Exception {
Assert.notNull(dataSource, "DataSource must be provided");
Assert.notNull(sql, "The SQL query must be provided");
Assert.notNull(mapper, "RowMapper must be provided");
Assert.notNull(rowMapper, "RowMapper must be provided");
}
/**
@@ -359,10 +359,10 @@ public class JdbcCursorItemReader<T> extends AbstractItemCountingItemStreamItemR
/**
* Set the RowMapper to be used for all calls to read().
*
* @param mapper
* @param rowMapper
*/
public void setMapper(RowMapper mapper) {
this.mapper = mapper;
public void setRowMapper(RowMapper rowMapper) {
this.rowMapper = rowMapper;
}
/**
@@ -474,7 +474,7 @@ public class JdbcCursorItemReader<T> extends AbstractItemCountingItemStreamItemR
return null;
}
int currentRow = getCurrentItemCount();
T item = (T) mapper.mapRow(rs, currentRow);
T item = (T) rowMapper.mapRow(rs, currentRow);
verifyCursorPosition(currentRow);
return item;
}

View File

@@ -18,7 +18,7 @@ public class JdbcCursorItemReaderCommonTests extends AbstractDatabaseItemStreamI
result.setIgnoreWarnings(true);
result.setVerifyCursorPosition(true);
result.setMapper(new FooRowMapper());
result.setRowMapper(new FooRowMapper());
result.setFetchSize(10);
result.setMaxRows(100);
result.setQueryTimeout(1000);

View File

@@ -22,7 +22,7 @@ public class JdbcCursorItemReaderIntegrationTests extends AbstractDataSourceItem
result.setIgnoreWarnings(true);
result.setVerifyCursorPosition(true);
result.setMapper(new FooRowMapper());
result.setRowMapper(new FooRowMapper());
result.setFetchSize(10);
result.setMaxRows(100);
result.setQueryTimeout(1000);

View File

@@ -78,7 +78,7 @@
<beans:bean id="playerSummarizationSource" class="org.springframework.batch.item.database.JdbcCursorItemReader">
<beans:property name="dataSource" ref="dataSource" />
<beans:property name="mapper">
<beans:property name="rowMapper">
<beans:bean class="org.springframework.batch.sample.domain.football.internal.PlayerSummaryMapper" />
</beans:property>
<beans:property name="sql">

View File

@@ -14,7 +14,7 @@
<bean id="itemReader" class="org.springframework.batch.item.database.JdbcCursorItemReader">
<property name="dataSource" ref="dataSource"/>
<property name="sql" value="select ID, NAME, CREDIT from CUSTOMER"/>
<property name="mapper">
<property name="rowMapper">
<bean class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditRowMapper"/>
</property>
</bean>

View File

@@ -101,7 +101,7 @@
<beans:bean id="tradeSqlItemReader" class="org.springframework.batch.item.database.JdbcCursorItemReader">
<beans:property name="dataSource" ref="dataSource" />
<beans:property name="sql" value="SELECT isin, quantity, price, customer from TRADE" />
<beans:property name="mapper">
<beans:property name="rowMapper">
<beans:bean class="org.springframework.batch.sample.domain.trade.internal.TradeRowMapper" />
</beans:property>
</beans:bean>

View File

@@ -51,7 +51,7 @@
<beans:bean id="tradeSqlItemReader" class="org.springframework.batch.item.database.JdbcCursorItemReader">
<beans:property name="dataSource" ref="dataSource" />
<beans:property name="sql" value="SELECT id, quantity, price, customer from TRADE" />
<beans:property name="mapper">
<beans:property name="rowMapper">
<beans:bean class="org.springframework.batch.sample.domain.trade.internal.TradeRowMapper" />
</beans:property>
</beans:bean>
@@ -59,7 +59,7 @@
<beans:bean id="customerSqlItemReader" class="org.springframework.batch.item.database.JdbcCursorItemReader">
<beans:property name="dataSource" ref="dataSource" />
<beans:property name="sql" value="SELECT id, name, credit FROM customer " />
<beans:property name="mapper">
<beans:property name="rowMapper">
<beans:bean class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditRowMapper" />
</beans:property>
</beans:bean>