All Packages Class Hierarchy This Package Previous Next Index
Class bank.storage.JdbcTableMapper
java.lang.Object
|
+----bank.storage.JdbcTableMapper
- public abstract class JdbcTableMapper
- extends Object
ドメインモデルとRDBのテーブルとの対応を行う
selectQuery(java.lang.Object data) で、dataオブジェクト用のSELECT文
updateQuery(java.lang.Object data) で、dataオブジェクト用のUPDATE文
を提供する
fromReultSet(java.sql.ResultSet) で、ResultSetからドメインモデルへの変換を行う
#pattern: Strategy
-
JdbcTableMapper()
-
-
fromResultSet(ResultSet)
- SQLの実行結果として得られたResultSetから特定のインスタンスを生成する
-
selectQuery(Object)
- 特定のインスタンスを取得するためのSelect文を生成する
-
updateQuery(Object, int)
- 特定のインスタンスを変更するためのUpdate文を生成する
-
updateQuery(Object, Object)
- 特定のインスタンスを変更するためのUpdate文を生成する
JdbcTableMapper
public JdbcTableMapper()
fromResultSet
public abstract Object fromResultSet(ResultSet rs) throws SQLException, NotFoundException
- SQLの実行結果として得られたResultSetから特定のインスタンスを生成する
- Parameters:
- rs - ResultSet
- Returns:
- Object
selectQuery
public String selectQuery(Object key)
- 特定のインスタンスを取得するためのSelect文を生成する
- Parameters:
- key - java.lang.Object
- Returns:
- java.lang.String
updateQuery
public String updateQuery(Object key,
int newValue)
- 特定のインスタンスを変更するためのUpdate文を生成する
- Returns:
- java.lang.String
updateQuery
public String updateQuery(Object key,
Object newValue)
- 特定のインスタンスを変更するためのUpdate文を生成する
- Parameters:
- key - java.lang.Object
- newValue - java.lang.Object
- Returns:
- java.lang.String
All Packages Class Hierarchy This Package Previous Next Index