クラス FlatFileItemWriterProperties

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

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

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

    修飾子と型
    メソッド
    説明
    ファイルが区切られている場合、この String はフィールド間の区切り文字として使用されます。
    出力ファイルのファイルエンコーディング。
    FormatterLineAggregator で使用される形式。
    出力の行を区切るために使用される文字列。
    出力ファイルを生成するときに使用される Locale
    int
    レコードに許可される最長の長さ。
    int
    最小レコード長。
    ExecutionContext キーの計算に使用される名前の設定値を返します。
    出力に抽出されるフィールドの名前。
    org.springframework.core.io.Resource
    FlatFileItemWriter の出力ファイル。
    boolean
    出力ファイルが見つかり、置き換え / 削除するのではなく追加する必要がある場合は True です。
    boolean
    出力が設定された文字列 (デフォルトでは、) で区切られることを示します。
    boolean
    フラッシュ時に変更を強制的にディスクに同期する必要があることを示すフラグ。
    boolean
    出力ファイルで文字列形式を使用して出力を生成することを示します。
    boolean
    リーダーの状態が永続化されるかどうかの設定値を返します。
    boolean
    出力が書き込まれなかった場合に出力ファイルを削除するかどうかを示します。
    boolean
    起動時に既存の出力ファイルを削除するかどうかを示します。
    boolean
    トランザクションがアクティブな間、バッファのフラッシュを遅延するかどうかを示します。
    void
    setAppend(boolean append)
    出力ファイルが見つかった場合に追加する必要があるかどうかを構成します。
    void
    setDelimited(boolean delimited)
    アイテムごとに出力を生成するために DelimitedLineAggregator の使用を構成します。
    void
    出力ファイル内のフィールドを区切るために使用される String を構成します。
    void
    出力ファイルのエンコーディングを設定します。
    void
    setForceSync(boolean forceSync)
    フラッシュ時に変更を強制的にディスクに同期する必要があることを示すフラグ。
    void
    FormatterLineAggregator が各項目に使用する形式を設定します。
    void
    setFormatted(boolean formatted)
    FormatterLineAggregator を使用して項目ごとに出力を生成することを示します。
    void
    setLineSeparator(StringSE lineSeparator)
    各行を区切るために使用される String を設定します。
    void
    出力を生成するときに使用する Locale を構成します。
    void
    setMaximumLength(int maximumLength)
    Configure the maximum record length.
    void
    setMinimumLength(int minimumLength)
    Configure the minimum record length.
    void
    ExecutionContext 内のキーを計算するために使用される名前。
    void
    Provide an ordered array of field names used to generate the output of a file.
    void
    setResource(org.springframework.core.io.Resource resource)
    出力として使用される Resource
    void
    setSaveState(boolean saveState)
    再起動の目的で、ItemStreamSupport の状態を ExecutionContext 内に保持するかどうかを構成します。
    void
    setShouldDeleteIfEmpty(boolean shouldDeleteIfEmpty)
    Configure if an empty output file should be deleted once the step is complete.
    void
    setShouldDeleteIfExists(boolean shouldDeleteIfExists)
    Configures if an existing output file should be deleted on the start of the step.
    void
    setTransactional(boolean transactional)
    Configure if output should not be flushed to disk during an active transaction.

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

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

    • FlatFileItemWriterProperties

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

    • isSaveState

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

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

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

      public void setName(StringSE name)
      The name used to calculate the key within the ExecutionContext. Required if setSaveState(boolean) is set to true.
      パラメーター:
      name - リーダーインスタンスの名前
      関連事項:
      • ItemStreamSupport.setName(String)
    • getResource

      public org.springframework.core.io.Resource getResource()
      FlatFileItemWriter の出力ファイル。
      戻り値:
      Resource
    • setResource

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

      public boolean isDelimited()
      出力が設定された文字列 (デフォルトでは、) で区切られることを示します。
      戻り値:
      true if the output file is a delimited file
    • setDelimited

      public void setDelimited(boolean delimited)
      アイテムごとに出力を生成するために DelimitedLineAggregator の使用を構成します。
      パラメーター:
      delimited - indicator if the file will be delimited or not
    • getDelimiter

      public StringSE getDelimiter()
      ファイルが区切られている場合、この String はフィールド間の区切り文字として使用されます。
      戻り値:
      デリミタ
    • setDelimiter

      public void setDelimiter(StringSE delimiter)
      出力ファイル内のフィールドを区切るために使用される String を構成します。
      パラメーター:
      delimiter - String used to delimit the fields of the output file.
    • getNames

      public StringSE[] getNames()
      出力に抽出されるフィールドの名前。
      戻り値:
      An array of field names
    • setNames

      public void setNames(StringSE[] names)
      Provide an ordered array of field names used to generate the output of a file.
      パラメーター:
      names - An array of field names
    • isAppend

      public boolean isAppend()
      True if an output file is found and should be added onto instead of replaced/deleted. False by default.
      戻り値:
      appending indicator
    • setAppend

      public void setAppend(boolean append)
      Configure if the output file is found if it should be appended to. Defaults to false.
      パラメーター:
      append - true if the output file should be appended onto if found.
    • isFormatted

      public boolean isFormatted()
      出力ファイルで文字列形式を使用して出力を生成することを示します。
      戻り値:
      true if the file will contain formatted records defaults to true
    • setFormatted

      public void setFormatted(boolean formatted)
      FormatterLineAggregator を使用して項目ごとに出力を生成することを示します。
      パラメーター:
      formatted - true if the output should be formatted via the FormatterLineAggregator
    • getEncoding

      public StringSE getEncoding()
      出力ファイルのファイルエンコーディング。
      戻り値:
      the configured encoding for the output file (Defaults to FlatFileItemWriter.DEFAULT_CHARSET)
    • setEncoding

      public void setEncoding(StringSE encoding)
      出力ファイルのエンコーディングを設定します。
      パラメーター:
      encoding - 出力エンコード
    • isForceSync

      public boolean isForceSync()
      フラッシュ時に変更を強制的にディスクに同期する必要があることを示すフラグ。デフォルトは false です。
      戻り値:
      ビルダーの現在のインスタンス。
    • setForceSync

      public void setForceSync(boolean forceSync)
      フラッシュ時に変更を強制的にディスクに同期する必要があることを示すフラグ。デフォルトは false です。
      パラメーター:
      forceSync - フラグを設定する値
    • getLineSeparator

      public StringSE getLineSeparator()
      出力の行を区切るために使用される文字列。システムプロパティ line.separator がデフォルトです。
      戻り値:
      the separator string
    • setLineSeparator

      public void setLineSeparator(StringSE lineSeparator)
      各行を区切るために使用される String を設定します。
      パラメーター:
      lineSeparator - defaults to System's line.separator property
    • isShouldDeleteIfEmpty

      public boolean isShouldDeleteIfEmpty()
      Indicates if the output file should be deleted if no output was written to it. Defaults to false.
      戻り値:
      true if a file that is empty at the end of the step should be deleted.
    • setShouldDeleteIfEmpty

      public void setShouldDeleteIfEmpty(boolean shouldDeleteIfEmpty)
      Configure if an empty output file should be deleted once the step is complete. Defaults to false.
      パラメーター:
      shouldDeleteIfEmpty - true if the file should be deleted if no items have been written to it.
    • isShouldDeleteIfExists

      public boolean isShouldDeleteIfExists()
      Indicates if an existing output file should be deleted on startup. Defaults to true.
      戻り値:
      if an existing output file should be deleted.
    • setShouldDeleteIfExists

      public void setShouldDeleteIfExists(boolean shouldDeleteIfExists)
      Configures if an existing output file should be deleted on the start of the step. Defaults to true.
      パラメーター:
      shouldDeleteIfExists - if true and an output file of a previous run is found, it will be deleted.
    • isTransactional

      public boolean isTransactional()
      Indicates if flushing the buffer should be delayed while a transaction is active. Defaults to true.
      戻り値:
      flag indicating if flushing should be delayed during a transaction
    • setTransactional

      public void setTransactional(boolean transactional)
      Configure if output should not be flushed to disk during an active transaction.
      パラメーター:
      transactional - デフォルトは true
    • getFormat

      public StringSE getFormat()
      FormatterLineAggregator で使用される形式。
      戻り値:
      the format for each item's output.
    • setFormat

      public void setFormat(StringSE format)
      FormatterLineAggregator が各項目に使用する形式を設定します。
      パラメーター:
      format - the format for each item's output.
    • getLocale

      public LocaleSE getLocale()
      出力ファイルを生成するときに使用される Locale
      戻り値:
      configured Locale. Defaults to Locale.getDefault()
    • setLocale

      public void setLocale(LocaleSE locale)
      Configure the Locale to use when generating the output.
      パラメーター:
      locale - the configured Locale
    • getMaximumLength

      public int getMaximumLength()
      The longest a record is allowed to be. If 0, the maximum is unlimited.
      戻り値:
      the max record length allowed. Defaults to 0.
    • setMaximumLength

      public void setMaximumLength(int maximumLength)
      Configure the maximum record length. If 0, the size is unbounded.
      パラメーター:
      maximumLength - the maximum record length allowed.
    • getMinimumLength

      public int getMinimumLength()
      最小レコード長。
      戻り値:
      the minimum record length allowed.
    • setMinimumLength

      public void setMinimumLength(int minimumLength)
      Configure the minimum record length.
      パラメーター:
      minimumLength - the minimum record length.