public class CSVImporter extends Importer
修飾子とタイプ | フィールドと説明 |
---|---|
protected jp.co.intra_mart.common.platform.database.io.data.ExtendsBufferedReader |
br |
protected int |
currentLineNumber
現在インポート処理中のCSV行番号
|
コンストラクタと説明 |
---|
CSVImporter() |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
destory()
インポート後処理を行います。
|
Boolean |
getBOMFlag()
BOMフラグを取得します。
|
int |
getExecutingRowNumber()
現在実行中の行番号を取得します。
|
String[] |
getFieldNames()
インポート先テーブルのフィールド名一覧を取得します。
|
int |
getTotalRowNumber()
ファイルのトータル行数を取得します。
|
boolean |
hasFieldNames()
フィールド名を示すデータがCSVファイル内にあるかどうかを示します。
|
void |
init(Connection con)
インポーターを初期化します。
|
protected boolean |
isCSVEndLine(String target)
CSVとして1行のデータになっているか調べます。
|
String[] |
readLineValues()
インポートファイルから、テーブルへインポートするデータ1レコード分を
フィールド単位の文字列配列で取得します。 |
void |
setBOMFlag(Boolean BOMFlag)
BOMフラグを設定します。
|
protected String[] |
split(String line)
ファイルから読み込んだ1行をカンマで分割します。
|
getDatabaseColumns, getFile, getFileEncoding, getImportFileModel, getTableName, setDatabaseColumns, setFile, setFileEncoding, setImportFileModel, setTableName
protected jp.co.intra_mart.common.platform.database.io.data.ExtendsBufferedReader br
protected int currentLineNumber
public void destory() throws IOException
Importer
destory
クラス内 Importer
IOException
public Boolean getBOMFlag()
public int getExecutingRowNumber()
Importer
getExecutingRowNumber
クラス内 Importer
public String[] getFieldNames()
Importer
getFieldNames
クラス内 Importer
public int getTotalRowNumber()
Importer
getTotalRowNumber
クラス内 Importer
public boolean hasFieldNames()
public void init(Connection con) throws SQLException, IOException
Importer
init
クラス内 Importer
con
- DB接続オブジェクトSQLException
IOException
public String[] readLineValues() throws IOException, EOFException
Importer
readLineValues
クラス内 Importer
EOFException
- ファイルの読み込みが終了したことを通知しますIOException
public void setBOMFlag(Boolean BOMFlag)
BOMFlag
- protected boolean isCSVEndLine(String target)
target
- Copyright © 2012 NTT DATA INTRAMART CORPORATION