Rename *Writer as *Dao if they don't implement ItemWriter
This commit is contained in:
@@ -18,7 +18,7 @@ package org.springframework.batch.sample.dao;
|
||||
|
||||
import org.springframework.batch.sample.domain.CustomerDebit;
|
||||
|
||||
public interface CustomerDebitWriter {
|
||||
public interface CustomerDebitDao {
|
||||
|
||||
void write(CustomerDebit customerDebit);
|
||||
}
|
||||
@@ -28,7 +28,7 @@ import org.springframework.beans.factory.DisposableBean;
|
||||
* @see CustomerCreditDao
|
||||
* @author Robert Kasanicky
|
||||
*/
|
||||
public class FlatFileCustomerCreditWriter implements CustomerCreditDao,
|
||||
public class FlatFileCustomerCreditDao implements CustomerCreditDao,
|
||||
DisposableBean {
|
||||
|
||||
private ItemWriter outputSource;
|
||||
@@ -29,7 +29,7 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
public class HibernateCreditWriter extends HibernateDaoSupport implements
|
||||
public class HibernateCreditDao extends HibernateDaoSupport implements
|
||||
CustomerCreditDao, RepeatListener {
|
||||
|
||||
private int failOnFlush = -1;
|
||||
@@ -22,7 +22,7 @@ import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
|
||||
* @author Lucas Ward
|
||||
*
|
||||
*/
|
||||
public class IbatisCustomerCreditWriter extends SqlMapClientDaoSupport
|
||||
public class IbatisCustomerCreditDao extends SqlMapClientDaoSupport
|
||||
implements CustomerCreditDao {
|
||||
|
||||
String statementId;
|
||||
@@ -25,7 +25,7 @@ import org.springframework.jdbc.core.JdbcOperations;
|
||||
*
|
||||
* @author Robert Kasanicky
|
||||
*/
|
||||
public class JdbcCustomerDebitWriter implements CustomerDebitWriter {
|
||||
public class JdbcCustomerDebitDao implements CustomerDebitDao {
|
||||
|
||||
private static final String UPDATE_CREDIT = "UPDATE customer SET credit= credit-? WHERE name=?";
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.batch.sample.item.writer;
|
||||
|
||||
import org.springframework.batch.item.writer.AbstractItemWriter;
|
||||
import org.springframework.batch.sample.dao.JdbcCustomerDebitWriter;
|
||||
import org.springframework.batch.sample.dao.JdbcCustomerDebitDao;
|
||||
import org.springframework.batch.sample.domain.CustomerDebit;
|
||||
import org.springframework.batch.sample.domain.Trade;
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.batch.sample.domain.Trade;
|
||||
* @author Robert Kasanicky
|
||||
*/
|
||||
public class CustomerUpdateWriter extends AbstractItemWriter {
|
||||
private JdbcCustomerDebitWriter dao;
|
||||
private JdbcCustomerDebitDao dao;
|
||||
|
||||
public void write(Object data) {
|
||||
Trade trade = (Trade) data;
|
||||
@@ -38,7 +38,7 @@ public class CustomerUpdateWriter extends AbstractItemWriter {
|
||||
dao.write(customerDebit);
|
||||
}
|
||||
|
||||
public void setDao(JdbcCustomerDebitWriter outputSource) {
|
||||
public void setDao(JdbcCustomerDebitDao outputSource) {
|
||||
this.dao = outputSource;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user