IN PROGRESS - BATCH-693: Refactor samples along domain contours
added internal subpackages
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@@ -1,7 +1,8 @@
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.football.Game;
|
||||
|
||||
public class GameFieldSetMapper implements FieldSetMapper<Game> {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import org.springframework.batch.item.ClearFailedException;
|
||||
import org.springframework.batch.item.FlushFailedException;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.football.Game;
|
||||
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
|
||||
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
|
||||
import org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport;
|
||||
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import org.springframework.batch.sample.domain.football.Player;
|
||||
import org.springframework.batch.sample.domain.football.PlayerDao;
|
||||
import org.springframework.jdbc.core.support.JdbcDaoSupport;
|
||||
|
||||
/**
|
||||
@@ -1,8 +1,9 @@
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import org.springframework.batch.item.ClearFailedException;
|
||||
import org.springframework.batch.item.FlushFailedException;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.football.PlayerSummary;
|
||||
import org.springframework.jdbc.core.support.JdbcDaoSupport;
|
||||
|
||||
public class JdbcPlayerSummaryDao extends JdbcDaoSupport implements ItemWriter<PlayerSummary> {
|
||||
@@ -1,7 +1,8 @@
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.football.Player;
|
||||
|
||||
public class PlayerFieldSetMapper implements FieldSetMapper<Player> {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import org.springframework.batch.item.support.AbstractItemWriter;
|
||||
import org.springframework.batch.sample.domain.football.Player;
|
||||
import org.springframework.batch.sample.domain.football.PlayerDao;
|
||||
|
||||
public class PlayerItemWriter extends AbstractItemWriter<Player> {
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.batch.sample.domain.football.PlayerSummary;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
/**
|
||||
@@ -13,11 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.batch.sample.domain.football.PlayerSummary;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
/**
|
||||
@@ -14,10 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order;
|
||||
package org.springframework.batch.sample.domain.order.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.Address;
|
||||
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order;
|
||||
package org.springframework.batch.sample.domain.order.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.BillingInfo;
|
||||
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order;
|
||||
package org.springframework.batch.sample.domain.order.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.Customer;
|
||||
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order;
|
||||
package org.springframework.batch.sample.domain.order.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.Order;
|
||||
|
||||
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order;
|
||||
package org.springframework.batch.sample.domain.order.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
|
||||
|
||||
public class OrderItemFieldSetMapper implements FieldSetMapper<LineItem> {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order;
|
||||
package org.springframework.batch.sample.domain.order.internal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -24,6 +24,12 @@ import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.item.support.AbstractItemReader;
|
||||
import org.springframework.batch.sample.domain.order.Address;
|
||||
import org.springframework.batch.sample.domain.order.BillingInfo;
|
||||
import org.springframework.batch.sample.domain.order.Customer;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.Order;
|
||||
import org.springframework.batch.sample.domain.order.ShippingInfo;
|
||||
|
||||
/**
|
||||
* @author peter.zozom
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order;
|
||||
package org.springframework.batch.sample.domain.order.internal;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
@@ -25,6 +25,11 @@ import org.springframework.batch.item.file.mapping.DefaultFieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.transform.LineAggregator;
|
||||
import org.springframework.batch.item.transform.ItemTransformer;
|
||||
import org.springframework.batch.sample.domain.order.Address;
|
||||
import org.springframework.batch.sample.domain.order.BillingInfo;
|
||||
import org.springframework.batch.sample.domain.order.Customer;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.Order;
|
||||
|
||||
/**
|
||||
* Converts <code>Order</code> object to a String.
|
||||
@@ -14,10 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order;
|
||||
package org.springframework.batch.sample.domain.order.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.ShippingInfo;
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.xml;
|
||||
package org.springframework.batch.sample.domain.order.internal.xml;
|
||||
|
||||
import org.apache.commons.lang.builder.ToStringBuilder;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.xml;
|
||||
package org.springframework.batch.sample.domain.order.internal.xml;
|
||||
|
||||
|
||||
/**
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.xml;
|
||||
package org.springframework.batch.sample.domain.order.internal.xml;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.order.xml;
|
||||
package org.springframework.batch.sample.domain.order.internal.xml;
|
||||
|
||||
|
||||
/**
|
||||
@@ -14,11 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.person;
|
||||
package org.springframework.batch.sample.domain.person.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.batch.item.support.AbstractItemWriter;
|
||||
import org.springframework.batch.sample.domain.person.Person;
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.springframework.batch.item.support.AbstractItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
|
||||
/**
|
||||
* Increases customer's credit by fixed amount.
|
||||
@@ -1,8 +1,9 @@
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
public class CustomerCreditRowMapper implements RowMapper {
|
||||
@@ -13,13 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.batch.item.database.ItemPreparedStatementSetter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
@@ -14,9 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.support.AbstractItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
|
||||
|
||||
|
||||
@@ -14,11 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebit;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
|
||||
@@ -14,9 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.support.AbstractItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebitDao;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
|
||||
|
||||
/**
|
||||
@@ -14,11 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.item.ItemStream;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.beans.factory.DisposableBean;
|
||||
|
||||
/**
|
||||
@@ -1,10 +1,11 @@
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.MarkFailedException;
|
||||
import org.springframework.batch.item.ResetFailedException;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
|
||||
/**
|
||||
* Generates configurable number of {@link Trade} items.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -21,6 +21,8 @@ import java.util.List;
|
||||
import org.springframework.batch.repeat.ExitStatus;
|
||||
import org.springframework.batch.repeat.RepeatContext;
|
||||
import org.springframework.batch.repeat.RepeatListener;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
|
||||
/**
|
||||
@@ -46,7 +48,7 @@ public class HibernateCreditDao extends HibernateDaoSupport implements
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.springframework.batch.sample.domain.trade.CustomerCreditWriter#write(org.springframework.batch.sample.domain.CustomerCredit)
|
||||
* @see org.springframework.batch.sample.domain.trade.internal.CustomerCreditWriter#write(org.springframework.batch.sample.domain.CustomerCredit)
|
||||
*/
|
||||
public void writeCredit(CustomerCredit customerCredit) {
|
||||
if (customerCredit.getId() == failOnFlush) {
|
||||
@@ -13,8 +13,10 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
|
||||
|
||||
/**
|
||||
@@ -27,7 +29,7 @@ public class IbatisCustomerCreditDao extends SqlMapClientDaoSupport
|
||||
String statementId;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.batch.sample.domain.trade.CustomerCreditWriter#write(org.springframework.batch.sample.domain.CustomerCredit)
|
||||
* @see org.springframework.batch.sample.domain.trade.internal.CustomerCreditWriter#write(org.springframework.batch.sample.domain.CustomerCredit)
|
||||
*/
|
||||
public void writeCredit(CustomerCredit customerCredit) {
|
||||
|
||||
@@ -14,10 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebitDao;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.simple.SimpleJdbcOperations;
|
||||
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
|
||||
@@ -14,10 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.sample.domain.trade.TradeDao;
|
||||
import org.springframework.jdbc.core.JdbcOperations;
|
||||
import org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer;
|
||||
|
||||
@@ -14,11 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.item.support.AggregateItemReader;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
|
||||
|
||||
|
||||
@@ -14,11 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
public class TradeRowMapper implements RowMapper {
|
||||
@@ -14,11 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.batch.item.support.AbstractItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.sample.domain.trade.TradeDao;
|
||||
|
||||
/**
|
||||
* Delegates the actual writing to custom DAO delegate. Allows configurable
|
||||
@@ -28,7 +28,7 @@
|
||||
<value><![CDATA[UPDATE CUSTOMER SET CREDIT=? WHERE ID=?]]></value>
|
||||
</property>
|
||||
<property name="itemPreparedStatementSetter">
|
||||
<bean class="org.springframework.batch.sample.domain.trade.CustomerCreditUpdatePreparedStatementSetter" />
|
||||
<bean class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditUpdatePreparedStatementSetter" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="sql" value="SELECT id, name, credit FROM customer " />
|
||||
<property name="mapper">
|
||||
<bean class="org.springframework.batch.sample.domain.trade.CustomerCreditRowMapper" />
|
||||
<bean class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditRowMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</property>
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.TradeWriter">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeWriter">
|
||||
<property name="dao" ref="tradeDao" />
|
||||
</bean>
|
||||
</property>
|
||||
@@ -35,7 +35,7 @@
|
||||
ref="personFileItemReader" />
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.person.PersonWriter" />
|
||||
class="org.springframework.batch.sample.domain.person.internal.PersonWriter" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="tradeDao"
|
||||
class="org.springframework.batch.sample.domain.trade.JdbcTradeDao">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.JdbcTradeDao">
|
||||
<property name="jdbcTemplate" ref="jdbcTemplate" />
|
||||
<property name="incrementer">
|
||||
<bean parent="incrementerParent">
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<property name="delegates">
|
||||
<list>
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.TradeWriter">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeWriter">
|
||||
<property name="dao" ref="tradeDao" />
|
||||
</bean>
|
||||
<ref bean="fileItemWriter" />
|
||||
@@ -77,7 +77,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="tradeDao"
|
||||
class="org.springframework.batch.sample.domain.trade.JdbcTradeDao">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.JdbcTradeDao">
|
||||
<property name="jdbcTemplate" ref="jdbcTemplate" />
|
||||
<property name="incrementer">
|
||||
<bean parent="incrementerParent">
|
||||
@@ -98,6 +98,6 @@
|
||||
</bean>
|
||||
|
||||
<bean id="fieldSetMapper"
|
||||
class="org.springframework.batch.sample.domain.trade.TradeFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper" />
|
||||
|
||||
</beans>
|
||||
@@ -18,7 +18,7 @@
|
||||
</bean>
|
||||
</property>
|
||||
<property name="itemWriter">
|
||||
<bean class="org.springframework.batch.sample.domain.trade.TradeWriter">
|
||||
<bean class="org.springframework.batch.sample.domain.trade.internal.TradeWriter">
|
||||
<property name="dao" ref="tradeDao" />
|
||||
</bean>
|
||||
</property>
|
||||
@@ -57,7 +57,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="tradeDao" class="org.springframework.batch.sample.domain.trade.JdbcTradeDao">
|
||||
<bean id="tradeDao" class="org.springframework.batch.sample.domain.trade.internal.JdbcTradeDao">
|
||||
<property name="jdbcTemplate" ref="jdbcTemplate" />
|
||||
<property name="incrementer">
|
||||
<bean parent="incrementerParent">
|
||||
@@ -67,6 +67,6 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="fieldSetMapper" class="org.springframework.batch.sample.domain.trade.TradeFieldSetMapper" />
|
||||
<bean id="fieldSetMapper" class="org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper" />
|
||||
|
||||
</beans>
|
||||
@@ -19,10 +19,10 @@
|
||||
ref="playerFileItemReader" />
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.PlayerItemWriter">
|
||||
class="org.springframework.batch.sample.domain.football.internal.PlayerItemWriter">
|
||||
<property name="playerDao">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.JdbcPlayerDao">
|
||||
class="org.springframework.batch.sample.domain.football.internal.JdbcPlayerDao">
|
||||
<property name="dataSource"
|
||||
ref="dataSource" />
|
||||
</bean>
|
||||
@@ -35,7 +35,7 @@
|
||||
ref="gameFileItemReader" />
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.JdbcGameDao">
|
||||
class="org.springframework.batch.sample.domain.football.internal.JdbcGameDao">
|
||||
<property name="dataSource"
|
||||
ref="dataSource" />
|
||||
</bean>
|
||||
@@ -48,7 +48,7 @@
|
||||
ref="playerSummarizationSource" />
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.JdbcPlayerSummaryDao">
|
||||
class="org.springframework.batch.sample.domain.football.internal.JdbcPlayerSummaryDao">
|
||||
<property name="dataSource"
|
||||
ref="dataSource" />
|
||||
</bean>
|
||||
@@ -71,7 +71,7 @@
|
||||
</property>
|
||||
<property name="fieldSetMapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.PlayerFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.football.internal.PlayerFieldSetMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</property>
|
||||
<property name="fieldSetMapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.GameFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.football.internal.GameFieldSetMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="mapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.PlayerSummaryMapper" />
|
||||
class="org.springframework.batch.sample.domain.football.internal.PlayerSummaryMapper" />
|
||||
</property>
|
||||
<property name="sql">
|
||||
<value>
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
</bean>
|
||||
|
||||
<bean id="hibernateCreditWriter"
|
||||
class="org.springframework.batch.sample.domain.trade.CustomerCreditIncreaseWriter">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseWriter">
|
||||
<property name="customerCreditDao" ref="customerCreditDao" />
|
||||
</bean>
|
||||
|
||||
<bean id="customerCreditDao"
|
||||
class="org.springframework.batch.sample.domain.trade.HibernateCreditDao">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.HibernateCreditDao">
|
||||
<property name="sessionFactory" ref="sessionFactory" />
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
<property name="itemReader" ref="ibatisItemReader" />
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.CustomerCreditIncreaseWriter">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseWriter">
|
||||
<property name="customerCreditDao">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.IbatisCustomerCreditDao">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.IbatisCustomerCreditDao">
|
||||
<property name="sqlMapClient"
|
||||
ref="sqlMapClient" />
|
||||
<property name="statementId"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</bean-->
|
||||
<bean id="infiniteStep" parent="simpleStep">
|
||||
<property name="itemReader">
|
||||
<bean id="reader" class="org.springframework.batch.sample.domain.trade.GeneratingTradeItemReader">
|
||||
<bean id="reader" class="org.springframework.batch.sample.domain.trade.internal.GeneratingTradeItemReader">
|
||||
<property name="limit" value="1000000" />
|
||||
</bean>
|
||||
</property>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</property>
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.TradeWriter">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeWriter">
|
||||
<property name="dao" ref="tradeDao" />
|
||||
</bean>
|
||||
</property>
|
||||
@@ -75,7 +75,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="tradeDao"
|
||||
class="org.springframework.batch.sample.domain.trade.JdbcTradeDao">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.JdbcTradeDao">
|
||||
<property name="jdbcTemplate" ref="jdbcTemplate" />
|
||||
<property name="incrementer">
|
||||
<bean parent="incrementerParent">
|
||||
@@ -86,6 +86,6 @@
|
||||
</bean>
|
||||
|
||||
<bean id="fieldSetMapper"
|
||||
class="org.springframework.batch.sample.domain.trade.TradeFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper" />
|
||||
|
||||
</beans>
|
||||
@@ -42,7 +42,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="tradeLineMapper"
|
||||
class="org.springframework.batch.sample.domain.trade.TradeFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper" />
|
||||
|
||||
<bean id="fixedFileDescriptor"
|
||||
class="org.springframework.batch.item.file.transform.PrefixMatchingCompositeLineTokenizer">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
class="org.springframework.batch.item.validator.ValidatingItemReader">
|
||||
<property name="itemReader">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.order.OrderItemReader">
|
||||
class="org.springframework.batch.sample.domain.order.internal.OrderItemReader">
|
||||
<property name="fieldSetReader"
|
||||
ref="fileItemReader" />
|
||||
<property name="headerMapper"
|
||||
@@ -55,24 +55,24 @@
|
||||
<property name="delegate" ref="flatFileTransformerWriter" />
|
||||
<property name="itemTransformer">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.order.OrderTransformer">
|
||||
class="org.springframework.batch.sample.domain.order.internal.OrderTransformer">
|
||||
<property name="aggregators" ref="outputAggregators" />
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="headerFieldSetMapper"
|
||||
class="org.springframework.batch.sample.domain.order.HeaderFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.order.internal.HeaderFieldSetMapper" />
|
||||
<bean id="customerFieldSetMapper"
|
||||
class="org.springframework.batch.sample.domain.order.CustomerFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.order.internal.CustomerFieldSetMapper" />
|
||||
<bean id="addressFieldSetMapper"
|
||||
class="org.springframework.batch.sample.domain.order.AddressFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.order.internal.AddressFieldSetMapper" />
|
||||
<bean id="billingFieldSetMapper"
|
||||
class="org.springframework.batch.sample.domain.order.BillingFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.order.internal.BillingFieldSetMapper" />
|
||||
<bean id="orderItemFieldSetMapper"
|
||||
class="org.springframework.batch.sample.domain.order.OrderItemFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.order.internal.OrderItemFieldSetMapper" />
|
||||
<bean id="shippingFieldSetMapper"
|
||||
class="org.springframework.batch.sample.domain.order.ShippingFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.order.internal.ShippingFieldSetMapper" />
|
||||
|
||||
<bean id="validator"
|
||||
class="org.springframework.batch.item.validator.SpringValidator">
|
||||
@@ -131,23 +131,23 @@
|
||||
<property name="customFunctions">
|
||||
<map>
|
||||
<entry key="isFutureDate"
|
||||
value="org.springframework.batch.sample.domain.order.valang.FutureDateFunction" />
|
||||
value="org.springframework.batch.sample.domain.order.internal.valang.FutureDateFunction" />
|
||||
<entry key="validateTotalItemsCount"
|
||||
value="org.springframework.batch.sample.domain.order.valang.TotalOrderItemsFunction" />
|
||||
value="org.springframework.batch.sample.domain.order.internal.valang.TotalOrderItemsFunction" />
|
||||
<entry key="validateIds"
|
||||
value="org.springframework.batch.sample.domain.order.valang.ValidateIdsFunction" />
|
||||
value="org.springframework.batch.sample.domain.order.internal.valang.ValidateIdsFunction" />
|
||||
<entry key="validatePrices"
|
||||
value="org.springframework.batch.sample.domain.order.valang.ValidatePricesFunction" />
|
||||
value="org.springframework.batch.sample.domain.order.internal.valang.ValidatePricesFunction" />
|
||||
<entry key="validateDiscounts"
|
||||
value="org.springframework.batch.sample.domain.order.valang.ValidateDiscountsFunction" />
|
||||
value="org.springframework.batch.sample.domain.order.internal.valang.ValidateDiscountsFunction" />
|
||||
<entry key="validateShippingPrices"
|
||||
value="org.springframework.batch.sample.domain.order.valang.ValidateShippingPricesFunction" />
|
||||
value="org.springframework.batch.sample.domain.order.internal.valang.ValidateShippingPricesFunction" />
|
||||
<entry key="validateHandlingPrices"
|
||||
value="org.springframework.batch.sample.domain.order.valang.ValidateHandlingPricesFunction" />
|
||||
value="org.springframework.batch.sample.domain.order.internal.valang.ValidateHandlingPricesFunction" />
|
||||
<entry key="validateQuantities"
|
||||
value="org.springframework.batch.sample.domain.order.valang.ValidateQuantitiesFunction" />
|
||||
value="org.springframework.batch.sample.domain.order.internal.valang.ValidateQuantitiesFunction" />
|
||||
<entry key="validateTotalPrices"
|
||||
value="org.springframework.batch.sample.domain.order.valang.ValidateTotalPricesFunction" />
|
||||
value="org.springframework.batch.sample.domain.order.internal.valang.ValidateTotalPricesFunction" />
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</property>
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.TradeWriter">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeWriter">
|
||||
<property name="dao" ref="tradeDao" />
|
||||
</bean>
|
||||
</property>
|
||||
@@ -104,7 +104,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="tradeDao"
|
||||
class="org.springframework.batch.sample.domain.trade.JdbcTradeDao">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.JdbcTradeDao">
|
||||
<property name="jdbcTemplate" ref="jdbcTemplate" />
|
||||
<property name="incrementer">
|
||||
<bean parent="incrementerParent">
|
||||
@@ -115,7 +115,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="fieldSetMapper"
|
||||
class="org.springframework.batch.sample.domain.trade.TradeFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper" />
|
||||
|
||||
<aop:config>
|
||||
<aop:aspect id="moduleLogging" ref="logAdvice">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</property>
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.TradeWriter">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeWriter">
|
||||
<property name="dao" ref="tradeDao" />
|
||||
</bean>
|
||||
</property>
|
||||
@@ -70,7 +70,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="tradeDao"
|
||||
class="org.springframework.batch.sample.domain.trade.JdbcTradeDao">
|
||||
class="org.springframework.batch.sample.domain.trade.internal.JdbcTradeDao">
|
||||
<property name="jdbcTemplate" ref="jdbcTemplate" />
|
||||
<property name="incrementer">
|
||||
<bean parent="incrementerParent">
|
||||
@@ -81,6 +81,6 @@
|
||||
</bean>
|
||||
|
||||
<bean id="fieldSetMapper"
|
||||
class="org.springframework.batch.sample.domain.trade.TradeFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper" />
|
||||
|
||||
</beans>
|
||||
@@ -19,7 +19,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="itemGenerator" class="org.springframework.batch.sample.domain.trade.GeneratingTradeItemReader">
|
||||
<bean id="itemGenerator" class="org.springframework.batch.sample.domain.trade.internal.GeneratingTradeItemReader">
|
||||
<property name="limit" value="10" />
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</property>
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.TradeWriter"
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeWriter"
|
||||
p:dao-ref="tradeDao" p:failure="3" />
|
||||
</property>
|
||||
</bean>
|
||||
@@ -57,7 +57,7 @@
|
||||
value="SELECT id, quantity, price, customer from TRADE" />
|
||||
<property name="mapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.TradeRowMapper" />
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeRowMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
value="SELECT id, name, credit FROM customer " />
|
||||
<property name="mapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.CustomerCreditRowMapper" />
|
||||
class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditRowMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</property>
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.TradeWriter"
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeWriter"
|
||||
p:dao-ref="tradeDao" />
|
||||
</property>
|
||||
</bean>
|
||||
@@ -36,7 +36,7 @@
|
||||
ref="tradeSqlItemReader" />
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.CustomerUpdateWriter"
|
||||
class="org.springframework.batch.sample.domain.trade.internal.CustomerUpdateWriter"
|
||||
p:dao-ref="customerDao" />
|
||||
</property>
|
||||
</bean>
|
||||
@@ -45,7 +45,7 @@
|
||||
ref="customerSqlItemReader" />
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.CustomerCreditUpdateWriter"
|
||||
class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditUpdateWriter"
|
||||
p:dao-ref="customerReportItemWriter" />
|
||||
</property>
|
||||
</bean>
|
||||
@@ -60,7 +60,7 @@
|
||||
value="SELECT id, quantity, price, customer from TRADE" />
|
||||
<property name="mapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.TradeRowMapper" />
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeRowMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
value="SELECT id, name, credit FROM customer " />
|
||||
<property name="mapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.CustomerCreditRowMapper" />
|
||||
class="org.springframework.batch.sample.domain.trade.internal.CustomerCreditRowMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
|
||||
|
||||
|
||||
<bean class="org.springframework.batch.sample.domain.trade.JdbcTradeDao"
|
||||
<bean class="org.springframework.batch.sample.domain.trade.internal.JdbcTradeDao"
|
||||
id="tradeDao" p:jdbcTemplate-ref="jdbcTemplate">
|
||||
<property name="incrementer">
|
||||
<bean parent="incrementerParent">
|
||||
@@ -19,11 +19,11 @@
|
||||
</bean>
|
||||
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.JdbcCustomerDebitDao"
|
||||
class="org.springframework.batch.sample.domain.trade.internal.JdbcCustomerDebitDao"
|
||||
id="customerDao" p:dataSource-ref="dataSource" />
|
||||
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.FlatFileCustomerCreditDao"
|
||||
class="org.springframework.batch.sample.domain.trade.internal.FlatFileCustomerCreditDao"
|
||||
id="customerReportItemWriter">
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
@@ -44,7 +44,7 @@
|
||||
<property name="lineTokenizer" ref="tradeFileDescriptor" />
|
||||
<property name="fieldSetMapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.trade.TradeFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
</type-aliases>
|
||||
<field-aliases>
|
||||
<field-alias>
|
||||
<alias-name>org.springframework.batch.sample.domain.order.xml.Customer</alias-name>
|
||||
<type>org.springframework.batch.sample.domain.order.xml.Order</type>
|
||||
<alias-name>org.springframework.batch.sample.domain.order.internal.xml.Customer</alias-name>
|
||||
<type>org.springframework.batch.sample.domain.order.internal.xml.Order</type>
|
||||
<field-name>customer</field-name>
|
||||
</field-alias>
|
||||
<field-alias>
|
||||
<alias-name>org.springframework.batch.sample.domain.order.xml.Shipper</alias-name>
|
||||
<type>org.springframework.batch.sample.domain.order.xml.Order</type>
|
||||
<alias-name>org.springframework.batch.sample.domain.order.internal.xml.Shipper</alias-name>
|
||||
<type>org.springframework.batch.sample.domain.order.internal.xml.Order</type>
|
||||
<field-name>shipper</field-name>
|
||||
</field-alias>
|
||||
</field-aliases>
|
||||
@@ -51,25 +51,25 @@
|
||||
<namespaceURI>http://adsj.accenture.com/purchaseorders</namespaceURI>
|
||||
<localPart>order</localPart>
|
||||
<prefix></prefix>
|
||||
<class-name>org.springframework.batch.sample.domain.order.xml.Order</class-name>
|
||||
<class-name>org.springframework.batch.sample.domain.order.internal.xml.Order</class-name>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<namespaceURI>http://adsj.accenture.com/purchaseorders</namespaceURI>
|
||||
<localPart>customer</localPart>
|
||||
<prefix></prefix>
|
||||
<class-name>org.springframework.batch.sample.domain.order.xml.Customer</class-name>
|
||||
<class-name>org.springframework.batch.sample.domain.order.internal.xml.Customer</class-name>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<namespaceURI>http://adsj.accenture.com/purchaseorders</namespaceURI>
|
||||
<localPart>shipper</localPart>
|
||||
<prefix></prefix>
|
||||
<class-name>org.springframework.batch.sample.domain.order.xml.Shipper</class-name>
|
||||
<class-name>org.springframework.batch.sample.domain.order.internal.xml.Shipper</class-name>
|
||||
</mapping>
|
||||
<mapping>
|
||||
<namespaceURI>http://adsj.accenture.com/purchaseorders</namespaceURI>
|
||||
<localPart>lineItem</localPart>
|
||||
<prefix></prefix>
|
||||
<class-name>org.springframework.batch.sample.domain.order.xml.LineItem</class-name>
|
||||
<class-name>org.springframework.batch.sample.domain.order.internal.xml.LineItem</class-name>
|
||||
</mapping>
|
||||
</mappings>
|
||||
</configuration>
|
||||
|
||||
@@ -425,10 +425,10 @@ AbduKa00,1996,mia,15,nyg,0,0,0,0,0,17,96,,14,0
|
||||
ref="playerFileItemReader" />
|
||||
<property name="itemWriter">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.PlayerItemWriter">
|
||||
class="org.springframework.batch.sample.domain.football.internal.internal.PlayerItemWriter">
|
||||
<property name="playerDao">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.JdbcPlayerDao">
|
||||
class="org.springframework.batch.sample.domain.football.internal.internal.JdbcPlayerDao">
|
||||
<property name="dataSource"
|
||||
ref="dataSource" />
|
||||
</bean>
|
||||
@@ -504,7 +504,7 @@ AbduKa00,1996,mia,15,nyg,0,0,0,0,0,17,96,,14,0
|
||||
</property>
|
||||
<property name="fieldSetMapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.PlayerFieldSetMapper" />
|
||||
class="org.springframework.batch.sample.domain.football.internal.internal.PlayerFieldSetMapper" />
|
||||
</property>
|
||||
</bean>
|
||||
+---
|
||||
@@ -581,7 +581,7 @@ public class
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="mapper">
|
||||
<bean
|
||||
class="org.springframework.batch.sample.domain.football.PlayerSummaryMapper" />
|
||||
class="org.springframework.batch.sample.domain.football.internal.internal.PlayerSummaryMapper" />
|
||||
</property>
|
||||
<property name="sql">
|
||||
<value>
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditIncreaseWriter;
|
||||
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseWriter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcOperations;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.batch.item.file.FlatFileItemReader;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.item.file.transform.LineTokenizer;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.sample.domain.trade.TradeFieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.JobParametersBuilder;
|
||||
import org.springframework.batch.sample.domain.trade.HibernateCreditDao;
|
||||
import org.springframework.batch.sample.domain.trade.internal.HibernateCreditDao;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.UncategorizedSQLException;
|
||||
import org.springframework.orm.hibernate3.HibernateJdbcException;
|
||||
|
||||
@@ -3,7 +3,7 @@ package org.springframework.batch.sample;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.sample.domain.trade.GeneratingTradeItemReader;
|
||||
import org.springframework.batch.sample.domain.trade.internal.GeneratingTradeItemReader;
|
||||
import org.springframework.batch.sample.support.RetrySampleItemWriter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.sample.domain.football.Game;
|
||||
import org.springframework.batch.sample.domain.football.JdbcGameDao;
|
||||
import org.springframework.batch.sample.domain.football.internal.JdbcGameDao;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
|
||||
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@@ -25,8 +25,8 @@ import javax.sql.DataSource;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.sample.domain.football.JdbcPlayerDao;
|
||||
import org.springframework.batch.sample.domain.football.Player;
|
||||
import org.springframework.batch.sample.domain.football.internal.JdbcPlayerDao;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowCallbackHandler;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.football;
|
||||
package org.springframework.batch.sample.domain.football.internal;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@@ -22,9 +22,9 @@ import javax.sql.DataSource;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.sample.domain.football.JdbcPlayerSummaryDao;
|
||||
import org.springframework.batch.sample.domain.football.PlayerSummary;
|
||||
import org.springframework.batch.sample.domain.football.PlayerSummaryMapper;
|
||||
import org.springframework.batch.sample.domain.football.internal.JdbcPlayerSummaryDao;
|
||||
import org.springframework.batch.sample.domain.football.internal.PlayerSummaryMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
@@ -4,7 +4,7 @@ import org.springframework.batch.item.file.mapping.DefaultFieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.Address;
|
||||
import org.springframework.batch.sample.domain.order.AddressFieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.internal.AddressFieldSetMapper;
|
||||
import org.springframework.batch.sample.support.AbstractFieldSetMapperTests;
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ package org.springframework.batch.sample.domain.order;
|
||||
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.BillingFieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.BillingInfo;
|
||||
import org.springframework.batch.sample.domain.order.internal.BillingFieldSetMapper;
|
||||
import org.springframework.batch.sample.support.AbstractFieldSetMapperTests;
|
||||
|
||||
public class BillingFieldSetMapperTests extends AbstractFieldSetMapperTests{
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.springframework.batch.item.file.mapping.DefaultFieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.Customer;
|
||||
import org.springframework.batch.sample.domain.order.CustomerFieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.internal.CustomerFieldSetMapper;
|
||||
import org.springframework.batch.sample.support.AbstractFieldSetMapperTests;
|
||||
|
||||
public class CustomerFieldSetMapperTests extends AbstractFieldSetMapperTests {
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.batch.sample.domain.order.BillingInfo;
|
||||
import org.springframework.batch.sample.domain.order.Customer;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.Order;
|
||||
import org.springframework.batch.sample.domain.order.OrderTransformer;
|
||||
import org.springframework.batch.sample.domain.order.internal.OrderTransformer;
|
||||
|
||||
public class FlatFileOrderWriterTests {
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import java.util.Calendar;
|
||||
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.HeaderFieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.Order;
|
||||
import org.springframework.batch.sample.domain.order.internal.HeaderFieldSetMapper;
|
||||
import org.springframework.batch.sample.support.AbstractFieldSetMapperTests;
|
||||
|
||||
public class HeaderFieldSetMapperTests extends AbstractFieldSetMapperTests {
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.springframework.batch.item.file.mapping.DefaultFieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.OrderItemFieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.internal.OrderItemFieldSetMapper;
|
||||
import org.springframework.batch.sample.support.AbstractFieldSetMapperTests;
|
||||
|
||||
public class OrderItemFieldSetMapperTests extends AbstractFieldSetMapperTests{
|
||||
|
||||
@@ -23,8 +23,8 @@ import org.springframework.batch.sample.domain.order.BillingInfo;
|
||||
import org.springframework.batch.sample.domain.order.Customer;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.Order;
|
||||
import org.springframework.batch.sample.domain.order.OrderItemReader;
|
||||
import org.springframework.batch.sample.domain.order.ShippingInfo;
|
||||
import org.springframework.batch.sample.domain.order.internal.OrderItemReader;
|
||||
|
||||
public class OrderItemReaderTests {
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.batch.sample.domain.order.BillingInfo;
|
||||
import org.springframework.batch.sample.domain.order.Customer;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.Order;
|
||||
import org.springframework.batch.sample.domain.order.OrderTransformer;
|
||||
import org.springframework.batch.sample.domain.order.internal.OrderTransformer;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
|
||||
@@ -3,8 +3,8 @@ package org.springframework.batch.sample.domain.order;
|
||||
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.ShippingFieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.order.ShippingInfo;
|
||||
import org.springframework.batch.sample.domain.order.internal.ShippingFieldSetMapper;
|
||||
import org.springframework.batch.sample.support.AbstractFieldSetMapperTests;
|
||||
|
||||
public class ShippingFieldSetMapperTests extends AbstractFieldSetMapperTests{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import static org.easymock.EasyMock.createMock;
|
||||
import static org.easymock.EasyMock.expect;
|
||||
@@ -11,7 +11,7 @@ import java.util.Date;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.order.valang.FutureDateFunction;
|
||||
import org.springframework.batch.sample.domain.order.internal.valang.FutureDateFunction;
|
||||
import org.springmodules.validation.valang.functions.Function;
|
||||
|
||||
public class FutureDateFunctionTests {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import static org.easymock.EasyMock.createMock;
|
||||
import static org.easymock.EasyMock.expect;
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.valang.TotalOrderItemsFunction;
|
||||
import org.springframework.batch.sample.domain.order.internal.valang.TotalOrderItemsFunction;
|
||||
import org.springmodules.validation.valang.functions.Function;
|
||||
|
||||
public class TotalOrderItemsFunctionTests {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import static org.easymock.EasyMock.createMock;
|
||||
import static org.easymock.EasyMock.expect;
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.valang.ValidateDiscountsFunction;
|
||||
import org.springframework.batch.sample.domain.order.internal.valang.ValidateDiscountsFunction;
|
||||
import org.springmodules.validation.valang.functions.Function;
|
||||
|
||||
public class ValidateDiscountsFunctionTests {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import static org.easymock.EasyMock.createMock;
|
||||
import static org.easymock.EasyMock.expect;
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.valang.ValidateHandlingPricesFunction;
|
||||
import org.springframework.batch.sample.domain.order.internal.valang.ValidateHandlingPricesFunction;
|
||||
import org.springmodules.validation.valang.functions.Function;
|
||||
|
||||
public class ValidateHandlingPricesFunctionTests {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import static org.easymock.EasyMock.createMock;
|
||||
import static org.easymock.EasyMock.expect;
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.valang.ValidateIdsFunction;
|
||||
import org.springframework.batch.sample.domain.order.internal.valang.ValidateIdsFunction;
|
||||
import org.springmodules.validation.valang.functions.Function;
|
||||
|
||||
public class ValidateIdsFunctionTests {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import static org.easymock.EasyMock.createMock;
|
||||
import static org.easymock.EasyMock.expect;
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.valang.ValidatePricesFunction;
|
||||
import org.springframework.batch.sample.domain.order.internal.valang.ValidatePricesFunction;
|
||||
import org.springmodules.validation.valang.functions.Function;
|
||||
|
||||
public class ValidatePricesFunctionTests {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import static org.easymock.EasyMock.createMock;
|
||||
import static org.easymock.EasyMock.expect;
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.valang.ValidateQuantitiesFunction;
|
||||
import org.springframework.batch.sample.domain.order.internal.valang.ValidateQuantitiesFunction;
|
||||
import org.springmodules.validation.valang.functions.Function;
|
||||
|
||||
public class ValidateQuantitiesFunctionTests {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import static org.easymock.EasyMock.createMock;
|
||||
import static org.easymock.EasyMock.expect;
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.valang.ValidateShippingPricesFunction;
|
||||
import org.springframework.batch.sample.domain.order.internal.valang.ValidateShippingPricesFunction;
|
||||
import org.springmodules.validation.valang.functions.Function;
|
||||
|
||||
public class ValidateShippingPricesFunctionTests {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.order.valang;
|
||||
package org.springframework.batch.sample.domain.order.internal.valang;
|
||||
|
||||
import static org.easymock.EasyMock.createMock;
|
||||
import static org.easymock.EasyMock.expect;
|
||||
@@ -14,7 +14,7 @@ import java.util.List;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.order.LineItem;
|
||||
import org.springframework.batch.sample.domain.order.valang.ValidateTotalPricesFunction;
|
||||
import org.springframework.batch.sample.domain.order.internal.valang.ValidateTotalPricesFunction;
|
||||
import org.springmodules.validation.valang.functions.Function;
|
||||
|
||||
public class ValidateTotalPricesFunctionTests {
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.math.BigDecimal;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditIncreaseWriter;
|
||||
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseWriter;
|
||||
|
||||
/**
|
||||
* Tests for {@link CustomerCreditIncreaseWriter}.
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
@@ -6,7 +6,7 @@ import java.sql.SQLException;
|
||||
|
||||
import org.easymock.MockControl;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditRowMapper;
|
||||
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditRowMapper;
|
||||
import org.springframework.batch.sample.support.AbstractRowMapperTests;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
@@ -23,7 +23,7 @@ import org.easymock.EasyMock;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditUpdatePreparedStatementSetter;
|
||||
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditUpdatePreparedStatementSetter;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
@@ -47,7 +47,7 @@ public class CustomerCreditUpdatePreparedStatementSetterTests {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for {@link org.springframework.batch.sample.domain.trade.CustomerCreditUpdatePreparedStatementSetter#setValues(CustomerCredit, PreparedStatement) }
|
||||
* Test method for {@link org.springframework.batch.sample.domain.trade.internal.CustomerCreditUpdatePreparedStatementSetter#setValues(CustomerCredit, PreparedStatement) }
|
||||
* @throws SQLException
|
||||
*/
|
||||
@Test
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditDao;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCreditUpdateWriter;
|
||||
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditUpdateWriter;
|
||||
|
||||
public class CustomerCreditUpdateProcessorTests {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@@ -7,8 +7,8 @@ import java.math.BigDecimal;
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebit;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebitDao;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerUpdateWriter;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.sample.domain.trade.internal.CustomerUpdateWriter;
|
||||
|
||||
public class CustomerUpdateProcessorTests {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import static org.easymock.EasyMock.createMock;
|
||||
import static org.easymock.EasyMock.replay;
|
||||
@@ -27,7 +27,7 @@ import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.item.ItemStream;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerCredit;
|
||||
import org.springframework.batch.sample.domain.trade.FlatFileCustomerCreditDao;
|
||||
import org.springframework.batch.sample.domain.trade.internal.FlatFileCustomerCreditDao;
|
||||
|
||||
public class FlatFileCustomerCreditDaoTests {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.sample.domain.trade.GeneratingTradeItemReader;
|
||||
import org.springframework.batch.sample.domain.trade.internal.GeneratingTradeItemReader;
|
||||
|
||||
/**
|
||||
* Tests for {@link GeneratingTradeItemReader}.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@@ -26,7 +26,7 @@ import javax.sql.DataSource;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.sample.domain.trade.CustomerDebit;
|
||||
import org.springframework.batch.sample.domain.trade.JdbcCustomerDebitDao;
|
||||
import org.springframework.batch.sample.domain.trade.internal.JdbcCustomerDebitDao;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.RowCallbackHandler;
|
||||
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@@ -25,8 +25,8 @@ import javax.sql.DataSource;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.batch.sample.domain.trade.JdbcTradeDao;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.sample.domain.trade.internal.JdbcTradeDao;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.core.RowCallbackHandler;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.sample.domain.trade;
|
||||
package org.springframework.batch.sample.domain.trade.internal;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.springframework.batch.item.file.mapping.FieldSet;
|
||||
import org.springframework.batch.item.file.mapping.FieldSetMapper;
|
||||
import org.springframework.batch.item.support.AggregateItemReader;
|
||||
import org.springframework.batch.sample.domain.trade.Trade;
|
||||
import org.springframework.batch.sample.domain.trade.TradeFieldSetMapper;
|
||||
import org.springframework.batch.sample.domain.trade.internal.TradeFieldSetMapper;
|
||||
import org.springframework.batch.sample.support.AbstractFieldSetMapperTests;
|
||||
|
||||
public class TradeFieldSetMapperTests extends AbstractFieldSetMapperTests {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user