org.seasar.doma.jdbc
クラス AbstractSqlFileRepository

java.lang.Object
  上位を拡張 org.seasar.doma.jdbc.AbstractSqlFileRepository
すべての実装されたインタフェース:
SqlFileRepository
直系の既知のサブクラス:
GreedyCacheSqlFileRepository, NoCacheSqlFileRepository

public abstract class AbstractSqlFileRepository
extends Object
implements SqlFileRepository

SqlFileRepository の骨格実装です。

SQLファイルの解析結果をキャッシュするには getSqlFileWithCacheControl(String, Dialect) を実装してください。

作成者:
taedium

フィールドの概要
protected static String SQL_PATH_PREFIX
          SQLのパスのプレフィックスです。
protected static String SQL_PATH_SUFFIX
          SQLのパスのサフィックスです。
 
コンストラクタの概要
AbstractSqlFileRepository()
           
 
メソッドの概要
protected  SqlFile createSqlFile(String path, Dialect dialect)
          SQLファイルを作成します。
protected  String getPrimaryPath(String path, Dialect dialect)
          SQLファイルを見つける際の優先パスを取得します。
protected  String getSql(String path)
          SQLファイルからSQLを取り出し返します。
 SqlFile getSqlFile(String path, Dialect dialect)
          SQLファイルを返します。
protected abstract  SqlFile getSqlFileWithCacheControl(String path, Dialect dialect)
          キャッシュを制御してSQLファイルを返します。
protected  SqlNode parse(String sql)
          SQLを解析します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

SQL_PATH_PREFIX

protected static final String SQL_PATH_PREFIX
SQLのパスのプレフィックスです。

関連項目:
定数フィールド値

SQL_PATH_SUFFIX

protected static final String SQL_PATH_SUFFIX
SQLのパスのサフィックスです。

関連項目:
定数フィールド値
コンストラクタの詳細

AbstractSqlFileRepository

public AbstractSqlFileRepository()
メソッドの詳細

getSqlFile

public final SqlFile getSqlFile(String path,
                                Dialect dialect)
インタフェース SqlFileRepository の記述:
SQLファイルを返します。

定義:
インタフェース SqlFileRepository 内の getSqlFile
パラメータ:
path - SQLファイルのパス
dialect - 方言
戻り値:
SQLファイル

getSqlFileWithCacheControl

protected abstract SqlFile getSqlFileWithCacheControl(String path,
                                                      Dialect dialect)
キャッシュを制御してSQLファイルを返します。

パラメータ:
path - SQLファイルのパス
dialect - 方言
戻り値:
SQLファイル
例外:
SqlFileNotFoundException - SQLファイルが見つからない場合
JdbcException - 上記以外で例外が発生した場合

createSqlFile

protected final SqlFile createSqlFile(String path,
                                      Dialect dialect)
SQLファイルを作成します。

パラメータ:
path - SQLのパス
dialect - 方言
戻り値:
SQLファイル

getPrimaryPath

protected final String getPrimaryPath(String path,
                                      Dialect dialect)
SQLファイルを見つける際の優先パスを取得します。

パラメータ:
path - SQLのパス
dialect - 方言
戻り値:
RDBMS固有の名前を含んだSQLのパス

parse

protected final SqlNode parse(String sql)
SQLを解析します。

パラメータ:
sql - SQLの文字列
戻り値:
SQLの解析結果

getSql

protected final String getSql(String path)
SQLファイルからSQLを取り出し返します。

パラメータ:
path - パス
戻り値:
SQLの文字列


Copyright © 2009-2010 The Seasar Foundation. All Rights Reserved.