Class FlatFileItemWriterBuilder.DelimitedBuilder<T>
java.lang.Object
org.springframework.batch.item.file.builder.FlatFileItemWriterBuilder.DelimitedBuilder<T>
- Type Parameters:
T- the type of the parentFlatFileItemWriterBuilder
- Enclosing class:
- FlatFileItemWriterBuilder<T>
A builder for constructing a
DelimitedLineAggregator-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Define the delimiter for the file.fieldExtractor(FieldExtractor<T> fieldExtractor) Set theFieldExtractorto use to extract fields from each item.Names of each of the fields within the fields that are returned in the order they occur within the delimited file.sourceType(Class<T> sourceType) Specify the type of items from which fields will be extracted.
-
Constructor Details
-
DelimitedBuilder
-
-
Method Details
-
delimiter
Define the delimiter for the file.- Parameters:
delimiter- String used as a delimiter between fields.- Returns:
- The instance of the builder for chaining.
- See Also:
-
sourceType
Specify the type of items from which fields will be extracted. This is used to configure the rightFieldExtractorbased on the given type (ie a record or a regular class).- Parameters:
sourceType- type of items from which fields will be extracted- Returns:
- The current instance of the builder.
- Since:
- 5.0
-
names
Names of each of the fields within the fields that are returned in the order they occur within the delimited file. These names will be used to create aBeanWrapperFieldExtractoronly if no explicit field extractor is set viafieldExtractor(FieldExtractor).- Parameters:
names- names of each field- Returns:
- The parent
FlatFileItemWriterBuilder - See Also:
-
fieldExtractor
Set theFieldExtractorto use to extract fields from each item.- Parameters:
fieldExtractor- to use to extract fields from each item- Returns:
- The parent
FlatFileItemWriterBuilder
-
build
-