パッケージ org.nkjmlab.sorm4j
インタフェース TypedOrmReader<T>
-
- 既知のサブインタフェースのリスト:
TypedOrmConnection<T>
- 既知の実装クラスのリスト:
TypedOrmConnectionImpl
public interface TypedOrmReader<T>
The typed interface of reading functions of object-relation mapping.- 作成者:
- nkjm
-
-
メソッドの概要
すべてのメソッド インスタンス・メソッド abstractメソッド 修飾子とタイプ メソッド 説明 List<T>
readAll()
Reads all rows from the table indicated by object class.LazyResultSet<T>
readAllLazy()
ReturnsLazyResultSet
represents all rows from the table indicated by object class.T
readByPrimaryKey(Object... primaryKeyValues)
Reads an object by its primary keys from the table indicated by object class.T
readFirst(String sql, Object... parameters)
Reads an object from the database.T
readFirst(SqlStatement sql)
Reads an object from the database.LazyResultSet<T>
readLazy(String sql, Object... parameters)
Returns anLazyResultSet
.LazyResultSet<T>
readLazy(SqlStatement sql)
Returns anLazyResultSet
.List<T>
readList(String sql, Object... parameters)
Reads a list of objects from the database by mapping the results of the parameterized SQL query into instances of the given object class.List<T>
readList(SqlStatement sql)
Reads a list of objects from the database by mapping the results of the parameterized SQL query into instances of the given object class.T
readOne(String sql, Object... parameters)
Reads only one object from the database.T
readOne(SqlStatement sql)
Reads only one object from the database.
-
-
-
メソッドの詳細
-
readAllLazy
LazyResultSet<T> readAllLazy()
ReturnsLazyResultSet
represents all rows from the table indicated by object class.- 戻り値:
-
readByPrimaryKey
T readByPrimaryKey(Object... primaryKeyValues)
Reads an object by its primary keys from the table indicated by object class.- パラメータ:
primaryKeyValues
-- 戻り値:
-
readFirst
T readFirst(SqlStatement sql)
Reads an object from the database.- パラメータ:
sql
-- 戻り値:
-
readFirst
T readFirst(String sql, Object... parameters)
Reads an object from the database.- パラメータ:
sql
-parameters
-- 戻り値:
-
readLazy
LazyResultSet<T> readLazy(SqlStatement sql)
Returns anLazyResultSet
. It is able to convert to Stream, List, and so on.- パラメータ:
sql
-- 戻り値:
-
readLazy
LazyResultSet<T> readLazy(String sql, Object... parameters)
Returns anLazyResultSet
. It is able to convert to Stream, List, and so on.- パラメータ:
sql
-parameters
-- 戻り値:
-
readList
List<T> readList(SqlStatement sql)
Reads a list of objects from the database by mapping the results of the parameterized SQL query into instances of the given object class. Only the columns returned from the SQL query will be set into the object instance.- パラメータ:
sql
-- 戻り値:
-
readList
List<T> readList(String sql, Object... parameters)
Reads a list of objects from the database by mapping the results of the parameterized SQL query into instances of the given object class. Only the columns returned from the SQL query will be set into the object instance.Parameters will be set according with the correspondence defined in
SqlParameterSetter.setParameters(PreparedStatement, Object[])
- パラメータ:
sql
-parameters
-- 戻り値:
-
readOne
T readOne(SqlStatement sql)
Reads only one object from the database.- パラメータ:
sql
-- 戻り値:
-
-