类 FlatFileItemWriterBuilder.FormattedBuilder<T>
- java.lang.Object
- org.springframework.batch.item.file.builder.FlatFileItemWriterBuilder.FormattedBuilder<T>
- 类型参数:
T
- the type of the parentFlatFileItemWriterBuilder
public static class FlatFileItemWriterBuilder.FormattedBuilder<T> extends java.lang.Object
A builder for constructing aFormatterLineAggregator
.
构造器概要
构造器 限定符 构造器 说明 protected
FormattedBuilder(FlatFileItemWriterBuilder<T> parent)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 FormatterLineAggregator<T>
build()
FlatFileItemWriterBuilder<T>
fieldExtractor(FieldExtractor<T> fieldExtractor)
Set theFieldExtractor
to use to extract fields from each item.FlatFileItemWriterBuilder.FormattedBuilder<T>
format(java.lang.String format)
Set the format string used to aggregate itemsFlatFileItemWriterBuilder.FormattedBuilder<T>
locale(java.util.Locale locale)
Set the locale.FlatFileItemWriterBuilder.FormattedBuilder<T>
maximumLength(int maximumLength)
Set the maximum length of the formatted string.FlatFileItemWriterBuilder.FormattedBuilder<T>
minimumLength(int minimumLength)
Set the minimum length of the formatted string.FlatFileItemWriterBuilder<T>
names(java.lang.String[] names)
Names of each of the fields within the fields that are returned in the order they occur within the formatted file.
构造器详细资料
FormattedBuilder
protected FormattedBuilder(FlatFileItemWriterBuilder<T> parent)
方法详细资料
format
public FlatFileItemWriterBuilder.FormattedBuilder<T> format(java.lang.String format)
Set the format string used to aggregate items- 参数:
format
- used to aggregate items- 返回:
- The instance of the builder for chaining.
locale
public FlatFileItemWriterBuilder.FormattedBuilder<T> locale(java.util.Locale locale)
Set the locale.- 参数:
locale
- to use- 返回:
- The instance of the builder for chaining.
minimumLength
public FlatFileItemWriterBuilder.FormattedBuilder<T> minimumLength(int minimumLength)
Set the minimum length of the formatted string. If this is not set the default is to allow any length.- 参数:
minimumLength
- of the formatted string- 返回:
- The instance of the builder for chaining.
maximumLength
public FlatFileItemWriterBuilder.FormattedBuilder<T> maximumLength(int maximumLength)
Set the maximum length of the formatted string. If this is not set the default is to allow any length.- 参数:
maximumLength
- of the formatted string- 返回:
- The instance of the builder for chaining.
fieldExtractor
public FlatFileItemWriterBuilder<T> fieldExtractor(FieldExtractor<T> fieldExtractor)
Set theFieldExtractor
to use to extract fields from each item.- 参数:
fieldExtractor
- to use to extract fields from each item- 返回:
- The current instance of the builder
names
public FlatFileItemWriterBuilder<T> names(java.lang.String[] 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 aBeanWrapperFieldExtractor
only if no explicit field extractor is set viafieldExtractor(FieldExtractor)
.- 参数:
names
- names of each field- 返回:
- The parent
FlatFileItemWriterBuilder
- 另请参阅:
BeanWrapperFieldExtractor.setNames(String[])
build
public FormatterLineAggregator<T> build()