D - 本タスクが処理する入力データの型public abstract class BatchActionBase<D> extends DbAccessSupport implements nablarch.fw.handler.ExecutionHandlerCallback<CommandLine,Result>, nablarch.fw.TransactionEventCallback<D>
ExecutionHandlerCallbackインタフェースに関するNOP実装が与えられており、
必要に応じてオーバーライドできるようになっている。| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
error(Throwable error,
ExecutionContext context)
実行時例外/エラーの発生によって本処理が終了した場合に一度だけ実行される。
|
protected void |
initialize(CommandLine command,
ExecutionContext context)
実行管理ハンドラ(
ExecutionHandler)の本処理開始前に一度だけ実行される。 |
protected void |
terminate(Result result,
ExecutionContext context)
本処理が終了した場合に一度だけ実行される。
|
protected void |
transactionFailure(D inputData,
ExecutionContext context)
トランザクション処理が異常終了した場合に実行される。
|
protected void |
transactionSuccess(D inputData,
ExecutionContext context)
トランザクション処理が正常終了した場合に実行される。
|
protected void |
writeErrorLog(Object data,
String failureCode,
Object... msgOptions)
ERRORレベルで障害ログ出力を行う。
|
protected void |
writeFatalLog(Object data,
String failureCode,
Object... msgOptions)
FATALレベルで障害ログ出力を行う。
|
protected void |
writeLog(String msgId,
Object... msgOptions)
INFOレベルでログ出力を行う。
|
countByParameterizedSql, countByStatementSql, getParameterizedSqlStatement, getParameterizedSqlStatement, getSqlCStatement, getSqlPStatement, search@Published protected void initialize(CommandLine command, ExecutionContext context)
ExecutionHandler)の本処理開始前に一度だけ実行される。
デフォルトでは何もしない。
必要に応じてオーバライドすること。command - 起動コマンドラインcontext - 実行コンテキスト@Published protected void error(Throwable error, ExecutionContext context)
error - 本処理で発生した実行時例外/エラーcontext - 実行コンテキスト@Published protected void terminate(Result result, ExecutionContext context)
result - 本処理の実行結果context - 実行コンテキスト@Published protected void transactionSuccess(D inputData, ExecutionContext context)
inputData - 入力データcontext - 実行コンテキスト@Published protected void transactionFailure(D inputData, ExecutionContext context)
inputData - 入力データcontext - 実行コンテキスト@Published protected void writeLog(String msgId, Object... msgOptions)
msgId - メッセージIDmsgOptions - メッセージIDから取得したメッセージに埋め込む値@Published protected void writeErrorLog(Object data, String failureCode, Object... msgOptions)
data - 処理対象データfailureCode - 障害コード(メッセージID)msgOptions - 障害コードから取得したメッセージに埋め込む値