jp.hishidama.sql
クラス SqlUtil

java.lang.Object
  上位を拡張 jp.hishidama.sql.SqlUtil

public class SqlUtil
extends Object

SQL生成補助クラス.

導入されたバージョン:
2007.09.14
作成者:
ひしだま

コンストラクタの概要
SqlUtil()
           
 
メソッドの概要
static void append(StringBuffer cb, StringBuffer vb, String col, int val, boolean quote)
          insert用項目値付加.
static void append(StringBuffer cb, StringBuffer vb, String col, String val, boolean quote)
          insert用項目値付加.
static void append(StringBuffer sb, String col, int val, boolean quote)
          update用項目値追加.
static void append(StringBuffer sb, String col, String val, boolean quote)
          update用項目値追加.
static boolean endsTrimWith(StringBuffer sb, String str)
           
static int execute(Connection conn, String sql)
          更新SQL実行.
static boolean isSpace(char c)
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

SqlUtil

public SqlUtil()
メソッドの詳細

append

public static void append(StringBuffer cb,
                          StringBuffer vb,
                          String col,
                          int val,
                          boolean quote)
insert用項目値付加.

パラメータ:
cb - 項目用StringBuffer
vb - 値用StringBuffer
col - カラム名
val - 値
quote - true:値をシングルクォートでくくる

append

public static void append(StringBuffer cb,
                          StringBuffer vb,
                          String col,
                          String val,
                          boolean quote)
insert用項目値付加.

パラメータ:
cb - 項目用StringBuffer
vb - 値用StringBuffer
col - カラム名
val - 値
quote - true:値をシングルクォートでくくる

append

public static void append(StringBuffer sb,
                          String col,
                          int val,
                          boolean quote)
update用項目値追加.

パラメータ:
sb - StringBuffer
col - カラム名
val - 値
quote - true:値をシングルクォートでくくる

append

public static void append(StringBuffer sb,
                          String col,
                          String val,
                          boolean quote)
update用項目値追加.

パラメータ:
sb - StringBuffer
col - カラム名
val - 値
quote - true:値をシングルクォートでくくる

endsTrimWith

public static boolean endsTrimWith(StringBuffer sb,
                                   String str)

isSpace

public static boolean isSpace(char c)

execute

public static int execute(Connection conn,
                          String sql)
更新SQL実行.

パラメータ:
conn - コネクション
sql - SQL
戻り値:
更新結果