public class CSVExporter extends Exporter
修飾子とタイプ | フィールドと説明 |
---|---|
static String |
QUOT
ダブルコーテーション
|
static String |
SEPARATOR
データのセパレータ
|
static String |
USE_DOUBLE_QUOTATION_ALL_STRINGVALUES
文字列データを出力するときに常にダブルコーテーションで囲むかどうかに関するフラグのキー値です。
|
コンストラクタと説明 |
---|
CSVExporter()
コンストラクタ
|
修飾子とタイプ | メソッドと説明 |
---|---|
String |
convert(Line line)
テーブルから取得された1レコード分のデータを
出力用の文字列に変換します |
String |
getExportFileName()
出力ファイル名を取得します。
|
String |
getHeader()
ヘッダとして出力する文字列を取得します。
|
void |
init(Connection con,
Properties props)
エクスポーターを初期化します。
|
protected String |
toCSVValue(String value)
ダブルコーテーションとカンマのエスケープ処理をした結果を返します。
|
protected String |
toCSVValue(String value,
int columnType)
ダブルコーテーションとカンマのエスケープ処理をした結果を返します。
|
protected List<String> |
toStringList(Line line,
Set<String> validColumnNames) |
destroy, getDatabaseColumns, getDestFileName, getFooter, getNullValue, getTableName, setDatabaseColumns, setDestFileName, setNullValue, setTableName
public static final String USE_DOUBLE_QUOTATION_ALL_STRINGVALUES
public String convert(Line line) throws TerminateException
Exporter
convert
クラス内 Exporter
line
- 1レコード分のデータTerminateException
- 処理を中断するときにスローされますpublic String getExportFileName()
Exporter
getExportFileName
クラス内 Exporter
public void init(Connection con, Properties props) throws TerminateException
Exporter
init
クラス内 Exporter
con
- DB接続オブジェクトprops
- 初期化パラメータTerminateException
- 初期化処理に失敗したときスローされますprotected String toCSVValue(String value)
value
- 処理対象文字列protected String toCSVValue(String value, int columnType)
value
- 処理対象文字列columnType
- カラムのデータ型Copyright © 2012 NTT DATA INTRAMART CORPORATION