RESOLVED - BATCH-863: introduce LineMapper interface to encapsulate string-to-item mapping
use DefaultLineMapper instead of PassThrough in customerFilterJob
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user