All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class bank.storage.DbAdaptor

java.lang.Object
   |
   +----bank.storage.DbAdaptor

public abstract class DbAdaptor
extends Object
データベースへのデータの格納、取り出しを行う抽象クラス サブクラスは各データベース用に、共通API retrieve(java.lang.Object id) store(java.lang.Object data, java.lang.Object id) を実装する クライアントは、各データベースの格納APIの違いを意識せずに 異なるデータベースを使うことができる #pattern: Adaptor


Variable Index

 o targetDomain

Constructor Index

 o DbAdaptor()
 o DbAdaptor(Object)

Method Index

 o getIdString(Object)
格納されるオブジェクトの型によりIDとなる適切な文字列を取り出す
 o getTargetDomain()
 o install()
DbAdaptorに対し特別な初期化が必要な場合に呼ばれる
 o retrieve(int)
 o retrieve(Object)
idValueに対応する特定のインスタンスを取得する
 o setAllEnvironmentSettings()
環境変数から必要な初期設定を行う
 o setEnvironmentSettings(String)
 o setTargetDomain(Object)
 o store(Object, Object)
idValueに対応する特定のインスタンスを格納する
 o uninstall()
DbAdaptorに対し特別なリソースの開放が必要な場合に呼ばれる

Variables

 o targetDomain
 protected Object targetDomain

Constructors

 o DbAdaptor
 public DbAdaptor()
 o DbAdaptor
 public DbAdaptor(Object targetDomain)
Parameters:
targetDomain - java.lang.Object

Methods

 o getIdString
 protected String getIdString(Object idValue)
格納されるオブジェクトの型によりIDとなる適切な文字列を取り出す

Parameters:
idValue - java.lang.Object
Returns:
Account
 o getTargetDomain
 public Object getTargetDomain()
Returns:
java.lang.Object
 o install
 public void install()
DbAdaptorに対し特別な初期化が必要な場合に呼ばれる

 o retrieve
 public Object retrieve(int id) throws NotFoundException
 o retrieve
 public abstract Object retrieve(Object idValue) throws NotFoundException
idValueに対応する特定のインスタンスを取得する

 o setAllEnvironmentSettings
 protected void setAllEnvironmentSettings()
環境変数から必要な初期設定を行う

 o setEnvironmentSettings
 public abstract void setEnvironmentSettings(String propertyName)
 o setTargetDomain
 public void setTargetDomain(Object targetDomain)
Parameters:
targetDomain - java.lang.Object
 o store
 public abstract void store(Object data,
                            Object idValue)
idValueに対応する特定のインスタンスを格納する

 o uninstall
 public void uninstall()
DbAdaptorに対し特別なリソースの開放が必要な場合に呼ばれる


All Packages  Class Hierarchy  This Package  Previous  Next  Index