BATCH-1749: JdbcPagingItemReader now supports multi-column keys

This commit is contained in:
Michael Minella
2012-11-02 15:01:43 -05:00
parent 382ce48e15
commit 12d9918289
32 changed files with 1220 additions and 296 deletions

View File

@@ -16,7 +16,11 @@
<property name="queryProvider">
<bean class="org.springframework.batch.item.database.support.SqlPagingQueryProviderFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="sortKey" value="ID" />
<property name="sortKeys">
<map>
<entry key="id" value="true"/>
</map>
</property>
<!-- Intentionally put sort key second in the query list as a test -->
<property name="selectClause" value="select NAME, ID, CREDIT" />
<property name="fromClause" value="FROM CUSTOMER" />

View File

@@ -44,7 +44,11 @@
<property name="dataSource" ref="dataSource"/>
<property name="fromClause" value="CUSTOMER"/>
<property name="selectClause" value="ID,NAME,CREDIT"/>
<property name="sortKey" value="ID"/>
<property name="sortKeys">
<map>
<entry key="ID" value="true"/>
</map>
</property>
<property name="whereClause" value="ID &gt;= :minId and ID &lt;= :maxId"/>
</bean>
</property>