クラス FlatFileItemReaderProperties

java.lang.ObjectSE
org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties

@ConfigurationProperties(prefix="spring.batch.job.flatfileitemreader") public class FlatFileItemReaderProperties extends ObjectSE
FlatFileItemReader を構成するためのプロパティ。
導入:
2.3
作成者:
Michael Minella
  • コンストラクターのサマリー

    コンストラクター
    コンストラクター
    説明
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    どのレコードがコメントであるかを示すために使用される String 値のリスト。
    int
    現在の項目のインデックスを提供します。
    String はレコードをフィールドに分割するために使用されます。
    入力ファイルのエンコーディングを返します。
    含めるフィールドを示すインデックスの List
    int
    入力ファイルを読み取るときにスキップする行数。
    int
    読み取るアイテムの最大数。
    ExecutionContext キーの計算に使用される名前の設定値を返します。
    各列の名前。
    char
    フィールドが引用符で囲まれていることを示すために使用される文字。
    ListSE<org.springframework.batch.item.file.transform.Range>
    固定幅のファイルを解析するために使用される列の範囲。
    org.springframework.core.io.Resource
    FlatFileItemReader の入力ファイル。
    boolean
    入力ファイルが区切りファイルであるかどうかを示します。
    boolean
    ファイルに固定長の列を持つレコードが含まれていることを示します。
    boolean
    トークンの数が構成されたフィールドの数と一致する必要があるかどうかを示します。
    boolean
    リーダーの状態が永続化されるかどうかの設定値を返します。
    boolean
    入力ファイルが見つからないことがエラーであると判断された場合は true を返します。
    void
    どのレコードがコメントであるかを示すために使用される String 要素のリストを取得します。
    void
    setCurrentItemCount(int currentItemCount)
    現在のアイテムのインデックス。
    void
    setDelimited(boolean delimited)
    各行を解析するために DelimitedLineTokenizer を使用する必要があることを示します。
    void
    ファイルの区切り文字を定義します。
    void
    リーダーが入力ソースを読み取るために使用するエンコードを構成します。
    void
    setFixedLength(boolean fixedLength)
    ファイル内のレコードを解析するために FixedLengthTokenizer を使用する必要があることを示します。
    void
    含める区切りファイル内のフィールドのインデックスのリスト。
    void
    setLinesToSkip(int linesToSkip)
    ファイルの読み取りの開始時にスキップする行数。
    void
    setMaxItemCount(int maxItemCount)
    読み込むアイテムの最大数を設定します。
    void
    ExecutionContext 内のキーを計算するために使用される名前。
    void
    ファイルから解析されるフィールドの名前。
    void
    setParsingStrict(boolean parsingStrict)
    トークンの数が構成されたフィールドの数と一致する必要があるかどうかを示します。
    void
    setQuoteCharacter(char quoteCharacter)
    フィールドの引用に使用する文字を定義します。
    void
    setRanges(ListSE<org.springframework.batch.item.file.transform.Range> ranges)
    各フィールドの列範囲。
    void
    setResource(org.springframework.core.io.Resource resource)
    入力として使用される Resource
    void
    setSaveState(boolean saveState)
    再起動の目的で、ItemStreamSupport の状態を ExecutionContext 内に保持するかどうかを構成します。
    void
    setStrict(boolean strict)
    リーダーを厳格モードにする必要があるかどうかを構成します(入力 Resource が存在する必要があります)。

    クラス java.lang.ObjectSE から継承されたメソッド

    clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
  • コンストラクターの詳細

    • FlatFileItemReaderProperties

      public FlatFileItemReaderProperties()
  • メソッドの詳細

    • isSaveState

      public boolean isSaveState()
      リーダーの状態が永続化されるかどうかの設定値を返します。
      戻り値:
      状態が永続化される場合は true
    • setSaveState

      public void setSaveState(boolean saveState)
      再起動の目的で、ItemStreamSupport の状態を ExecutionContext 内に保持するかどうかを構成します。
      パラメーター:
      saveState - デフォルトは true
    • getName

      public StringSE getName()
      ExecutionContext キーの計算に使用される名前の設定値を返します。
      戻り値:
      名前
    • setName

      public void setName(StringSE name)
      ExecutionContext 内のキーを計算するために使用される名前。setSaveState(boolean) が true に設定されている場合は必須です。
      パラメーター:
      name - リーダーインスタンスの名前
      関連事項:
      • ItemStreamSupport.setName(String)
    • getMaxItemCount

      public int getMaxItemCount()
      読み取るアイテムの最大数。
      戻り値:
      the configured number of items, defaults to Integer.MAX_VALUE
    • setMaxItemCount

      public void setMaxItemCount(int maxItemCount)
      読み込むアイテムの最大数を設定します。
      パラメーター:
      maxItemCount - 読み込む最大アイテム
      関連事項:
      • AbstractItemCountingItemStreamItemReader.setMaxItemCount(int)
    • getCurrentItemCount

      public int getCurrentItemCount()
      現在の項目のインデックスを提供します。
      戻り値:
      item index
    • setCurrentItemCount

      public void setCurrentItemCount(int currentItemCount)
      Index for the current item. Also used on restarts to indicate where to start from.
      パラメーター:
      currentItemCount - 現在のインデックス
      関連事項:
      • AbstractItemCountingItemStreamItemReader.setCurrentItemCount(int)
    • getComments

      public ListSE<StringSE> getComments()
      どのレコードがコメントであるかを示すために使用される String 値のリスト。
      戻り値:
      list of comment indicators
    • setComments

      public void setComments(ListSE<StringSE> comments)
      どのレコードがコメントであるかを示すために使用される String 要素のリストを取得します。
      パラメーター:
      comments - strings used to indicate commented lines
    • getResource

      public org.springframework.core.io.Resource getResource()
      FlatFileItemReader の入力ファイル。
      戻り値:
      リソース
    • setResource

      public void setResource(org.springframework.core.io.Resource resource)
      入力として使用される Resource
      パラメーター:
      resource - リーダーへの入力。
      関連事項:
      • FlatFileItemReader.setResource(Resource)
    • isStrict

      public boolean isStrict()
      入力ファイルが見つからないことがエラーであると判断された場合は true を返します。
      戻り値:
      true if the input file is required.
    • setStrict

      public void setStrict(boolean strict)
      リーダーを厳格モードにする必要があるかどうかを構成します(入力 Resource が存在する必要があります)。
      パラメーター:
      strict - 入力ファイルが存在する必要がある場合は true。
      関連事項:
      • FlatFileItemReader.setStrict(boolean)
    • getEncoding

      public StringSE getEncoding()
      Returns the encoding for the input file. Defaults to FlatFileItemReader#DEFAULT_CHARSET.
      戻り値:
      the configured encoding
    • setEncoding

      public void setEncoding(StringSE encoding)
      Configure the encoding used by the reader to read the input source. Default value is FlatFileItemReader.DEFAULT_CHARSET.
      パラメーター:
      encoding - 入力ソースの読み取りに使用します。
      関連事項:
      • FlatFileItemReader.setEncoding(String)
    • getLinesToSkip

      public int getLinesToSkip()
      入力ファイルを読み取るときにスキップする行数。
      戻り値:
      行数
    • setLinesToSkip

      public void setLinesToSkip(int linesToSkip)
      ファイルの読み取りの開始時にスキップする行数。
      パラメーター:
      linesToSkip - スキップする行数。
      関連事項:
      • FlatFileItemReader.setLinesToSkip(int)
    • isDelimited

      public boolean isDelimited()
      入力ファイルが区切りファイルであるかどうかを示します。
      戻り値:
      true if the file is delimited
    • setDelimited

      public void setDelimited(boolean delimited)
      各行を解析するために DelimitedLineTokenizer を使用する必要があることを示します。
      パラメーター:
      delimited - true if the file is a delimited file
    • getDelimiter

      public StringSE getDelimiter()
      String はレコードをフィールドに分割するために使用されます。
      戻り値:
      区切り文字
    • setDelimiter

      public void setDelimiter(StringSE delimiter)
      ファイルの区切り文字を定義します。
      パラメーター:
      delimiter - フィールド間の区切り文字として使用される文字列。
      関連事項:
      • DelimitedLineTokenizer.setDelimiter(String)
    • getQuoteCharacter

      public char getQuoteCharacter()
      フィールドが引用符で囲まれていることを示すために使用される文字。
      戻り値:
      the quote char
    • setQuoteCharacter

      public void setQuoteCharacter(char quoteCharacter)
      フィールドの引用に使用する文字を定義します。
      パラメーター:
      quoteCharacter - 引用フィールドの定義に使用される文字
      関連事項:
      • DelimitedLineTokenizer.setQuoteCharacter(char)
    • getIncludedFields

      public ListSE<IntegerSE> getIncludedFields()
      含めるフィールドを示すインデックスの List
      戻り値:
      list of indices
    • setIncludedFields

      public void setIncludedFields(ListSE<IntegerSE> includedFields)
      含める区切りファイル内のフィールドのインデックスのリスト。
      パラメーター:
      includedFields - フィールドのインデックス
      関連事項:
      • DelimitedLineTokenizer.setIncludedFields(int[])
    • isFixedLength

      public boolean isFixedLength()
      ファイルに固定長の列を持つレコードが含まれていることを示します。
      戻り値:
      true if the file is parsed using column indices
    • setFixedLength

      public void setFixedLength(boolean fixedLength)
      ファイル内のレコードを解析するために FixedLengthTokenizer を使用する必要があることを示します。
      パラメーター:
      fixedLength - true if the records should be tokenized by column index
    • getRanges

      public ListSE<org.springframework.batch.item.file.transform.Range> getRanges()
      固定幅のファイルを解析するために使用される列の範囲。
      戻り値:
      Range インスタンスのリスト
    • setRanges

      public void setRanges(ListSE<org.springframework.batch.item.file.transform.Range> ranges)
      各フィールドの列範囲。
      パラメーター:
      ranges - list of ranges in start-end format (end is optional)
    • getNames

      public StringSE[] getNames()
      各列の名前。
      戻り値:
      名前
    • setNames

      public void setNames(StringSE[] names)
      ファイルから解析されるフィールドの名前。
      パラメーター:
      names - フィールドの名前
    • isParsingStrict

      public boolean isParsingStrict()
      トークンの数が構成されたフィールドの数と一致する必要があるかどうかを示します。
      戻り値:
      true if they must match
    • setParsingStrict

      public void setParsingStrict(boolean parsingStrict)
      トークンの数が構成されたフィールドの数と一致する必要があるかどうかを示します。
      パラメーター:
      parsingStrict - true if they must match