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

# Class FlatFileItemReaderBuilder.DelimitedBuilder<T>

java.lang.Object
org.springframework.batch.item.file.builder.FlatFileItemReaderBuilder.DelimitedBuilder<T>

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

Enclosing class:
  FlatFileItemReaderBuilder<T>

public static class FlatFileItemReaderBuilder.DelimitedBuilder<T> extends Object
A builder for constructing a `DelimitedLineTokenizer`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `DelimitedBuilder(FlatFileItemReaderBuilder<T> parent)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FlatFileItemReaderBuilder.DelimitedBuilder<T>`
  `addIncludedField(int field)`
  Add an index to the list of fields to be included from the file
  `DelimitedLineTokenizer`
  `build()`
  Returns a `DelimitedLineTokenizer`
  `FlatFileItemReaderBuilder.DelimitedBuilder<T>`
  `delimiter(String delimiter)`
  Define the delimiter for the file.
  `FlatFileItemReaderBuilder.DelimitedBuilder<T>`
  `fieldSetFactory(FieldSetFactory fieldSetFactory)`
  A factory for creating the resulting `FieldSet`.
  `FlatFileItemReaderBuilder.DelimitedBuilder<T>`
  `includedFields(Integer... fields)`
  A list of indices of the fields within a delimited file to be included
  `FlatFileItemReaderBuilder<T>`
  `names(String... names)`
  Names of each of the fields within the fields that are returned in the order they occur within the delimited file.
  `FlatFileItemReaderBuilder.DelimitedBuilder<T>`
  `quoteCharacter(char quoteCharacter)`
  Define the character used to quote fields.

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

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

- ## Constructor Details

  - ### DelimitedBuilder

    protected DelimitedBuilder(FlatFileItemReaderBuilder<T> parent)

- ## Method Details

  - ### delimiter

    public FlatFileItemReaderBuilder.DelimitedBuilder<T> delimiter(String 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:
      - `DelimitedLineTokenizer.setDelimiter(String)`

  - ### quoteCharacter

    public FlatFileItemReaderBuilder.DelimitedBuilder<T> quoteCharacter(char quoteCharacter)
    Define the character used to quote fields.
    Parameters:
      `quoteCharacter` - char used to define quoted fields
    Returns:
      The instance of the builder for chaining.
    See Also:
      - `DelimitedLineTokenizer.setQuoteCharacter(char)`

  - ### includedFields

    public FlatFileItemReaderBuilder.DelimitedBuilder<T> includedFields(Integer... fields)
    A list of indices of the fields within a delimited file to be included
    Parameters:
      `fields` - indices of the fields
    Returns:
      The instance of the builder for chaining.
    See Also:
      - `DelimitedLineTokenizer.setIncludedFields(int[])`

  - ### addIncludedField

    public FlatFileItemReaderBuilder.DelimitedBuilder<T> addIncludedField(int field)
    Add an index to the list of fields to be included from the file
    Parameters:
      `field` - the index to be included
    Returns:
      The instance of the builder for chaining.
    See Also:
      - `DelimitedLineTokenizer.setIncludedFields(int[])`

  - ### fieldSetFactory

    public FlatFileItemReaderBuilder.DelimitedBuilder<T> fieldSetFactory(FieldSetFactory fieldSetFactory)
    A factory for creating the resulting `FieldSet`. Defaults to `DefaultFieldSetFactory`.
    Parameters:
      `fieldSetFactory` - Factory for creating `FieldSet`
    Returns:
      The instance of the builder for chaining.
    See Also:
      - `AbstractLineTokenizer.setFieldSetFactory(FieldSetFactory)`

  - ### names

    public FlatFileItemReaderBuilder<T> names(String... names)
    Names of each of the fields within the fields that are returned in the order they occur within the delimited file. Required.
    Parameters:
      `names` - names of each field
    Returns:
      The parent `FlatFileItemReaderBuilder`
    See Also:
      - `AbstractLineTokenizer.setNames(String[])`

  - ### build

    public DelimitedLineTokenizer build()
    Returns a `DelimitedLineTokenizer`
    Returns:
      `DelimitedLineTokenizer`