ts.query
クラス BatchedQueryExecution

java.lang.Object
  上位を拡張 ts.query.QueryExecution
      上位を拡張 ts.query.BatchedQueryExecution
すべての実装されたインタフェース:
IQueryExecution

public abstract class BatchedQueryExecution
extends QueryExecution

一回の実行のおいて、同じ接続先に対する複数の照会/更新の実行を行うIQueryExecutionクラスの抽象クラス。

バージョン:
$Id: BatchedQueryExecution.java,v 1.5 2012-03-11 16:51:53 tayu Exp $
作成者:
佐藤隆之

入れ子のクラスの概要
static class BatchedQueryExecution.Attribute
          このクラスが使用する属性キーの列挙型。
 
インタフェース ts.query.IQueryExecution から継承された入れ子のクラス/インタフェース
IQueryExecution.Error
 
コンストラクタの概要
BatchedQueryExecution(QueryExecutionConfig config)
          実行設定オブジェクトを引数にとるコンストラクタ。
BatchedQueryExecution(QueryExecutionConfig config, IQueryConnection conn)
          実行設定オブジェクトとIQueryConnectionオブジェクトを引数にとる コンストラクタ。
 
メソッドの概要
protected  void disposeContent(QueryExecutionContent content, QueryResult result)
          実行内容オブジェクトの後始末をする。
 void execute(java.util.Map<java.lang.String,java.lang.Object> inputMap, IQueryResult result)
          このオブジェクトが表す照会又は更新処理を実行する。
protected abstract  java.util.Iterator<java.lang.String> iterateSubExecutionIds()
          副実行IDのイテレータを取得する。
protected  void prepareResultTable(QueryExecutionContent content)
          実行内容オブジェクトに結果データ・テーブルを設定する。
 
クラス ts.query.QueryExecution から継承されたメソッド
calcLimitFetchCount, calcLimitTimeMillis, checkFetchCount, checkTimeout, createContent, execute, executeContent, getConfig, getExecutionId, getQueryConnection, newResultTable, prepareContent
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

BatchedQueryExecution

public BatchedQueryExecution(QueryExecutionConfig config)
                      throws ts.util.ReasonedException,
                             ts.util.ReasonedRuntimeException
実行設定オブジェクトを引数にとるコンストラクタ。

パラメータ:
config - QueryExecutionConfigオブジェクト。
例外:
ts.util.ReasonedException - このオブジェクトで使用するIQueryConnectionオブジェクトの作成に失敗した場合。
ts.util.ReasonedRuntimeException - このオブジェクトが使用する接続設定が不正 だった場合。
java.lang.AssertionError - 引数がヌルの場合。

BatchedQueryExecution

public BatchedQueryExecution(QueryExecutionConfig config,
                             IQueryConnection conn)
実行設定オブジェクトとIQueryConnectionオブジェクトを引数にとる コンストラクタ。

パラメータ:
config - QueryExecutionConfigオブジェクト。
conn - IQueryConnectionオブジェクト。
例外:
java.lang.AssertionError - 引数がヌルの場合。
メソッドの詳細

execute

public void execute(java.util.Map<java.lang.String,java.lang.Object> inputMap,
                    IQueryResult result)
             throws ts.util.ReasonedException,
                    ts.util.ReasonedRuntimeException
このオブジェクトが表す照会又は更新処理を実行する。
実行結果は、QueryResultオブジェクトに格納される。

定義:
インタフェース IQueryExecution 内の execute
オーバーライド:
クラス QueryExecution 内の execute
パラメータ:
inputMap - 入力パラメータ・マップ。
result - クエリの実行結果を格納したQueryResultオブジェクト。
例外:
ts.util.ReasonedException - このオブジェクトが表す処理の実行に失敗した場合。
ts.util.ReasonedRuntimeException - 実行設定等が不正だった場合。

prepareResultTable

protected void prepareResultTable(QueryExecutionContent content)
実行内容オブジェクトに結果データ・テーブルを設定する。
実行内容オブジェクトの内容が更新処理のみの場合はヌルを設定する。 また、引数の実行結果オブジェクトに同じ実行IDの結果データ・テーブルが登録 されている場合はそれを設定する。 それ以外の場合は、結果データ・テーブルを新規に作成して設定する。

オーバーライド:
クラス QueryExecution 内の prepareResultTable
パラメータ:
content - 実行内容オブジェクト。

disposeContent

protected void disposeContent(QueryExecutionContent content,
                              QueryResult result)
実行内容オブジェクトの後始末をする。
このメソッドは、QueryExecution.executeContent(QueryExecutionContent)メソッドが 実行された後に呼び出される。 QueryExecution.executeContent(QueryExecutionContent)メソッドの実行途中で例外が 発生した場合も、このメソッドは呼ばれる。
結果データ・テーブルなど実行内容オブジェクトが保持する結果情報を、実行結果 オブジェクトに移すなどの処理を行うために用意されている。

オーバーライド:
クラス QueryExecution 内の disposeContent
パラメータ:
content - 実行内容オブジェクト。
result - 実行結果オブジェクト。

iterateSubExecutionIds

protected abstract java.util.Iterator<java.lang.String> iterateSubExecutionIds()
副実行IDのイテレータを取得する。

戻り値:
副実行IDのイテレータ。


Copyright (C) SATOH Takayuki All Rights Reserved.