RowWriterProcessor implementation for converting annotated java objects into object arrays suitable for writing in any implementation of AbstractWriter.
The class type of the object must contain the annotations provided in com..
For any given java bean instance, this processor will read and convert annotated fields into an object array.
AbstractWriter, RowWriterProcessor, BeanConversionProcessor
| Modifier and Type | Field and Description |
|---|---|
| private NormalizedString[] | |
| private String[] |
| Access | Constructor and Description |
|---|---|
| public | BeanWriterProcessor(Class<T>
the class annotated with one or more of the annotations provided in beanType)com..Initializes the BeanWriterProcessor with the annotated bean class |
| Modifier and Type | Method and Description |
|---|---|
| protected FieldConversionMapping | cloneConversions()
Overrides com. |
| public Object[] | Returns: a row of objects containing the values extracted from the java beanan instance of the type defined in this class constructor. input, String[] All field names used to produce records in a given destination. May be null if no headers have been defined in headers, int[] CommonSettings#getHeaders()The indexes of the headers that are actually being written. May be null if no fields have been selected using indexesToWrite)CommonSettings#selectFields(String. or CommonSettings#selectIndexes(Integer.Converts the java bean instance into a sequence of values for writing. |
| public Object[] | Returns: a row of objects containing the values extracted from the java beanan instance of the type defined in this class constructor. input, NormalizedString[] All field names used to produce records in a given destination. May be null if no headers have been defined in headers, int[] CommonSettings#getHeaders()The indexes of the headers that are actually being written. May be null if no fields have been selected using indexesToWrite)CommonSettings#selectFields(String. or CommonSettings#selectIndexes(Integer.Implements com. |
| normalizedHeaders | back to summary |
|---|---|
| private NormalizedString[] normalizedHeaders | |
| previousHeaders | back to summary |
|---|---|
| private String[] previousHeaders | |
| BeanWriterProcessor | back to summary |
|---|---|
| public BeanWriterProcessor(Class<T> beanType) Initializes the BeanWriterProcessor with the annotated bean class
| |
| cloneConversions | back to summary |
|---|---|
| protected FieldConversionMapping cloneConversions() Overrides com. Doc from com. Creates a copy of the manually defined conversions to be applied over any columns.
| |
| write | back to summary |
|---|---|
| public Object[] write(T input, String[] headers, int[] indexesToWrite) Converts the java bean instance into a sequence of values for writing.
| |
| write | back to summary |
|---|---|
| public Object[] write(T input, NormalizedString[] headers, int[] indexesToWrite) Implements com. Converts the java bean instance into a sequence of values for writing.
| |