Package org.springframework.batch.item.file.builder

# Class FlatFileItemWriterBuilder.FormattedBuilder<T>

java.lang.Object
org.springframework.batch.item.file.builder.FlatFileItemWriterBuilder.FormattedBuilder<T>

Type Parameters:
  `T` - the type of the parent `FlatFileItemWriterBuilder`

Enclosing class:
  FlatFileItemWriterBuilder<T>

public static class FlatFileItemWriterBuilder.FormattedBuilder<T> extends Object
A builder for constructing a `FormatterLineAggregator`.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `FormattedBuilder(FlatFileItemWriterBuilder<T> parent)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FormatterLineAggregator<T>`
  `build()`
  `FlatFileItemWriterBuilder<T>`
  `fieldExtractor(FieldExtractor<T> fieldExtractor)`
  Set the `FieldExtractor` to use to extract fields from each item.
  `FlatFileItemWriterBuilder.FormattedBuilder<T>`
  `format(String format)`
  Set the format string used to aggregate items
  `FlatFileItemWriterBuilder.FormattedBuilder<T>`
  `locale(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(String... names)`
  Names of each of the fields within the fields that are returned in the order they occur within the formatted file.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FormattedBuilder

    protected FormattedBuilder(FlatFileItemWriterBuilder<T> parent)

- ## Method Details

  - ### format

    public FlatFileItemWriterBuilder.FormattedBuilder<T> format(String format)
    Set the format string used to aggregate items
    Parameters:
      `format` - used to aggregate items
    Returns:
      The instance of the builder for chaining.

  - ### locale

    public FlatFileItemWriterBuilder.FormattedBuilder<T> locale(Locale locale)
    Set the locale.
    Parameters:
      `locale` - to use
    Returns:
      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.
    Parameters:
      `minimumLength` - of the formatted string
    Returns:
      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.
    Parameters:
      `maximumLength` - of the formatted string
    Returns:
      The instance of the builder for chaining.

  - ### fieldExtractor

    public FlatFileItemWriterBuilder<T> fieldExtractor(FieldExtractor<T> fieldExtractor)
    Set the `FieldExtractor` to use to extract fields from each item.
    Parameters:
      `fieldExtractor` - to use to extract fields from each item
    Returns:
      The current instance of the builder

  - ### names

    public FlatFileItemWriterBuilder<T> names(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 a `BeanWrapperFieldExtractor` only if no explicit field extractor is set via `fieldExtractor(FieldExtractor)`.
    Parameters:
      `names` - names of each field
    Returns:
      The parent `FlatFileItemWriterBuilder`
    See Also:
      - `BeanWrapperFieldExtractor.setNames(String[])`

  - ### build

    public FormatterLineAggregator<T> build()