インタフェース OrmReader
-
- 既知の実装クラスのリスト:
OrmConnection,OrmMapper,OrmTransaction
public interface OrmReaderThe main interface of Reading functions of ORM reader. This interface based on Persist.java- 作成者:
- nkjm
-
-
メソッドの概要
すべてのメソッド インスタンス・メソッド abstractメソッド 修飾子とタイプ メソッド 説明 <T> List<T>readAll(Class<T> objectClass)<T> ReadResultSet<T>readAllLazy(Class<T> objectClass)<T> TreadByPrimaryKey(Class<T> objectClass, Object... primaryKeyValues)Reads an object from the database by its primary keys.<T> TreadFirst(Class<T> objectClass, String sql, Object... parameters)<T> ReadResultSet<T>readLazy(Class<T> objectClass, String sql, Object... parameters)Returns anReadResultSetand convert it to Stream, List, and so on.<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.Map<String,Object>readMapFirst(String sql, Object... parameters)Reads a first row from the database by mapping the results of the SQL query into an instance ofMap.ReadResultSet<Map<String,Object>>readMapLazy(String sql, Object... parameters)Returns anReadResultSetinstance containing data from the execution of the provided parametrized SQL and convert it to Stream, List, and so on.List<Map<String,Object>>readMapList(String sql, Object... parameters)Reads a list of objects from the database by mapping the SQL execution results to instances ofMapcontaining data from the execution of the provided parametrized SQL and
-
-
-
メソッドの詳細
-
readAllLazy
<T> ReadResultSet<T> readAllLazy(Class<T> objectClass)
-
readByPrimaryKey
<T> T readByPrimaryKey(Class<T> objectClass, Object... primaryKeyValues)
Reads an object from the database by its primary keys.
-
readLazy
<T> ReadResultSet<T> readLazy(Class<T> objectClass, String sql, Object... parameters)
Returns anReadResultSetand convert it to Stream, List, and so on.Parameters will be set according with the correspondence defined in
JavaToSqlDataConverter#setParameters(PreparedStatement, int[], Object[])- 導入されたバージョン:
- 1.0
-
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
JavaToSqlDataConverter#setParameters(PreparedStatement, int[], Object[])
-
readMapFirst
Map<String,Object> readMapFirst(String sql, Object... parameters)
Reads a first row from the database by mapping the results of the SQL query into an instance ofMap.Types returned from the database will be converted to Java types in the map according with the correspondence defined in
SqlToJavaDataConverter.getValueBySqlType(ResultSet, int, int).Parameters will be set according with the correspondence defined in
JavaToSqlDataConverter#setParameters(PreparedStatement, int[], Object[])- 導入されたバージョン:
- 1.0
-
readMapLazy
ReadResultSet<Map<String,Object>> readMapLazy(String sql, Object... parameters)
Returns anReadResultSetinstance containing data from the execution of the provided parametrized SQL and convert it to Stream, List, and so on.Types returned from the database will be converted to Java types in the map according with the correspondence defined in
SqlToJavaDataConverter.getValueBySqlType(ResultSet, int, int).Parameters will be set according with the correspondence defined in
JavaToSqlDataConverter#setParameters(PreparedStatement, int[], Object[])- 導入されたバージョン:
- 1.0
-
readMapList
List<Map<String,Object>> readMapList(String sql, Object... parameters)
Reads a list of objects from the database by mapping the SQL execution results to instances ofMapcontaining data from the execution of the provided parametrized SQL andTypes returned from the database will be converted to Java types in the map according with the correspondence defined in
SqlToJavaDataConverter.getValueBySqlType(ResultSet, int, int).Parameters will be set according with the correspondence defined in
JavaTOSqlDataConverter#setParameters(PreparedStatement, int[], Object[])- 導入されたバージョン:
- 1.0
-
-