|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
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
内の executeQuery
statement
- プリコンパイル済みステートメント
SQLException
- SQL実行エラーprotected String getSQLString()
AbstractSQL
内の getSQLString
public boolean next() throws SQLWarning
SQL
内の next
AbstractSQL
内の next
true
、失敗した場合はfalse
SQLFailure
- 結果レコード参照のエラー
SQLWarning
public String getValue(String key)
SQL
内の getValue
AbstractSQL
内の getValue
key
- カラム名
public String getValue(int index)
SQL
内の getValue
AbstractSQL
内の getValue
index
- 列インデックス
public List getValues() throws SQLException
SQL
内の getValues
AbstractSQL
内の getValues
SQLException
- 結果レコード参照のエラーpublic void clearAll() throws SQLException
AbstractSQL
内の clearAll
SQLException
- SQL終了処理エラーprotected String partialInfo()
AbstractSQL
内の partialInfo
public String toString()
SQL
内の toString
AbstractSQL
内の toString
|
|||||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |