public class ImportOptions extends Object implements Serializable
コンストラクタと説明 |
---|
ImportOptions()
新しいインポートオプションオブジェクトを生成します。
|
ImportOptions(File file)
新しいインポートオプションオブジェクトを生成します。
|
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addImportFile(ImportFileModel file)
インポートファイルの設定を追加します。
|
boolean |
getAutoCommit()
非推奨です。
|
SimpleDateFormat |
getDateFormat()
日付型のフォーマットオブジェクトを取得します。
|
DecimalFormat |
getDecimalFormat()
数値型のフォーマットオブジェクトを取得します。
|
boolean |
getDoCommitWithError()
エラーが1件以上発生している場合、コミットするかどうかを取得します。
|
String |
getFileEncoding()
インポートファイルのエンコーディングを取得します。
|
ImportFileModel |
getImportFile(String fileName)
インポートファイルの設定を取得します。
|
ImportFileModel[] |
getImportFiles()
インポートファイルの設定の配列を取得します。
|
boolean |
getInJTATransation()
非推奨です。
|
boolean |
getInsertMode()
新規追加モードを取得します。
|
int |
getIntervalCommitCount()
コミットを行うレコード間隔を取得します。
|
ImportListenerModel |
getListenerModel(String tableName)
指定されたテーブルに対するリスナの設定情報をモデル型で返します。
|
ImportListenerModel[] |
getListeners() |
int |
getMaxErrorSize()
最大エラー件数を取得します。
|
String |
getNullValue()
null値に対する代替文字列を取得します。
|
String |
getNullValueForString()
文字列型のためのnullに対する代替文字列を取得します。
|
Document |
getOptionsDocument()
インポートオプション設定をXMLドキュメントで取得します。
|
boolean |
getReplaceAllMode()
洗い換えモードを取得します。
|
int |
getSleepRecordCount()
処理を一時休止するレコード件数を取得します。
|
int |
getSleepTime()
処理を一時休止する場合の休止時間(ミリ秒)を取得します。
|
int |
getTestMaxCount()
テスト結果の最大出力件数を取得します
|
String |
getXmlString()
インポートオプションをXML文字列で取得します。
|
static boolean |
isImportTarget(File file,
ImportFileModel importFileModel)
File が ImportFileModel で定義されたインポート対象であるかどうかを判定します。 |
boolean |
isTestDatabase()
インポートファイルに存在せず、データベースに存在するレコードの差分検索をするかどうかを取得します。
|
boolean |
isTestMode()
テストモードかどうかを取得します。
|
void |
setAutoCommit(boolean autoCommit)
非推奨です。
トランザクション管理は
DatabaseImport でTransactionインスタンスを渡すか もしくはアプリケーション側で実装してください。 |
void |
setDateFormat(String pattern)
日付型のフォーマット文字列を設定します。
|
void |
setDecimalFormat(String pattern)
数値型のフォーマット文字列を設定します。
|
void |
setDoCommitWithError(boolean commitWithError)
エラーが1件以上発生している場合、コミットするかどうかを設定します。
|
void |
setFileEncoding(String encoding)
インポートファイルのエンコーディングを指定します。
|
void |
setInJTATransation(boolean inJTATransaction)
非推奨です。
トランザクション管理は
DatabaseImport でTransactionインスタンスを渡すか もしくはアプリケーション側で実装してください。 |
void |
setInsertMode(boolean insertMode)
新規追加モードを設定します。
|
void |
setIntervalCommitCount(int commitCount)
指定された行数のレコードが追加・更新される毎にコミットします。
|
void |
setListener(String tableName,
ImportListenerModel listener)
テーブルとリスナの関連付けを設定します。
|
void |
setMaxErrorSize(int maxErrorSize)
最大エラー件数を設定します。
|
void |
setNullValue(String nullValue)
null値に対する代替文字列を設定します。
|
void |
setNullValueForString(String nullValueForString)
文字列型のためのnullに対する代替文字列を設定します。
|
void |
setOptionsDocument(Document doc)
インポートオプション設定をXMLドキュメントで設定します。
|
void |
setReplaceAllMode(boolean replaceAllMode)
洗い換えモードを設定します。
|
void |
setSleepInterval(int sleepRecordCount,
int sleepTime)
インポート処理中に、一定のレコード件数ごとに処理を休止するようにします。
|
void |
setTestDatabase(boolean testDatabase) |
void |
setTestMaxCount(int testMaxCount)
テスト結果の最大出力件数をセットします
|
void |
setTestMode(boolean testMode)
テストモードを設定します。
|
void |
setXmlString(String src)
インポートオプションをXML文字列で設定します。
|
public ImportOptions()
public ImportOptions(File file) throws IOException, SAXException
file
- XMLドキュメント設定ファイルIOException
SAXException
public static boolean isImportTarget(File file, ImportFileModel importFileModel)
File
が ImportFileModel
で定義されたインポート対象であるかどうかを判定します。file
- importFileModel
- public void addImportFile(ImportFileModel file)
file
- インポートファイルの設定@Deprecated public boolean getAutoCommit()
public SimpleDateFormat getDateFormat()
public DecimalFormat getDecimalFormat()
public boolean getDoCommitWithError()
public String getFileEncoding()
public ImportFileModel getImportFile(String fileName)
fileName
- ファイル名public ImportFileModel[] getImportFiles()
@Deprecated public boolean getInJTATransation()
public boolean getInsertMode()
public int getIntervalCommitCount()
public ImportListenerModel getListenerModel(String tableName)
tableName
- テーブル名public ImportListenerModel[] getListeners()
public int getMaxErrorSize()
public String getNullValue()
public String getNullValueForString()
public Document getOptionsDocument()
public boolean getReplaceAllMode()
public int getSleepRecordCount()
public int getSleepTime()
public int getTestMaxCount()
public String getXmlString()
public boolean isTestDatabase()
public boolean isTestMode()
@Deprecated public void setAutoCommit(boolean autoCommit)
DatabaseImport
でTransactionインスタンスを渡すか もしくはアプリケーション側で実装してください。autoCommit
- public void setDateFormat(String pattern)
pattern
- フォーマット文字列public void setDecimalFormat(String pattern)
pattern
- フォーマット文字列public void setDoCommitWithError(boolean commitWithError)
commitWithError
- public void setFileEncoding(String encoding)
encoding
- ファイルエンコーディング@Deprecated public void setInJTATransation(boolean inJTATransaction)
DatabaseImport
でTransactionインスタンスを渡すか もしくはアプリケーション側で実装してください。inJTATransaction
- トランザクション管理プラグTransaction
public void setInsertMode(boolean insertMode)
insertMode
- 新規追加モード(true):エラーとして扱います(一意制約違反)。 更新モード(false):上書き(Update)します。public void setIntervalCommitCount(int commitCount)
commitCount
- public void setListener(String tableName, ImportListenerModel listener)
tableName
- テーブル名listener
- リスナ設定public void setMaxErrorSize(int maxErrorSize)
maxErrorSize
- public void setNullValue(String nullValue)
nullValue
- IllegalArgumentException
public void setNullValueForString(String nullValueForString)
nullValueForString
- public void setOptionsDocument(Document doc)
doc
- XMLドキュメントpublic void setReplaceAllMode(boolean replaceAllMode)
replaceAllMode
- public void setSleepInterval(int sleepRecordCount, int sleepTime)
sleepRecordCount
- 処理を休止するレコード件数sleepTime
- 休止する時間(ミ秒)public void setTestDatabase(boolean testDatabase)
public void setTestMaxCount(int testMaxCount)
testMaxCount
- public void setTestMode(boolean testMode)
testMode
- true:テストモード false:本番モードpublic void setXmlString(String src) throws ParserConfigurationException, SAXException, IOException
src
- XML文字列ParserConfigurationException
IOException
SAXException
Copyright © 2012 NTT DATA INTRAMART CORPORATION