org.seasar.doma.jdbc
クラス BuiltinSqlFileRepository

java.lang.Object
  上位を拡張 org.seasar.doma.jdbc.BuiltinSqlFileRepository
すべての実装されたインタフェース:
SqlFileRepository

public class BuiltinSqlFileRepository
extends Object
implements SqlFileRepository

SQLの解析結果を無制限にキャッシュする SqlFileRepository の実装です。

作成者:
taedium

フィールドの概要
protected static String SQL_PATH_PREFIX
          SQLのパスのプレフィックスです。
protected static String SQL_PATH_SUFFIX
          SQLのパスのサフィックスです。
protected  ConcurrentMap<String,SqlFile> sqlFileMap
          SQLのパスをキー、SQLファイルを値とするマップです。
 
コンストラクタの概要
BuiltinSqlFileRepository()
           
 
メソッドの概要
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  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のパスのサフィックスです。

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

sqlFileMap

protected final ConcurrentMap<String,SqlFile> sqlFileMap
SQLのパスをキー、SQLファイルを値とするマップです。

コンストラクタの詳細

BuiltinSqlFileRepository

public BuiltinSqlFileRepository()
メソッドの詳細

getSqlFile

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

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

createSqlFile

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

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

getPrimaryPath

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

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

parse

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

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

getSql

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

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


Copyright © 2009 The Seasar Foundation. All Rights Reserved.