BATCH-965: renamed batch writer to JdbcBatchItemWriter and added named parameter support, added JPA and Hibernate writers
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="itemWriter" class="org.springframework.batch.item.database.BatchSqlUpdateItemWriter">
|
||||
<property name="jdbcTemplate" ref="jdbcTemplate" />
|
||||
<bean id="itemWriter" class="org.springframework.batch.item.database.JdbcBatchItemWriter">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="sql">
|
||||
<util:constant static-field="org.springframework.batch.sample.domain.trade.internal.CustomerCreditUpdatePreparedStatementSetter.QUERY"/>
|
||||
</property>
|
||||
@@ -31,7 +31,7 @@
|
||||
<bean class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditUpdatePreparedStatementSetter" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<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 " />
|
||||
|
||||
@@ -135,10 +135,10 @@ Spring Batch Samples
|
||||
* Batch Update ({batchUpdate})
|
||||
|
||||
The purpose of this sample is to show to usage of the
|
||||
<<<BatchSqlUpdateItemWriter>>> to make efficient updates to a
|
||||
<<<JdbcBatchItemWriter>>> to make efficient updates to a
|
||||
database table.
|
||||
|
||||
The <<<BatchSqlUpdateItemWriter>>> accepts a special form of
|
||||
The <<<JdbcBatchItemWriter>>> accepts a special form of
|
||||
<<<PreparedStatementSetter>>> as a (mandatory) dependency. This is
|
||||
responsible for copying fields from the item to be written to a
|
||||
<<<PreparedStatement>>> matching the SQL query that has been
|
||||
|
||||
@@ -5,12 +5,12 @@ import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
/**
|
||||
* Test for BatchSqlUpdateJob - checks that customer credit has been updated to expected value.
|
||||
* Test for JdbcBatchItemWriterJob - checks that customer credit has been updated to expected value.
|
||||
*
|
||||
* @author Robert Kasanicky
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration
|
||||
public class BatchSqlUpdateJobFunctionalTests extends AbstractCustomerCreditIncreaseTests {
|
||||
public class JdbcBatchJobFunctionalTests extends AbstractCustomerCreditIncreaseTests {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user