Processor implementation for converting rows extracted from any implementation of AbstractParser into java objects.
The class types passed to the constructor of this class must contain the annotations provided in com..
For each row processed, one or more java bean instances of any given class will be created with their fields populated.
Once all beans are populated from an individual input record, they will be sent to through the AbstractMultiBeanRowProcessor#rowProcessed(Map, Context) method,
where the user can access all beans parsed for that row.
AbstractParser, Processor, AbstractBeanProcessor, AbstractMultiBeanProcessor
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private final HashMap |
| Access | Constructor and Description |
|---|---|
| public | AbstractMultiBeanRowProcessor(Class<T>...
the classes with their attributes mapped to fields of records parsed by an beanTypes)AbstractParser or written by an AbstractWriter.Creates a processor for java beans of multiple types |
| Modifier and Type | Method and Description |
|---|---|
| public final void | beanProcessed(Class<?>
the type of the object created by the parser using the information collected for an individual record. beanType, Object java object created with the information extracted by the parser for an individual record. beanInstance, C A contextual object with information and controls over the current state of the parsing process context)Implements abstract com. |
| public void | processEnded(C
A contextual object with information and controls over the state of the parsing process context)Overrides com. Implements com. |
| public void | processStarted(C
A contextual object with information and controls over the current state of the parsing process context)Overrides com. Implements com. |
| protected abstract void | rowProcessed(Map<Class<?>, Object>
a map containing all object instances generated from an input row. The map is reused internally. Make a copy if you want to keep the map. row, C A contextual object with information and controls over the current state of the parsing process context)Invoked by the processor after all beans of a valid record have been processed. |
| private void |
| record | back to summary |
|---|---|
| private long record | |
| row | back to summary |
|---|---|
| private final HashMap<Class<?>, Object> row | |
| AbstractMultiBeanRowProcessor | back to summary |
|---|---|
| public AbstractMultiBeanRowProcessor(Class<T>... beanTypes) Creates a processor for java beans of multiple types
| |
| beanProcessed | back to summary |
|---|---|
| public final void beanProcessed(Class<?> beanType, Object beanInstance, C context) Implements abstract com. Doc from com. Invoked by the processor after all values of a valid record have been processed and converted into a java object.
| |
| processEnded | back to summary |
|---|---|
| public void processEnded(C context) Overrides com. Implements com. Doc from com. This method will by invoked by the parser once, after the parsing process stopped and all resources were closed. It will always be called by the parser: in case of errors, if the end of the input us reached, or if the user stopped the process manually using
| |
| processStarted | back to summary |
|---|---|
| public void processStarted(C context) Overrides com. Implements com. Doc from com. This method will by invoked by the parser once, when it is ready to start processing the input.
| |
| rowProcessed | back to summary |
|---|---|
| protected abstract void rowProcessed(Map<Class<?>, Object> row, C context) Invoked by the processor after all beans of a valid record have been processed. | |
| submitRow | back to summary |
|---|---|
| private void submitRow(C context) | |