Package org.springframework.jdbc.core

Examples of org.springframework.jdbc.core.ColumnMapRowMapper


  public Map<String, Object> queryForMap(String sql, SqlParameterSource paramSource) throws DataAccessException {
    return queryForObject(sql, paramSource, new ColumnMapRowMapper());
  }

  public Map<String, Object> queryForMap(String sql, Map<String, ?> paramMap) throws DataAccessException {
    return queryForObject(sql, paramMap, new ColumnMapRowMapper());
  }
View Full Code Here


  }

  public List<Map<String, Object>> queryForList(String sql, SqlParameterSource paramSource)
      throws DataAccessException {

    return query(sql, paramSource, new ColumnMapRowMapper());
  }
View Full Code Here

                }
               
                boolean isResultSet = ps.execute();
               
                if (isResultSet) {
                    RowMapperResultSetExtractor mapper = new RowMapperResultSetExtractor(new ColumnMapRowMapper());
                    List<?> result = (List<?>) mapper.extractData(ps.getResultSet());
                    exchange.getOut().setBody(result);
                    exchange.getIn().setHeader(SqlConstants.SQL_ROW_COUNT, result.size());
                    // preserve headers
                    exchange.getOut().setHeaders(exchange.getIn().getHeaders());
View Full Code Here

            DataSource ds = (DataSource) getApplicationContext().getBean(dsName);
            JdbcTemplate template = new JdbcTemplate(ds);

            // Execute the SQL query and build a results object.  This result will consist of one
            // rowname -> rowvalue map for each row in the result set
            results = template.query(spelSqlQuery, new ColumnMapRowMapper());
            log.debug("found {} results for query {}", results.size(), spelSqlQuery);

            if (cache != null) {
                log.debug("Adding SQL results to cache {}, query: {}, substituted query: {}", cache.getName(),
                        sqlQuery, spelSqlQuery);
View Full Code Here

                    ps.setObject(argNumber++, i.next());
                }
                boolean isResultSet = ps.execute();
                if (isResultSet) {
                    RowMapperResultSetExtractor mapper = new RowMapperResultSetExtractor(
                                                                                         new ColumnMapRowMapper());
                    List<?> result = (List<?>)mapper.extractData(ps.getResultSet());
                    exchange.getOut().setBody(result);
                } else {
                    exchange.getIn().setHeader(UPDATE_COUNT, ps.getUpdateCount());
                }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public CloseableIterator<Map<String, Object>> queryForIter(String sql, SqlParameterSource paramSource) throws DataAccessException {
        return queryForIter(sql, paramSource, new ColumnMapRowMapper());
    }
View Full Code Here

    return queryForObject(sql, paramMap, new SingleColumnRowMapper<T>(requiredType));
  }

  public Map<String, Object> queryForMap(String sql, SqlParameterSource paramSource) throws DataAccessException {
    return queryForObject(sql, paramSource, new ColumnMapRowMapper());
  }
View Full Code Here

  public Map<String, Object> queryForMap(String sql, SqlParameterSource paramSource) throws DataAccessException {
    return queryForObject(sql, paramSource, new ColumnMapRowMapper());
  }

  public Map<String, Object> queryForMap(String sql, Map<String, ?> paramMap) throws DataAccessException {
    return queryForObject(sql, paramMap, new ColumnMapRowMapper());
  }
View Full Code Here

  }

  public List<Map<String, Object>> queryForList(String sql, SqlParameterSource paramSource)
      throws DataAccessException {

    return query(sql, paramSource, new ColumnMapRowMapper());
  }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public CloseableIterator<Map<String, Object>> queryForIter(String sql, SqlParameterSource paramSource) throws DataAccessException {
        return queryForIter(sql, paramSource, new ColumnMapRowMapper());
    }
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.core.ColumnMapRowMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.