RESOLVED - BATCH-863: introduce LineMapper interface to encapsulate string-to-item mapping

use DefaultLineMapper instead of PassThrough in customerFilterJob
This commit is contained in:
robokaso
2008-10-08 09:02:55 +00:00
parent aa87a9708d
commit 72623e1d05
3 changed files with 9 additions and 18 deletions

View File

@@ -47,10 +47,6 @@ public class CompositeCustomerUpdateLineTokenizer extends StepExecutionListenerS
//line starts with A,U, or D, so it must be a customer operation.
return customerTokenizer.process(line);
}
else if(line.charAt(0) == 'S'){
//header record, ignore
return null;
}
else{
//If the line doesn't start with any of the characters above, it must obviously be invalid.
throw new IllegalArgumentException("Invalid line encountered for tokenizing: " + line);

View File

@@ -13,8 +13,8 @@ import org.springframework.batch.item.ItemProcessor;
*/
public class CustomerUpdateProcessor implements ItemProcessor<CustomerUpdate, CustomerUpdate>{
CustomerDao customerDao;
InvalidCustomerLogger invalidCustomerLogger;
private CustomerDao customerDao;
private InvalidCustomerLogger invalidCustomerLogger;
public CustomerUpdate process(CustomerUpdate item) throws Exception {