インタフェース OrmMapReader
- 既知のサブインタフェースのリスト:
Orm
,OrmConnection
,OrmConnectionCommon
,OrmTransaction
,Sorm
Map
.- 作成者:
- nkjm
-
メソッドの概要
修飾子とタイプメソッド説明Gets function which traverses and maps the all the rows in the given resultSet to an object list.Gets a function which maps one row in the resultSet to an 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
.readMapList
(String sql, Object... parameters) Reads a list of objects from the database by mapping the SQL execution results to instances ofMap
containing data from the execution of the provided parameterized SQL.readMapOne
(String sql, Object... parameters) Reads a first row from the database by mapping the results of the SQL query into an instance ofMap
.
-
メソッドの詳細
-
getRowToMapMapper
Gets a function which maps one row in the resultSet to an object. The method does not callResultSet.next()
.- 戻り値:
-
getResultSetToMapTraverser
ResultSetTraverser<List<Map<String,Object>>> getResultSetToMapTraverser()Gets function which traverses and maps the all the rows in the given resultSet to an object list.- 戻り値:
-
readMapFirst
- パラメータ:
sql
-- 戻り値:
-
readMapFirst
Reads a first row from the database by mapping the results of the SQL query into an instance ofMap
.Letter case of the key in the Map depends on
ResultSetConverter.toSingleMap(org.nkjmlab.sorm4j.extension.SormOptions, java.sql.ResultSet, java.util.List<java.lang.String>, java.util.List<java.lang.Integer>)
Types returned from the database will be converted to Java types in the map according with the correspondence defined in
ResultSetConverter.toSingleMap(SormOptions, ResultSet, List, List)
.Parameters will be set according with the correspondence defined in
SqlParametersSetter.setParameters(SormOptions, PreparedStatement, Object...)
- パラメータ:
sql
- with ordered parameter. The other type parameters (e.g. named parameter, list parameter) could not be used.parameters
- are ordered parameter.
-
readMapList
- パラメータ:
sql
-- 戻り値:
-
readMapList
Reads a list of objects from the database by mapping the SQL execution results to instances ofMap
containing data from the execution of the provided parameterized SQL.Letter case of the key in the Map depends on
ResultSetConverter.toSingleMap(org.nkjmlab.sorm4j.extension.SormOptions, java.sql.ResultSet, java.util.List<java.lang.String>, java.util.List<java.lang.Integer>)
Types of value returned from the database will be converted to Java types in the map according with the correspondence defined in
ResultSetConverter.toSingleMap(SormOptions, ResultSet, List, List)
.Parameters will be set according with the correspondence defined in
SqlParametersSetter.setParameters(SormOptions, PreparedStatement, Object...)
- パラメータ:
sql
- with ordered parameter. The other type parameters (e.g. named parameter, list parameter) could not be used.parameters
- are ordered parameter.
-
readMapOne
- パラメータ:
sql
-- 戻り値:
-
readMapOne
Reads a first row from the database by mapping the results of the SQL query into an instance ofMap
. If the given SQL statement gets non-unique result,SormException
is thrown.Letter case of the key in the Map depends on
ResultSetConverter.toSingleMap(org.nkjmlab.sorm4j.extension.SormOptions, java.sql.ResultSet, java.util.List<java.lang.String>, java.util.List<java.lang.Integer>)
Types of value returned from the database will be converted to Java types in the map according with the correspondence defined in
ResultSetConverter.toSingleMap(SormOptions, ResultSet, List, List)
.Parameters will be set according with the correspondence defined in
SqlParametersSetter.setParameters(SormOptions, PreparedStatement, Object...)
- パラメータ:
sql
- with ordered parameter. The other type parameters (e.g. named parameter, list parameter) could not be used.parameters
- are ordered parameter.
-