openGionopenGion
5.1.3.0

org.opengion.hayabusa.db
クラス DBTableModelUtil

java.lang.Object
  上位を拡張 org.opengion.hayabusa.db.DBTableModelUtil

public final class DBTableModelUtil
extends Object

データベース関連の便利なメソッドを集めた簡易ユーティリティークラスです。 全てのメソッドは、static メソッドになっています。

機能階層
DB/Shell制御
変更履歴:
2.1.1.1 (2002/11/15) Serializable インターフェースを削除する。
4.0.0.0 (2007/10/16) 名称変更(DBUtil > DBTableModelUtil) DBアクセス関係のメソッドはfukurou/db/DBUtilに移動
バージョン
4.0
作成者
Kazuhiko Hasegawa
導入されたバージョン:
JDK5.0,

メソッドの概要
static DBTableModel makeDBTable(String[] clms, String[][] vals, ResourceManager resource)
          カラム名の配列及びデータの2次元配列からDBテーブルモデルを作成します。
static DBTableModel makeDBTable(String stmt, String[] args, ResourceManager resource, ApplicationInfo appInfo)
          初期データベースに接続して、Queryを実行します。
static DBTableModel makeDBTable(String stmt, String[] args, ResourceManager resource, ApplicationInfo appInfo, String dbid)
          検索するデータベースを指定して、Queryを実行します。
static DBTableModel newDBTable()
          空の DBTableModel オブジェクトを作成します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

makeDBTable

public static DBTableModel makeDBTable(String stmt,
                                       String[] args,
                                       ResourceManager resource,
                                       ApplicationInfo appInfo)
初期データベースに接続して、Queryを実行します。 ステートメントと引数により、Prepared クエリーの検索のみ実行します。 結果は,DBTableModel として返されます。

パラメータ:
stmt - ステートメント文字列
args - オブジェクトの引数配列
resource - ResourceManager
appInfo - ApplicationInfo
戻り値:
検索結果の配列
変更履歴:
3.0.0.0 (2002/12/25) 新規追加
3.8.7.0 (2006/12/15) アクセスログ取得の為,ApplicationInfo オブジェクトを設定
4.0.0 (2005/01/31) lang ⇒ ResourceManager へ変更
4.0.0.0 (2007/10/10) dbid の初期値を、"DEFAULT" から null に変更

makeDBTable

public static DBTableModel makeDBTable(String stmt,
                                       String[] args,
                                       ResourceManager resource,
                                       ApplicationInfo appInfo,
                                       String dbid)
検索するデータベースを指定して、Queryを実行します。 ステートメントと引数により、Prepared クエリーの検索のみ実行します。 結果は,DBTableModel として返されます。 検索以外のSQLも実行できます。結果は、null を返します。

パラメータ:
stmt - ステートメント文字列
args - オブジェクトの引数配列
resource - ResourceManager
appInfo - ApplicationInfo
dbid - 接続先ID
戻り値:
検索結果の配列
変更履歴:
3.0.0.0 (2002/12/25) 新規追加
3.0.0.1 (2003/02/14) ヘッダー、フッター情報が null のときの処理追加。
3.5.6.0 (2004/06/18) nullに対する無駄な比較を削除します。
3.8.7.0 (2006/12/15) アクセスログ取得の為,ApplicationInfo オブジェクトを設定
4.0.0 (2005/01/31) lang ⇒ ResourceManager へ変更

newDBTable

public static DBTableModel newDBTable()
空の DBTableModel オブジェクトを作成します。 これは、本来、ファクトリクラスで作成すべきですが、簡易作成メソッドとして DBUtil の static メソッドとして実装します。

戻り値:
DBTableModel
変更履歴:
4.0.0 (2005/01/31) 新規追加

makeDBTable

public static DBTableModel makeDBTable(String[] clms,
                                       String[][] vals,
                                       ResourceManager resource)
カラム名の配列及びデータの2次元配列からDBテーブルモデルを作成します。 カラム名がセットされていない若しくはデータがセットされていない場合は、nullを返します。

パラメータ:
clms - カラム名の配列
vals - 値の配列
resource - ResourceManager
戻り値:
DBテーブルモデル
変更履歴:
4.2.1.0 (2008/04/26) 新規追加

openGion 5.1.3.0

Webアプリケーションフレームワーク openGion
SourceForge.JPCopyright (c) 2009 The openGion Project.