パッケージ org.nkjmlab.sorm4j
インタフェース OrmReader
-
- 既知のサブインタフェースのリスト:
OrmConnection,OrmTransaction
- 既知の実装クラスのリスト:
OrmConnectionImpl,SormImpl.OrmTransactionImpl
public interface OrmReaderThe interface of reading functions of object-relation mapping.- 作成者:
- nkjm
-
-
メソッドの概要
すべてのメソッド インスタンス・メソッド abstractメソッド 修飾子とタイプ メソッド 説明 <T> List<T>readAll(Class<T> objectClass)Reads all rows from the table indicated by object class.<T> LazyResultSet<T>readAllLazy(Class<T> objectClass)ReturnsLazyResultSetrepresents all rows from the table indicated by object class.<T> TreadByPrimaryKey(Class<T> objectClass, Object... primaryKeyValues)Reads an object by its primary keys from the table indicated by object class.<T> TreadFirst(Class<T> objectClass, String sql, Object... parameters)Reads an object from the database.<T> TreadFirst(Class<T> objectClass, SqlStatement sql)Reads an object from the database.<T> LazyResultSet<T>readLazy(Class<T> objectClass, String sql, Object... parameters)Returns anLazyResultSet.<T> LazyResultSet<T>readLazy(Class<T> objectClass, SqlStatement sql)Returns anLazyResultSet.<T> List<T>readList(Class<T> objectClass, 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.<T> List<T>readList(Class<T> objectClass, 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> TreadOne(Class<T> objectClass, String sql, Object... parameters)Reads only one object from the database.<T> TreadOne(Class<T> objectClass, SqlStatement sql)Reads only one object from the database.
-
-
-
メソッドの詳細
-
readAll
<T> List<T> readAll(Class<T> objectClass)
Reads all rows from the table indicated by object class.- 型パラメータ:
T-- パラメータ:
objectClass-- 戻り値:
-
readAllLazy
<T> LazyResultSet<T> readAllLazy(Class<T> objectClass)
ReturnsLazyResultSetrepresents all rows from the table indicated by object class.- 型パラメータ:
T-- パラメータ:
objectClass-- 戻り値:
-
readByPrimaryKey
<T> T readByPrimaryKey(Class<T> objectClass, Object... primaryKeyValues)
Reads an object by its primary keys from the table indicated by object class.- 型パラメータ:
T-- パラメータ:
objectClass-primaryKeyValues-- 戻り値:
-
readFirst
<T> T readFirst(Class<T> objectClass, SqlStatement sql)
Reads an object from the database.- 型パラメータ:
T-- パラメータ:
objectClass-sql-- 戻り値:
-
readFirst
<T> T readFirst(Class<T> objectClass, String sql, Object... parameters)
Reads an object from the database.- 型パラメータ:
T-- パラメータ:
objectClass-sql-parameters-- 戻り値:
-
readLazy
<T> LazyResultSet<T> readLazy(Class<T> objectClass, SqlStatement sql)
Returns anLazyResultSet. It is able to convert to Stream, List, and so on.- 型パラメータ:
T-- パラメータ:
objectClass-sql-- 戻り値:
-
readLazy
<T> LazyResultSet<T> readLazy(Class<T> objectClass, String sql, Object... parameters)
Returns anLazyResultSet. It is able to convert to Stream, List, and so on.Parameters will be set according with the correspondence defined in
SqlParameterSetter.setParameters(PreparedStatement,Object[])
-
readList
<T> List<T> readList(Class<T> objectClass, 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.- 型パラメータ:
T-- パラメータ:
objectClass-sql-- 戻り値:
-
readList
<T> List<T> readList(Class<T> objectClass, 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[])
-
readOne
<T> T readOne(Class<T> objectClass, SqlStatement sql)
Reads only one object from the database.- 型パラメータ:
T-- パラメータ:
objectClass-sql-- 戻り値:
-
-