public class CompositeCustomerUpdateLineTokenizer extends StepExecutionListenerSupport implements org.springframework.batch.item.file.transform.LineTokenizer
LineTokenizer
that delegates the tokenization of a line to one of two potential
tokenizers. The file format in this case uses one character, either F, A, U, or D to indicate
whether or not the line is an a footer record, or a customer add, update, or delete, and
will delegate accordingly.Constructor and Description |
---|
CompositeCustomerUpdateLineTokenizer() |
Modifier and Type | Method and Description |
---|---|
void |
beforeStep(StepExecution stepExecution) |
void |
setCustomerTokenizer(org.springframework.batch.item.file.transform.LineTokenizer customerTokenizer)
Set the
LineTokenizer that will be used to tokenize any lines that begin with
A, U, or D, and are thus a customer operation. |
void |
setFooterTokenizer(org.springframework.batch.item.file.transform.LineTokenizer footerTokenizer)
Set the
LineTokenizer that will be used to tokenize any lines that being with
F and is thus a footer record. |
org.springframework.batch.item.file.transform.FieldSet |
tokenize(String line) |
afterStep
public CompositeCustomerUpdateLineTokenizer()
public org.springframework.batch.item.file.transform.FieldSet tokenize(String line)
tokenize
in interface org.springframework.batch.item.file.transform.LineTokenizer
public void beforeStep(StepExecution stepExecution)
beforeStep
in interface StepExecutionListener
beforeStep
in class StepExecutionListenerSupport
public void setCustomerTokenizer(org.springframework.batch.item.file.transform.LineTokenizer customerTokenizer)
LineTokenizer
that will be used to tokenize any lines that begin with
A, U, or D, and are thus a customer operation.customerTokenizer
- public void setFooterTokenizer(org.springframework.batch.item.file.transform.LineTokenizer footerTokenizer)
LineTokenizer
that will be used to tokenize any lines that being with
F and is thus a footer record.footerTokenizer
- Copyright © 2014. All Rights Reserved.