Top Description Constructors Methods
com.univocity.parsers.common.processor

public abstract Class BatchedObjectColumnProcessor

extends AbstractBatchedObjectColumnProcessor<ParsingContext>
implements RowProcessor
Class Inheritance
All Implemented Interfaces
com.univocity.parsers.common.processor.RowProcessor, com.univocity.parsers.common.processor.core.Processor
Imports
com.univocity.parsers.common.*, com.univocity.parsers.common.processor.core.*, com.univocity.parsers.conversions.*

A RowProcessor implementation for converting batches of rows extracted from any implementation of AbstractParser into columns of objects.

This uses the value conversions provided by Conversion instances.

For each row processed, a sequence of conversions will be executed to generate the appropriate object. Each resulting object will then be stored in a list that contains the values of the corresponding column.

During the execution of the process, the batchProcessed(int) method will be invoked after a given number of rows has been processed.

The user can access the lists with values parsed for all columns using the methods getColumnValuesAsList(), getColumnValuesAsMapOfIndexes() and getColumnValuesAsMapOfNames().

After batchProcessed(int) is invoked, all values will be discarded and the next batch of column values will be accumulated. This process will repeat until there's no more rows in the input.

Author
Univocity Software Pty Ltd - [email protected]
See Also
AbstractParser, RowProcessor, AbstractBatchedColumnProcessor, Conversion

Constructor Summary

AccessConstructor and Description
public
BatchedObjectColumnProcessor(int
the number of rows to process in each batch.
rowsPerBatch
)

Constructs a batched column processor configured to invoke the batchesProcessed method after a given number of rows has been processed.

Method Summary

Inherited from com.univocity.parsers.common.processor.core.AbstractBatchedObjectColumnProcessor:
batchProcessedgetBatchesProcessedgetColumngetColumngetColumngetColumngetColumnValuesAsListgetColumnValuesAsMapOfIndexesgetColumnValuesAsMapOfNamesgetHeadersgetRowsPerBatchprocessEndedprocessStartedputColumnValuesInMapOfIndexesputColumnValuesInMapOfNamesrowProcessed

Constructor Detail

BatchedObjectColumnProcessorback to summary
public BatchedObjectColumnProcessor(int rowsPerBatch)

Constructs a batched column processor configured to invoke the batchesProcessed method after a given number of rows has been processed.

Parameters
rowsPerBatch:int

the number of rows to process in each batch.