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


Constructor Index

 o JdbcTableMapper()

Method Index

 o fromResultSet(ResultSet)
SQLの実行結果として得られたResultSetから特定のインスタンスを生成する
 o selectQuery(Object)
特定のインスタンスを取得するためのSelect文を生成する
 o updateQuery(Object, int)
特定のインスタンスを変更するためのUpdate文を生成する
 o updateQuery(Object, Object)
特定のインスタンスを変更するためのUpdate文を生成する

Constructors

 o JdbcTableMapper
 public JdbcTableMapper()

Methods

 o fromResultSet
 public abstract Object fromResultSet(ResultSet rs) throws SQLException, NotFoundException
SQLの実行結果として得られたResultSetから特定のインスタンスを生成する

Parameters:
rs - ResultSet
Returns:
Object
 o selectQuery
 public String selectQuery(Object key)
特定のインスタンスを取得するためのSelect文を生成する

Parameters:
key - java.lang.Object
Returns:
java.lang.String
 o updateQuery
 public String updateQuery(Object key,
                           int newValue)
特定のインスタンスを変更するためのUpdate文を生成する

Returns:
java.lang.String
 o 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