パッケージ org.nkjmlab.sorm4j
インタフェース OrmMapReader
-
- 既知のサブインタフェースのリスト:
Orm,OrmConnection,OrmConnectionCommon,OrmTransaction,Sorm,TypedOrm<T>,TypedOrmConnection<T>,TypedOrmTransaction<T>
public interface OrmMapReaderA interface for getting result of query asMap.- 作成者:
- nkjm
-
-
メソッドの概要
すべてのメソッド インスタンス・メソッド abstractメソッド 修飾子とタイプ メソッド 説明 ResultSetTraverser<List<Map<String,Object>>>getResultSetToMapTraverser()Gets function which traverses and maps the all the rows in the given resultSet to an object list.RowMapper<Map<String,Object>>getRowToMapMapper()Gets a function which maps one row in the resultSet to an object.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.Map<String,Object>readMapFirst(ParameterizedSql sql)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 parameterized SQL andList<Map<String,Object>>readMapList(ParameterizedSql sql)Map<String,Object>readMapOne(String sql, Object... parameters)Reads a first row from the database by mapping the results of the SQL query into an instance ofMap.Map<String,Object>readMapOne(ParameterizedSql sql)
-
-
-
メソッドの詳細
-
getRowToMapMapper
RowMapper<Map<String,Object>> 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
Map<String,Object> readMapFirst(ParameterizedSql sql)
- パラメータ:
sql-- 戻り値:
-
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
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
List<Map<String,Object>> readMapList(ParameterizedSql sql)
- パラメータ:
sql-- 戻り値:
-
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 parameterized SQL andTypes 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
Map<String,Object> readMapOne(ParameterizedSql sql)
- パラメータ:
sql-- 戻り値:
-
readMapOne
Map<String,Object> readMapOne(String sql, Object... parameters)
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,SormExceptionis thrown.- パラメータ:
sql- with ordered parameter. The other type parameters (e.g. named parameter, list parameter) could not be used.parameters- are ordered parameter.
-
-