Removed iBatis based components
This commit removes the iBatis based ItemReaders and ItemWriter. They were depricated in the 3.0 line in favor of the MyBatis natively provided ItemReader and ItemWriter implementations. This removes those depricated components. Resolves BATCH-2591
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
|
||||
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
|
||||
|
||||
<sqlMapConfig>
|
||||
<sqlMap resource="ibatis-customer-credit.xml"/>
|
||||
</sqlMapConfig>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
|
||||
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
|
||||
|
||||
<sqlMap namespace="Customer">
|
||||
<resultMap id="result" class="org.springframework.batch.sample.domain.trade.CustomerCredit">
|
||||
<result property="name" column="NAME" />
|
||||
<result property="credit" column="CREDIT" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getAllCustomerCreditIds" resultClass="int">
|
||||
select ID from CUSTOMER
|
||||
</select>
|
||||
|
||||
<select id="getAllCustomerCredits" resultMap="result">
|
||||
select ID, NAME, CREDIT from CUSTOMER
|
||||
</select>
|
||||
|
||||
<select id="getCustomerCreditById" parameterClass="int" resultMap="result">
|
||||
select NAME, CREDIT from CUSTOMER where ID = #value#
|
||||
</select>
|
||||
|
||||
<update id="updateCredit" parameterClass="org.springframework.batch.sample.domain.trade.CustomerCredit" >
|
||||
update CUSTOMER set CREDIT = #credit# where NAME = #name#
|
||||
</update>
|
||||
</sqlMap>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="itemReader"
|
||||
class="org.springframework.batch.item.database.IbatisPagingItemReader">
|
||||
<property name="queryId" value="getAllCustomerCredits" />
|
||||
<property name="sqlMapClient" ref="sqlMapClient" />
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
</bean>
|
||||
|
||||
<bean id="itemWriter"
|
||||
class="org.springframework.batch.item.database.IbatisBatchItemWriter">
|
||||
<property name="statementId" value="updateCredit" />
|
||||
<property name="sqlMapClient" ref="sqlMapClient" />
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
</bean>
|
||||
|
||||
<bean id="sqlMapClient" class="com.ibatis.sqlmap.client.SqlMapClientBuilder" factory-method="buildSqlMapClient">
|
||||
<constructor-arg value="ibatis-config.xml"/>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright 2008-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.iosample;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = "/jobs/iosample/ibatis.xml")
|
||||
public class IbatisFunctionalTests extends AbstractIoSampleTests {
|
||||
|
||||
@Override
|
||||
protected void pointReaderToOutput(ItemReader<CustomerCredit> reader) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user