Interface FlatFileItemWriterBuilder.FormattedSpec<T>
- Type Parameters:
T- the type of object to aggregate
- Enclosing class:
FlatFileItemWriterBuilder<T>
public static interface FlatFileItemWriterBuilder.FormattedSpec<T>
Specification for configuring a formatted line aggregator.
- Since:
- 6.0
- Author:
- Michael Minella, Glenn Renfro, Mahmoud Ben Hassine, Drummond Dawson, Stefano Cordio, Daeho Kwon, Hyunggeol Lee
-
Method Summary
Modifier and TypeMethodDescriptionfieldExtractor(FieldExtractor<T> fieldExtractor) Set theFieldExtractorto use to extract fields from each item.Set the format string used to aggregate itemsSet the locale.maximumLength(int max) Set the maximum length of the formatted string.minimumLength(int min) Set the minimum length of the formatted string.Names of each of the fields within the fields that are returned in the order they occur within the formatted file.sourceType(Class<T> sourceType) Specify the type of items from which fields will be extracted.
-
Method Details
-
format
Set the format string used to aggregate items- Parameters:
format- used to aggregate items- Returns:
- The instance of the specification for chaining.
-
locale
Set the locale.- Parameters:
locale- to use- Returns:
- The instance of the specification for chaining.
-
minimumLength
Set the minimum length of the formatted string. If this is not set the default is to allow any length.- Parameters:
min- of the formatted string- Returns:
- The instance of the specification for chaining.
-
maximumLength
Set the maximum length of the formatted string. If this is not set the default is to allow any length.- Parameters:
max- of the formatted string- Returns:
- The instance of the specification for chaining.
-
names
Names of each of the fields within the fields that are returned in the order they occur within the formatted file. These names will be used to create aBeanWrapperFieldExtractoronly if no explicit field extractor is set viaFlatFileItemWriterBuilder.FormattedBuilder.fieldExtractor(FieldExtractor).- Parameters:
names- names of each field- Returns:
- The instance of the specification for chaining.
- See Also:
-
fieldExtractor
Set theFieldExtractorto use to extract fields from each item.- Parameters:
fieldExtractor- to use to extract fields from each item- Returns:
- The current instance of the specification
-
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 specification.
-