com.hamaf.hikyaku.dataobject.utils
クラス PreparedSqlUtil

java.lang.Object
  上位を拡張 com.hamaf.hikyaku.dataobject.utils.PreparedSqlUtil

public class PreparedSqlUtil
extends java.lang.Object

タイトル:PreparedSqlUtil is Prepared SQL Utility.

説明:Prepared SQL文処理用のユーティリティ

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

バージョン:
1.0
作成者:
y-hamanaka

コンストラクタの概要
PreparedSqlUtil()
           
 
メソッドの概要
static java.lang.String cnvINParm(java.lang.String buf)
          Describe cnvINParm method : conversion IN Paramater.
static java.util.List<java.lang.String> getKeyName(java.lang.String buf)
          Describe getKeyName method : get IN Parameter name.
static java.io.InputStream getResource()
          Describe getResource method : get SQL File in classes.
static java.io.InputStream getResource(java.lang.String path)
          Describe getResource method : get SQL File at path.
static java.lang.String getSql(java.io.InputStream is, java.util.List<java.lang.String> del)
          Describe getSql method : creat SQL from stream.
static RetrieveKeysInterface setKeys(RetrieveKeysInterface rki, PreparedItems pi)
          Describe setKeys method : set key value in RetrieveKeysInterface.
static DetailItemsInterface setVals(DetailItemsInterface dii, PreparedItems pi)
          Describe setVals method : set values in DetailItemsInterface.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

PreparedSqlUtil

public PreparedSqlUtil()
メソッドの詳細

getResource

public static final java.io.InputStream getResource()
Describe getResource method : get SQL File in classes.
classes直下又はjarFile内からclassと同一フォルダー内のSQL定義Fileを取得する。
取得するファイル名 class名_Method名.sql

戻り値:
a InputStream :

getResource

public static final java.io.InputStream getResource(java.lang.String path)
Describe getResource method : get SQL File at path.
パスで指定されたフォルダー内でSQL定義Fileを取得する。
取得するファイル名 class名_Method名.sql

パラメータ:
path - a String : ベースとなるパス
戻り値:
a InputStream :

getSql

public static final java.lang.String getSql(java.io.InputStream is,
                                            java.util.List<java.lang.String> del)
                                     throws java.io.IOException
Describe getSql method : creat SQL from stream.
SQL文が記述されたファイルからSQL文を取得する。
その際、1文字目から/*n*/で指定されたnが、delLineに存在する場合、削除する

パラメータ:
del - a List :
戻り値:
a String :
例外:
java.io.IOException - a :

getKeyName

public static final java.util.List<java.lang.String> getKeyName(java.lang.String buf)
Describe getKeyName method : get IN Parameter name.
/*?キー値*/'テスト値'のキー値を順番に取得する。

パラメータ:
buf - a String : 検索の文字列
戻り値:
a List : キー値の並び

cnvINParm

public static final java.lang.String cnvINParm(java.lang.String buf)
Describe cnvINParm method : conversion IN Paramater.
/*?キー値*/'テスト値'を ? に変換する。

パラメータ:
buf - a String : 変換対象の文字列
戻り値:
a String : 変換後の文字列

setKeys

public static final RetrieveKeysInterface setKeys(RetrieveKeysInterface rki,
                                                  PreparedItems pi)
Describe setKeys method : set key value in RetrieveKeysInterface.
PreparedItems の結果情報を RetrieveKeysInterface のkey値に設定する。

パラメータ:
rki - a RetrieveKeysInterface :
pi - a PreparedItems :
戻り値:
a RetrieveKeysInterface :

setVals

public static final DetailItemsInterface setVals(DetailItemsInterface dii,
                                                 PreparedItems pi)
Describe setVals method : set values in DetailItemsInterface.
PreparedItems の最初の結果情報を DetailItemsInterface に設定する。

パラメータ:
dii - a DetailItemsInterface :
pi - a PreparedItems :
戻り値:
a DetailItemsInterface :