org.seasar.framework.util
クラス StatementUtil

java.lang.Object
  拡張org.seasar.framework.util.StatementUtil

public final class StatementUtil
extends Object

Statement用のユーティリティクラスです。

作成者:
higa

メソッドの概要
static void close(Statement statement)
          Statementを閉じます。
static boolean execute(Statement statement, String sql)
          SQLを実行します。
static ResultSet getResultSet(Statement statement)
          結果セットを返します。
static void setFetchSize(Statement statement, int fetchSize)
          フェッチサイズを設定します。
static void setMaxRows(Statement statement, int maxRows)
          最大行数を設定します。
static void setQueryTimeout(Statement statement, int queryTimeout)
          クエリタイムアウトを設定します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

execute

public static boolean execute(Statement statement,
                              String sql)
                       throws SQLRuntimeException
SQLを実行します。

パラメータ:
statement -
sql -
戻り値:
実行した結果
例外:
SQLRuntimeException - SQLExceptionが発生した場合
関連項目:
Statement.execute(String)

setFetchSize

public static void setFetchSize(Statement statement,
                                int fetchSize)
                         throws SQLRuntimeException
フェッチサイズを設定します。

パラメータ:
statement -
fetchSize -
例外:
SQLRuntimeException - SQLExceptionが発生した場合
関連項目:
Statement.setFetchSize(int)

setMaxRows

public static void setMaxRows(Statement statement,
                              int maxRows)
                       throws SQLRuntimeException
最大行数を設定します。

パラメータ:
statement -
maxRows -
例外:
SQLRuntimeException - SQLExceptionが発生した場合
関連項目:
Statement.setMaxRows(int)

setQueryTimeout

public static void setQueryTimeout(Statement statement,
                                   int queryTimeout)
                            throws SQLRuntimeException
クエリタイムアウトを設定します。

パラメータ:
statement -
queryTimeout -
例外:
SQLRuntimeException - SQLExceptionが発生した場合
関連項目:
Statement.setQueryTimeout(int)

close

public static void close(Statement statement)
                  throws SQLRuntimeException
Statementを閉じます。

パラメータ:
statement -
例外:
SQLRuntimeException - SQLExceptionが発生した場合
関連項目:
Statement.close()

getResultSet

public static ResultSet getResultSet(Statement statement)
                              throws SQLRuntimeException
結果セットを返します。

パラメータ:
statement -
戻り値:
結果セット
例外:
SQLRuntimeException


Copyright ? 2004-2008 The Seasar Foundation. All Rights Reserved.