|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.apache.commons.dbutils.QueryLoader
QueryLoader は、SQL文をマップさせた問い合わせ名称を満たすプロパティファイルを読み込みます。
問い合わせ一式の登録処理を行うため、同一の問い合わせ名称で重複するコピー内容はメモリへ読み込まれません。
このクラスはスレッドセーフです。
QueryLoader loads properties files filled with query name to
SQL mappings. It acts as a registry for sets of queries so that multiple
copies of the same queries aren't loaded into memory. This class is thread
safe.
| コンストラクタの概要 | |
protected |
QueryLoader()
QueryLoader のコンストラクタ。 |
| メソッドの概要 | |
static QueryLoader |
instance()
このクラスのインスタンスを返します。 |
Map |
load(String path)
問い合わせ名称とSQL文の値が対応付けられたMapを読み込みます。 |
void |
unload(String path)
指定したパスに対応する問い合わせをキャッシュされたMapから削除します。 |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
protected QueryLoader()
| メソッドの詳細 |
public static QueryLoader instance()
public Map load(String path)
throws IOException
path - クラスローダがファイルを検索するのに使用するパス。
これはファイルシステムのパスではありません。
JAR化されたcom.yourcorp.app.jdbcパッケージのQueries.propertiesファイルを配置した場合、 このメソッドに
"/com/yourcorp/app/jdbc/Queries.properties" を渡してください。
IOException
IllegalArgumentException - 指定したパス上でクラスローダがファイルを見つけられなかった場合。
public void unload(String path)
path - 問い合わせが読み込まれたパス。
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||