jp.terasoluna.fw.dao.ibatis
クラス QueryRowHandleDAOiBatisImpl

java.lang.Object
  上位を拡張 org.springframework.dao.support.DaoSupport
      上位を拡張 org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
          上位を拡張 jp.terasoluna.fw.dao.ibatis.QueryRowHandleDAOiBatisImpl
すべての実装されたインタフェース:
QueryRowHandleDAO, org.springframework.beans.factory.InitializingBean

public class QueryRowHandleDAOiBatisImpl
extends org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
implements QueryRowHandleDAO

QueryRowHandleDAOインタフェースのiBATIS実装クラス。
参照系SQLの結果を1行ずつ処理する。

executeWithRowHandlerメソッドの引数にDataRowHandler実装クラスを渡して使用する。
executeWithRowHandlerメソッド自体は、SQLの実行結果を返さないことに注意する。
SQLの実行結果の1行ごとにDataRowHandler#handleRow()が呼ばれ、 引数に1行のデータを格納したオブジェクトが渡される。
DataRowHandler#handleRow()には、1行分のデータ処理を実装する必要がある。

注意事項 iBATISマッピング定義ファイルの<statement>要素、<select>要素、 <procedure>要素にて大量データを返すようなクエリを記述する場合には、 fetchSize属性に適切な値を設定しておくこと。
fetchSize属性にはJDBCドライバとデータベース間の通信において、 一度の通信で取得するデータの件数を設定する。
fetchSize属性を省略した場合は各JDBCドライバのデフォルト値が利用される。

関連項目:
DataRowHandler, QueryRowHandleDAO

フィールドの概要
private static org.apache.commons.logging.Log log
          ログインスタンス
 
クラス org.springframework.dao.support.DaoSupport から継承されたフィールド
logger
 
コンストラクタの概要
QueryRowHandleDAOiBatisImpl()
           
 
メソッドの概要
 void executeWithRowHandler(java.lang.String sqlID, java.lang.Object bindParams, DataRowHandler rowHandler)
          SQLの実行結果をDataRowHandlerで1行ずつ処理する。
 
クラス org.springframework.orm.ibatis.support.SqlMapClientDaoSupport から継承されたメソッド
checkDaoConfig, getDataSource, getSqlMapClient, getSqlMapClientTemplate, setDataSource, setSqlMapClient, setSqlMapClientTemplate
 
クラス org.springframework.dao.support.DaoSupport から継承されたメソッド
afterPropertiesSet, initDao
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

log

private static org.apache.commons.logging.Log log
ログインスタンス

コンストラクタの詳細

QueryRowHandleDAOiBatisImpl

public QueryRowHandleDAOiBatisImpl()
メソッドの詳細

executeWithRowHandler

public void executeWithRowHandler(java.lang.String sqlID,
                                  java.lang.Object bindParams,
                                  DataRowHandler rowHandler)
SQLの実行結果をDataRowHandlerで1行ずつ処理する。

定義:
インタフェース QueryRowHandleDAO 内の executeWithRowHandler
パラメータ:
sqlID - 実行するSQLのID
bindParams - SQLにバインドする値を格納したオブジェクト
rowHandler - 1行取得ごとに処理するハンドラ