com.hamaf.hikyaku.access
クラス PreparedSqlAccess

java.lang.Object
  上位を拡張 com.hamaf.hikyaku.access.AccessBase
      上位を拡張 com.hamaf.hikyaku.access.PreparedSqlAccess
直系の既知のサブクラス:
BelongSql, GroupUserSql, SqlExec

public abstract class PreparedSqlAccess
extends AccessBase

タイトル:PreparedSqlAccess is Table Access with PreparedSql.

説明:PreparedSQL文で記述されたSQL文のファイルでテーブルアクセスを行なう


機能
  1. find : PreparedSQL文でテーブルからデータを取得する
  2. update : PreparedSQL文でテーブルを更新する

利用方法 :
   class XxxAccess extends PreparedSqlAccess {
     // 検索系のSQL文の場合
     public PreparedItems findAbc(PreparedItems pi) throws IOException,SQLException {
       // XxxAccess_findAbc.sqlに記述されているSQLが実行される
       return super.find(pi);
     }
     // 更新系のSQL文の場合
     public void updateXyz(PreparedItems pi) throws IOException,SQLException {
       // XxxAccess_updateXyz.sqlに記述されているSQLが実行される
       super.update(pi);
     }
   }
 

著作権: Copyright (c) 2008/06/17

バージョン:
1.0
作成者:
Hamanaka

フィールドの概要
protected  boolean _debug
           
protected  java.lang.String connectionParameter
           
 
クラス com.hamaf.hikyaku.access.AccessBase から継承されたフィールド
_conn, _DbConnect, _stmt
 
コンストラクタの概要
PreparedSqlAccess()
           
 
メソッドの概要
protected  PreparedItems find(PreparedItems pi)
          Describe find method : .
protected  PreparedItems find(PreparedItems pi, java.lang.String path)
          Describe find method : .
 void setConnectionParameter(java.lang.String connectionParameter)
           
 void setDebug()
           
protected  void update(PreparedItems pi)
          Describe update method : .
protected  void update(PreparedItems pi, java.lang.String path)
          Describe update method : .
 
クラス com.hamaf.hikyaku.access.AccessBase から継承されたメソッド
closeStatement, destroy, exclusion, getPkeys, getProductName, getStatement, setConnection
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

connectionParameter

protected java.lang.String connectionParameter

_debug

protected boolean _debug
コンストラクタの詳細

PreparedSqlAccess

public PreparedSqlAccess()
メソッドの詳細

find

protected final PreparedItems find(PreparedItems pi)
                            throws java.io.IOException,
                                   java.sql.SQLException
Describe find method : .
参照用(SELECT) Prepared SQL文の実行。
class Fileと同一フォルダーにあるSQLコマンドファイルの内容を実行する

パラメータ:
pi - a PreparedItems :
戻り値:
a PreparedItems :
例外:
java.io.IOException
java.sql.SQLException

find

protected final PreparedItems find(PreparedItems pi,
                                   java.lang.String path)
                            throws java.io.IOException,
                                   java.sql.SQLException
Describe find method : .
参照用(SELECT) Prepared SQL文の実行。
パスで指定されたフォルダーにあるSQLコマンドファイルの内容を実行する

パラメータ:
pi - a PreparedItems :
path - a String : SQLのファイルがあるフォルダー
戻り値:
a PreparedItems :
例外:
java.io.IOException
java.sql.SQLException

update

protected final void update(PreparedItems pi)
                     throws java.io.IOException,
                            java.sql.SQLException
Describe update method : .
更新用(INSERT, UPDATE, DELETE) Prepared SQL文の実行。
class Fileと同一フォルダーにあるSQLコマンドファイルの内容を実行する

パラメータ:
pi - a PreparedItems :
例外:
java.io.IOException
java.sql.SQLException

update

protected final void update(PreparedItems pi,
                            java.lang.String path)
                     throws java.io.IOException,
                            java.sql.SQLException
Describe update method : .
更新用(INSERT, UPDATE, DELETE) Prepared SQL文の実行。
パスで指定されたフォルダーにあるSQLコマンドファイルの内容を実行する

パラメータ:
pi - a PreparedItems :
path - a String : SQLのファイルがあるフォルダー
例外:
java.io.IOException
java.sql.SQLException

setDebug

public final void setDebug()
パラメータ:
debug - debug を設定します。

setConnectionParameter

public final void setConnectionParameter(java.lang.String connectionParameter)
パラメータ:
connectionParameter - connectionParameter を設定します。