|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Objectnet.argius.stu.sql.AbstractSQL
net.argius.stu.sql.SelectSQL
汎用SELECT文クラスです。
SELECT文の生成、実行、値の取得を行います。
最大件数が指定された場合、無駄な検索を減らすために
LimitEditorを使用します。
SQL,
LimitEditor| コンストラクタの概要 | |
SelectSQL()
SQLオブジェクトを生成します。 |
|
SelectSQL(Connection conn,
String table)
SQLオブジェクトを生成します。 |
|
SelectSQL(Connection conn,
String table,
int maxrows)
SQLオブジェクトを生成します。 |
|
SelectSQL(int limit)
SQLオブジェクトを生成します。 |
|
| メソッドの概要 | |
void |
clearAll()
オブジェクトの終了処理を実行します。 |
protected int |
executeQuery(PreparedStatement statement)
SQLを実行します。 |
protected String |
getSQLString()
SQL文字列を生成します。 |
String |
getValue(int index)
指定したインデックスのカラム値を文字列として取得します。 |
String |
getValue(String key)
指定したカラム名の値を文字列として取得します。 |
List |
getValues()
現在のレコードの全ての列値をリストとして返します。 |
boolean |
next()
結果レコードのカーソルを次の行に移動します。 |
protected String |
partialInfo()
オブジェクトの個別情報を取得します。 |
String |
toString()
このオブジェクトの文字列形式を取得します。 |
| クラス net.argius.stu.sql.AbstractSQL から継承したメソッド |
addColumn, addColumn, addParameter, addParameter, clearColumn, clearParameter, close, embedQueryString, execute, getColumns, getDatabaseName, getParameters, getQuery, getTable, open, setQuery, setQueryTimeout, toVerboseString |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| コンストラクタの詳細 |
public SelectSQL()
public SelectSQL(int limit)
limit - 最大件数
public SelectSQL(Connection conn,
String table)
conn - DBコネクションtable - TABLE名
public SelectSQL(Connection conn,
String table,
int maxrows)
conn - DBコネクションtable - TABLE名maxrows - 最大件数| メソッドの詳細 |
protected int executeQuery(PreparedStatement statement)
throws SQLException
AbstractSQL 内の executeQuerystatement - プリコンパイル済みステートメント
SQLException - SQL実行エラーprotected String getSQLString()
AbstractSQL 内の getSQLString
public boolean next()
throws SQLWarning
SQL 内の nextAbstractSQL 内の nexttrue、失敗した場合はfalse
SQLFailure - 結果レコード参照のエラー
SQLWarningpublic String getValue(String key)
SQL 内の getValueAbstractSQL 内の getValuekey - カラム名
public String getValue(int index)
SQL 内の getValueAbstractSQL 内の getValueindex - 列インデックス
public List getValues()
throws SQLException
SQL 内の getValuesAbstractSQL 内の getValuesSQLException - 結果レコード参照のエラー
public void clearAll()
throws SQLException
AbstractSQL 内の clearAllSQLException - SQL終了処理エラーprotected String partialInfo()
AbstractSQL 内の partialInfopublic String toString()
SQL 内の toStringAbstractSQL 内の toString
|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||