本文整理了Java中org.springframework.jdbc.core.JdbcTemplate.getColumnMapRowMapper()
方法的一些代码示例,展示了JdbcTemplate.getColumnMapRowMapper()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JdbcTemplate.getColumnMapRowMapper()
方法的具体详情如下:
包路径:org.springframework.jdbc.core.JdbcTemplate
类名称:JdbcTemplate
方法名:getColumnMapRowMapper
[英]Create a new RowMapper for reading columns as key-value pairs.
[中]创建新的行映射器,以将列作为键值对读取。
代码示例来源:origin: spring-projects/spring-framework
@Override
public List<Map<String, Object>> queryForList(String sql) throws DataAccessException {
return query(sql, getColumnMapRowMapper());
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public List<Map<String, Object>> queryForList(String sql, Object[] args, int[] argTypes) throws DataAccessException {
return query(sql, args, argTypes, getColumnMapRowMapper());
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public List<Map<String, Object>> queryForList(String sql, @Nullable Object... args) throws DataAccessException {
return query(sql, args, getColumnMapRowMapper());
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public Map<String, Object> queryForMap(String sql, Object[] args, int[] argTypes) throws DataAccessException {
return result(queryForObject(sql, args, argTypes, getColumnMapRowMapper()));
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public Map<String, Object> queryForMap(String sql, @Nullable Object... args) throws DataAccessException {
return result(queryForObject(sql, args, getColumnMapRowMapper()));
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public Map<String, Object> queryForMap(String sql) throws DataAccessException {
return result(queryForObject(sql, getColumnMapRowMapper()));
}
代码示例来源:origin: spring-projects/spring-framework
@Override
public int update(final PreparedStatementCreator psc, final KeyHolder generatedKeyHolder)
throws DataAccessException {
Assert.notNull(generatedKeyHolder, "KeyHolder must not be null");
logger.debug("Executing SQL update and returning generated keys");
return updateCount(execute(psc, ps -> {
int rows = ps.executeUpdate();
List<Map<String, Object>> generatedKeys = generatedKeyHolder.getKeyList();
generatedKeys.clear();
ResultSet keys = ps.getGeneratedKeys();
if (keys != null) {
try {
RowMapperResultSetExtractor<Map<String, Object>> rse =
new RowMapperResultSetExtractor<>(getColumnMapRowMapper(), 1);
generatedKeys.addAll(result(rse.extractData(keys)));
}
finally {
JdbcUtils.closeResultSet(keys);
}
}
if (logger.isTraceEnabled()) {
logger.trace("SQL update affected " + rows + " rows and returned " + generatedKeys.size() + " keys");
}
return rows;
}));
}
代码示例来源:origin: spring-projects/spring-framework
if (!this.skipUndeclaredResults) {
String rsName = RETURN_RESULT_SET_PREFIX + (rsIndex + 1);
SqlReturnResultSet undeclaredRsParam = new SqlReturnResultSet(rsName, getColumnMapRowMapper());
if (logger.isTraceEnabled()) {
logger.trace("Added default SqlReturnResultSet parameter named '" + rsName + "'");
代码示例来源:origin: spring-projects/spring-framework
SqlReturnResultSet rsParam = new SqlReturnResultSet(rsName, getColumnMapRowMapper());
returnedResults.putAll(processResultSet((ResultSet) out, rsParam));
if (logger.isTraceEnabled()) {
代码示例来源:origin: infiniteautomation/ma-core-public
RowMapper<Map<String, Object>> getColumnMapRowMapperImpl() {
return super.getColumnMapRowMapper();
}
代码示例来源:origin: org.springframework/org.springframework.jdbc
public Map<String, Object> queryForMap(String sql, Object[] args, int[] argTypes) throws DataAccessException {
return queryForObject(sql, args, argTypes, getColumnMapRowMapper());
}
代码示例来源:origin: org.springframework/org.springframework.jdbc
public List<Map<String, Object>> queryForList(String sql, Object... args) throws DataAccessException {
return query(sql, args, getColumnMapRowMapper());
}
代码示例来源:origin: org.springframework/org.springframework.jdbc
public Map<String, Object> queryForMap(String sql) throws DataAccessException {
return queryForObject(sql, getColumnMapRowMapper());
}
代码示例来源:origin: org.springframework/org.springframework.jdbc
public List<Map<String, Object>> queryForList(String sql, Object[] args, int[] argTypes) throws DataAccessException {
return query(sql, args, argTypes, getColumnMapRowMapper());
}
代码示例来源:origin: org.springframework/org.springframework.jdbc
public List<Map<String, Object>> queryForList(String sql) throws DataAccessException {
return query(sql, getColumnMapRowMapper());
}
代码示例来源:origin: org.springframework/org.springframework.jdbc
public Map<String, Object> queryForMap(String sql, Object... args) throws DataAccessException {
return queryForObject(sql, args, getColumnMapRowMapper());
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public List<Map<String, Object>> queryForList(String sql, Object[] args, int[] argTypes) throws DataAccessException {
return query(sql, args, argTypes, getColumnMapRowMapper());
}
代码示例来源:origin: org.springframework/org.springframework.jdbc
public Integer doInPreparedStatement(PreparedStatement ps) throws SQLException {
int rows = ps.executeUpdate();
List<Map<String, Object>> generatedKeys = generatedKeyHolder.getKeyList();
generatedKeys.clear();
ResultSet keys = ps.getGeneratedKeys();
if (keys != null) {
try {
RowMapperResultSetExtractor<Map<String, Object>> rse =
new RowMapperResultSetExtractor<Map<String, Object>>(getColumnMapRowMapper(), 1);
generatedKeys.addAll(rse.extractData(keys));
}
finally {
JdbcUtils.closeResultSet(keys);
}
}
if (logger.isDebugEnabled()) {
logger.debug("SQL update affected " + rows + " rows and returned " + generatedKeys.size() + " keys");
}
return rows;
}
});
代码示例来源:origin: apache/servicemix-bundles
return query(sql, getColumnMapRowMapper());
内容来源于网络,如有侵权,请联系作者删除!