Search in sources :

Example 6 with ColumnMapRowMapper

use of org.springframework.jdbc.core.ColumnMapRowMapper in project camel by apache.

the class DrillEndpoint method queryForList.

public List<?> queryForList(ResultSet rs) throws SQLException {
    ColumnMapRowMapper rowMapper = new ColumnMapRowMapper();
    RowMapperResultSetExtractor<Map<String, Object>> mapper = new RowMapperResultSetExtractor<Map<String, Object>>(rowMapper);
    List<Map<String, Object>> data = mapper.extractData(rs);
    return data;
}
Also used : ColumnMapRowMapper(org.springframework.jdbc.core.ColumnMapRowMapper) RowMapperResultSetExtractor(org.springframework.jdbc.core.RowMapperResultSetExtractor) Map(java.util.Map)

Aggregations

ColumnMapRowMapper (org.springframework.jdbc.core.ColumnMapRowMapper)6 Map (java.util.Map)4 BeanPropertyRowMapper (org.springframework.jdbc.core.BeanPropertyRowMapper)3 RowMapper (org.springframework.jdbc.core.RowMapper)3 RowMapperResultSetExtractor (org.springframework.jdbc.core.RowMapperResultSetExtractor)3 SQLDataException (java.sql.SQLDataException)1 HashMap (java.util.HashMap)1 PortletPreferences (javax.portlet.PortletPreferences)1 DataSource (javax.sql.DataSource)1 Cache (net.sf.ehcache.Cache)1 Element (net.sf.ehcache.Element)1 DataAccessException (org.springframework.dao.DataAccessException)1 JdbcTemplate (org.springframework.jdbc.core.JdbcTemplate)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ModelAndView (org.springframework.web.portlet.ModelAndView)1 ModelAndView (org.springframework.web.servlet.ModelAndView)1