|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
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 boolean |
disallowNoResult
検索結果がなかった場合に NoResultException をスローするならtrue です。 |
protected int |
fetchSize
フェッチ数です。 |
protected int |
limit
リミットです。 |
protected int |
maxRows
最大行数です。 |
protected int |
offset
オフセットです。 |
protected boolean |
resultLob
戻り値型がLOBなら true です。 |
protected TemporalType |
resultTemporalType
戻り値の時制の種別です。 |
クラス org.seasar.extension.jdbc.query.AbstractQuery から継承されたフィールド |
---|
callerClass, callerMethodName, executedSql, jdbcManager, logger, paramList, queryTimeout |
コンストラクタの概要 | |
---|---|
AbstractSelect(JdbcManagerImplementor 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 |
disallowNoResult()
検索結果がなかった場合、 NoResultException をスローするよう設定します。 |
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 |
lob()
戻り値またはその要素がLOBであることを指定します。 |
S |
maxRows(int maxRows)
最大行数を設定します。 |
S |
offset(int offset)
オフセットを設定します。 |
protected void |
setupPreparedStatement(PreparedStatement ps)
準備されたステートメントをセットアップします。 |
S |
temporal(TemporalType temporalType)
戻り値またはその要素の TemporalType を指定します。 |
クラス org.seasar.extension.jdbc.query.AbstractQuery から継承されたメソッド |
---|
addParam, addParam, addParam, addParam, callerClass, callerMethodName, getCallerClass, getCallerMethodName, getExecutedSql, getJdbcManager, getParam, getParamClasses, getParamSize, getParamValues, getParamValueTypes, 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
protected boolean disallowNoResult
NoResultException
をスローするならtrue
です。
protected boolean resultLob
true
です。
protected TemporalType resultTemporalType
コンストラクタの詳細 |
---|
public AbstractSelect(JdbcManagerImplementor jdbcManager, Class<T> baseClass)
AbstractSelect
を作成します。
jdbcManager
- 内部的なJDBCマネージャbaseClass
- ベースクラスメソッドの詳細 |
---|
public S maxRows(int maxRows)
Select
の記述:
Select<T,S extends Select<T,S>>
内の maxRows
maxRows
- 最大行数
Statement.setMaxRows(int)
public S fetchSize(int fetchSize)
Select
の記述:
Select<T,S extends Select<T,S>>
内の fetchSize
fetchSize
- フェッチ数
Statement.setFetchSize(int)
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
- オフセット
public S disallowNoResult()
Select
の記述: NoResultException
をスローするよう設定します。
Select<T,S extends Select<T,S>>
内の disallowNoResult
public S lob()
Select
の記述:
このメソッドの呼び出しは、戻り値またはその要素がString
型の場合に有効です。
Select<T,S extends Select<T,S>>
内の lob
public S temporal(TemporalType temporalType)
Select
の記述: TemporalType
を指定します。
このメソッドの呼び出しは、戻り値またはその要素がDate
もしくはCalendar
型の場合に有効です。
Select<T,S extends Select<T,S>>
内の temporal
temporalType
- 時制の種別
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()
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |