public class CompositeCustomerUpdateLineTokenizer extends StepExecutionListenerSupport implements 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)
Initialize the state of the listener with the
StepExecution from
the current scope. |
void |
setCustomerTokenizer(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(LineTokenizer footerTokenizer)
Set the
LineTokenizer that will be used to tokenize any lines that being with
F and is thus a footer record. |
FieldSet |
tokenize(java.lang.String line)
Yields the tokens resulting from the splitting of the supplied
line. |
afterSteppublic CompositeCustomerUpdateLineTokenizer()
public FieldSet tokenize(java.lang.String line)
LineTokenizerline.tokenize in interface LineTokenizerline - the line to be tokenized (can be null)public void beforeStep(StepExecution stepExecution)
StepExecutionListenerStepExecution from
the current scope.beforeStep in interface StepExecutionListenerbeforeStep in class StepExecutionListenerSupportstepExecution - instance of StepExecution.public void setCustomerTokenizer(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 - tokenizer to delegate to for customer operation recordspublic void setFooterTokenizer(LineTokenizer footerTokenizer)
LineTokenizer that will be used to tokenize any lines that being with
F and is thus a footer record.footerTokenizer - tokenizer to delegate to for footer records