1 16 17 package org.springframework.jdbc.core.namedparam; 18 19 import java.util.List ; 20 import java.util.Map ; 21 22 import org.springframework.dao.DataAccessException; 23 import org.springframework.jdbc.core.JdbcOperations; 24 import org.springframework.jdbc.core.RowCallbackHandler; 25 import org.springframework.jdbc.core.RowMapper; 26 import org.springframework.jdbc.support.KeyHolder; 27 import org.springframework.jdbc.support.rowset.SqlRowSet; 28 29 44 public interface NamedParameterJdbcOperations { 45 46 50 JdbcOperations getJdbcOperations(); 51 52 53 57 66 public void query(String sql, SqlParameterSource paramSource, RowCallbackHandler rch) 67 throws DataAccessException; 68 69 79 void query(String sql, Map paramMap, RowCallbackHandler rch) throws DataAccessException; 80 81 91 List query(String sql, SqlParameterSource paramSource, RowMapper rowMapper) 92 throws DataAccessException; 93 94 105 List query(String sql, Map paramMap, RowMapper rowMapper) throws DataAccessException; 106 107 120 Object queryForObject(String sql, SqlParameterSource paramSource, RowMapper rowMapper) 121 throws DataAccessException; 122 123 137 Object queryForObject(String sql, Map paramMap, RowMapper rowMapper) throws DataAccessException; 138 139 154 Object queryForObject(String sql, SqlParameterSource paramSource, Class requiredType) 155 throws DataAccessException; 156 157 173 Object queryForObject(String sql, Map paramMap, Class requiredType) throws DataAccessException; 174 175 190 Map queryForMap(String sql, SqlParameterSource paramSource) throws DataAccessException; 191 192 211 Map queryForMap(String sql, Map paramMap) throws DataAccessException; 212 213 227 long queryForLong(String sql, SqlParameterSource paramSource) throws DataAccessException; 228 229 244 long queryForLong(String sql, Map paramMap) throws DataAccessException; 245 246 259 int queryForInt(String sql, SqlParameterSource paramSource) throws DataAccessException; 260 261 275 int queryForInt(String sql, Map paramMap) throws DataAccessException; 276 277 291 List queryForList(String sql, SqlParameterSource paramSource, Class elementType) 292 throws DataAccessException; 293 294 309 List queryForList(String sql, Map paramMap, Class elementType) throws DataAccessException; 310 311 324 List queryForList(String sql, SqlParameterSource paramSource) throws DataAccessException; 325 326 340 List queryForList(String sql, Map paramMap) throws DataAccessException; 341 342 360 SqlRowSet queryForRowSet(String sql, SqlParameterSource paramSource) throws DataAccessException; 361 362 381 SqlRowSet queryForRowSet(String sql, Map paramMap) throws DataAccessException; 382 383 384 388 395 int update(String sql, SqlParameterSource paramSource) throws DataAccessException; 396 397 405 int update(String sql, Map paramMap) throws DataAccessException; 406 407 418 int update(String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder) 419 throws DataAccessException; 420 421 433 int update( 434 String sql, SqlParameterSource paramSource, KeyHolder generatedKeyHolder, String [] keyColumnNames) 435 throws DataAccessException; 436 437 } 438 | Popular Tags |