Class DelimitedLineAggregator<T>
java.lang.Object
org.springframework.batch.item.file.transform.ExtractorLineAggregator<T>
org.springframework.batch.item.file.transform.DelimitedLineAggregator<T>
- All Implemented Interfaces:
LineAggregator<T>
A
LineAggregator
implementation that converts an object into a delimited list
of strings. The default delimiter is a comma. An optional quote value can be set to add
surrounding quotes for each element of the list. Default is empty string, which means
not quotes.- Author:
- Dave Syer, Glenn Renfro
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondoAggregate
(Object[] fields) Aggregate provided fields into single String.void
setDelimiter
(String delimiter) Public setter for the delimiter.void
setQuoteCharacter
(String quoteCharacter) Setter for the quote character.Methods inherited from class org.springframework.batch.item.file.transform.ExtractorLineAggregator
aggregate, setFieldExtractor
-
Constructor Details
-
DelimitedLineAggregator
public DelimitedLineAggregator()
-
-
Method Details
-
setDelimiter
Public setter for the delimiter.- Parameters:
delimiter
- the delimiter to set
-
setQuoteCharacter
Setter for the quote character.- Parameters:
quoteCharacter
- the quote character to set- Since:
- 5.1
-
doAggregate
Description copied from class:ExtractorLineAggregator
Aggregate provided fields into single String.- Specified by:
doAggregate
in classExtractorLineAggregator<T>
- Parameters:
fields
- An array of the fields that must be aggregated- Returns:
- aggregated string
-