|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectorg.seasar.extension.jdbc.query.AbstractQuery<S>
org.seasar.extension.jdbc.query.AbstractSelect<T,S>
T
- 戻り値のベースの型です。S
- Select
のサブタイプです。public abstract class AbstractSelect<T,S extends Select<T,S>>
検索の抽象クラスです。
フィールドの概要 | |
---|---|
protected Class<T> |
baseClass
ベースクラスです。 |
protected int |
fetchSize
フェッチ数です。 |
protected int |
limit
リミットです。 |
protected int |
maxRows
最大行数です。 |
protected int |
offset
オフセットです。 |
クラス org.seasar.extension.jdbc.query.AbstractQuery から継承されたフィールド |
---|
callerClass, callerMethodName, executedSql, jdbcManager, logger, paramList, queryTimeout |
コンストラクタの概要 | |
---|---|
AbstractSelect(JdbcManager jdbcManager,
Class<T> baseClass)
AbstractSelect を作成します。 |
メソッドの概要 | |
---|---|
protected String |
convertLimitSql(String sql)
必要ならページング用にSQLを変換します。 |
protected abstract ResultSetHandler |
createResultListResultSetHandler()
リストを返す結果セットハンドラを作成します。 |
protected ResultSet |
createResultSet(JdbcContext jdbcContext)
結果セットを作成します。 |
protected abstract ResultSetHandler |
createSingleResultResultSetHandler()
単独の値を返す結果セットハンドラを作成します。 |
S |
fetchSize(int fetchSize)
フェッチ数を設定します。 |
Class<T> |
getBaseClass()
ベースクラスを返します。 |
protected PreparedStatement |
getCursorPreparedStatement(JdbcContext jdbcContext)
カーソルつきの準備されたステートメントを返します。 |
int |
getFetchSize()
フェッチ数を返します。 |
int |
getLimit()
リミットを返します。 |
int |
getMaxRows()
最大行数を返します。 |
int |
getOffset()
オフセットを返します。 |
protected PreparedStatement |
getPreparedStatement(JdbcContext jdbcContext)
準備されたステートメントを返します。 |
List<T> |
getResultList()
検索してベースオブジェクトのリストを返します。 |
protected List<T> |
getResultListInternal()
検索してベースオブジェクトのリストを返します。 |
T |
getSingleResult()
検索してベースオブジェクトを返します。 |
protected T |
getSingleResultInternal()
検索してベースオブジェクトを返します。 |
S |
limit(int limit)
リミットを設定します。 |
S |
maxRows(int maxRows)
最大行数を設定します。 |
S |
offset(int offset)
オフセットを設定します。 |
protected void |
setupPreparedStatement(PreparedStatement ps)
準備されたステートメントをセットアップします。 |
クラス org.seasar.extension.jdbc.query.AbstractQuery から継承されたメソッド |
---|
addParam, addParam, addParam, addParam, callerClass, callerMethodName, getCallerClass, getCallerMethodName, getExecutedSql, getJdbcManager, getParam, getParamClasses, getParamSize, getParamValues, getQueryTimeout, getValueType, handleResultSet, logSql, logSql, prepare, prepareCallerClassAndMethodName, prepareInParams, queryTimeout, resetParams |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
インタフェース org.seasar.extension.jdbc.Query から継承されたメソッド |
---|
callerClass, callerMethodName, queryTimeout |
フィールドの詳細 |
---|
protected Class<T> baseClass
protected int maxRows
protected int fetchSize
protected int offset
protected int limit
コンストラクタの詳細 |
---|
public AbstractSelect(JdbcManager jdbcManager, Class<T> baseClass)
AbstractSelect
を作成します。
jdbcManager
- JDBCマネージャbaseClass
- ベースクラスメソッドの詳細 |
---|
public S maxRows(int maxRows)
Select
の記述:
Select<T,S extends Select<T,S>>
内の maxRows
maxRows
- 最大行数
public S fetchSize(int fetchSize)
Select
の記述:
Select<T,S extends Select<T,S>>
内の fetchSize
fetchSize
- フェッチ数
public S limit(int limit)
Select
の記述:
Select<T,S extends Select<T,S>>
内の limit
limit
- リミット
public S offset(int offset)
Select
の記述:
Select<T,S extends Select<T,S>>
内の offset
offset
- オフセット
protected String convertLimitSql(String sql)
sql
- SQL
public List<T> getResultList()
Select
の記述:
Select<T,S extends Select<T,S>>
内の getResultList
ベースオブジェクトのリスト。
1件も対象がないときはnullではなく空のリストを返します。
public T getSingleResult() throws SNonUniqueResultException
Select
の記述:
Select<T,S extends Select<T,S>>
内の getSingleResult
ベースオブジェクト。
1件も対象がないときはnullを返します。
SNonUniqueResultException
- 検索結果がユニークでない場合。protected List<T> getResultListInternal()
protected T getSingleResultInternal()
protected PreparedStatement getPreparedStatement(JdbcContext jdbcContext)
jdbcContext
- JDBCコンテキスト
protected PreparedStatement getCursorPreparedStatement(JdbcContext jdbcContext)
jdbcContext
- JDBCコンテキスト
protected void setupPreparedStatement(PreparedStatement ps)
ps
- 準備されたステートメントprotected abstract ResultSetHandler createResultListResultSetHandler()
protected abstract ResultSetHandler createSingleResultResultSetHandler()
protected ResultSet createResultSet(JdbcContext jdbcContext)
jdbcContext
- JDBCコンテキスト
public Class<T> getBaseClass()
public int getFetchSize()
public int getLimit()
public int getMaxRows()
public int getOffset()
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |