Class ObjectRowWriterProcessor
java.lang.Object
com.univocity.parsers.common.DefaultConversionProcessor
com.univocity.parsers.common.processor.ObjectRowWriterProcessor
- All Implemented Interfaces:
ConversionProcessor
,RowWriterProcessor<Object[]>
public class ObjectRowWriterProcessor
extends DefaultConversionProcessor
implements RowWriterProcessor<Object[]>
A
RowWriterProcessor
implementation for executing conversion sequences in object arrays before for writing them using any implementation of AbstractWriter
.- See Also:
-
Field Summary
FieldsFields inherited from class com.univocity.parsers.common.DefaultConversionProcessor
conversions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[]
write
(Object[] input, NormalizedString[] headers, int[] indexesToWrite) Executes the sequences of conversions defined usingDefaultConversionProcessor.convertFields(Conversion...)
,DefaultConversionProcessor.convertIndexes(Conversion...)
andDefaultConversionProcessor.convertAll(Conversion...)
, for every field in the given row.Object[]
Executes the sequences of conversions defined usingDefaultConversionProcessor.convertFields(Conversion...)
,DefaultConversionProcessor.convertIndexes(Conversion...)
andDefaultConversionProcessor.convertAll(Conversion...)
, for every field in the given row.Methods inherited from class com.univocity.parsers.common.DefaultConversionProcessor
applyConversions, convertAll, convertFields, convertIndexes, convertType, handleConversionError, initializeConversions, reverseConversions, toDataProcessingException
-
Field Details
-
normalizedHeaders
-
previousHeaders
-
-
Constructor Details
-
ObjectRowWriterProcessor
public ObjectRowWriterProcessor()
-
-
Method Details
-
write
Executes the sequences of conversions defined usingDefaultConversionProcessor.convertFields(Conversion...)
,DefaultConversionProcessor.convertIndexes(Conversion...)
andDefaultConversionProcessor.convertAll(Conversion...)
, for every field in the given row.Each field will be transformed using the
Conversion.execute(Object)
method.In general the conversions will process a String and convert it to some object value (such as booleans, dates, etc).
- Parameters:
input
- the object array that represents a record with its individual fields.headers
- All field names used to produce records in a given destination. May be null if no headers have been defined inCommonSettings.getHeaders()
indexesToWrite
- The indexes of the headers that are actually being written. May be null if no fields have been selected usingCommonSettings.selectFields(String...)
orCommonSettings.selectIndexes(Integer...)
- Returns:
- an row of Object instances containing the values obtained after the execution of all conversions.
Fields that do not have any conversion defined will just be copied to the object array into their original positions.
-
write
Executes the sequences of conversions defined usingDefaultConversionProcessor.convertFields(Conversion...)
,DefaultConversionProcessor.convertIndexes(Conversion...)
andDefaultConversionProcessor.convertAll(Conversion...)
, for every field in the given row.Each field will be transformed using the
Conversion.execute(Object)
method.In general the conversions will process a String and convert it to some object value (such as booleans, dates, etc).
- Specified by:
write
in interfaceRowWriterProcessor<Object[]>
- Parameters:
input
- the object array that represents a record with its individual fields.headers
- All field names used to produce records in a given destination. May be null if no headers have been defined inCommonSettings.getHeaders()
indexesToWrite
- The indexes of the headers that are actually being written. May be null if no fields have been selected usingCommonSettings.selectFields(String...)
orCommonSettings.selectIndexes(Integer...)
- Returns:
- an row of Object instances containing the values obtained after the execution of all conversions.
Fields that do not have any conversion defined will just be copied to the object array into their original positions.
- See Also:
-