1 16 17 package org.springframework.jdbc.core; 18 19 import java.util.List ; 20 import java.util.Map ; 21 22 import org.springframework.dao.DataAccessException; 23 import org.springframework.dao.IncorrectResultSizeDataAccessException; 24 import org.springframework.jdbc.support.KeyHolder; 25 import org.springframework.jdbc.support.rowset.SqlRowSet; 26 27 43 public interface JdbcOperations { 44 45 49 61 Object execute(ConnectionCallback action) throws DataAccessException; 62 63 64 68 80 Object execute(StatementCallback action) throws DataAccessException; 81 82 87 void execute(String sql) throws DataAccessException; 88 89 101 Object query(String sql, ResultSetExtractor rse) throws DataAccessException; 102 103 114 void query(String sql, RowCallbackHandler rch) throws DataAccessException; 115 116 128 List query(String sql, RowMapper rowMapper) throws DataAccessException; 129 130 144 Object queryForObject(String sql, RowMapper rowMapper) throws DataAccessException; 145 146 162 Object queryForObject(String sql, Class requiredType) throws DataAccessException; 163 164 180 Map queryForMap(String sql) throws DataAccessException; 181 182 197 long queryForLong(String sql) throws DataAccessException; 198 199 214 int queryForInt(String sql) throws DataAccessException; 215 216 231 List queryForList(String sql, Class elementType) throws DataAccessException; 232 233 247 List queryForList(String sql) throws DataAccessException; 248 249 268 SqlRowSet queryForRowSet(String sql) throws DataAccessException; 269 270 276 int update(String sql) throws DataAccessException; 277 278 286 int[] batchUpdate(String [] sql) throws DataAccessException; 287 288 289 293 306 Object execute(PreparedStatementCreator psc, PreparedStatementCallback action) 307 throws DataAccessException; 308 309 322 Object execute(String sql, PreparedStatementCallback action) throws DataAccessException; 323 324 335 Object query(PreparedStatementCreator psc, ResultSetExtractor rse) throws DataAccessException; 336 337 349 Object query(String sql, PreparedStatementSetter pss, ResultSetExtractor rse) 350 throws DataAccessException; 351 352 365 Object query(String sql, Object [] args, int[] argTypes, ResultSetExtractor rse) 366 throws DataAccessException; 367 368 379 Object query(String sql, Object [] args, ResultSetExtractor rse) throws DataAccessException; 380 381 391 void query(PreparedStatementCreator psc, RowCallbackHandler rch) throws DataAccessException; 392 393 406 void query(String sql, PreparedStatementSetter pss, RowCallbackHandler rch) 407 throws DataAccessException; 408 409 421 void query(String sql, Object [] args, int[] argTypes, RowCallbackHandler rch) 422 throws DataAccessException; 423 424 434 void query(String sql, Object [] args, RowCallbackHandler rch) throws DataAccessException; 435 436 447 List query(PreparedStatementCreator psc, RowMapper rowMapper) throws DataAccessException; 448 449 462 List query(String sql, PreparedStatementSetter pss, RowMapper rowMapper) 463 throws DataAccessException; 464 465 478 List query(String sql, Object [] args, int[] argTypes, RowMapper rowMapper) 479 throws DataAccessException; 480 481 492 List query(String sql, Object [] args, RowMapper rowMapper) throws DataAccessException; 493 494 509 Object queryForObject(String sql, Object [] args, int[] argTypes, RowMapper rowMapper) 510 throws DataAccessException; 511 512 525 Object queryForObject(String sql, Object [] args, RowMapper rowMapper) 526 throws DataAccessException; 527 528 545 Object queryForObject(String sql, Object [] args, int[] argTypes, Class requiredType) 546 throws DataAccessException; 547 548 563 Object queryForObject(String sql, Object [] args, Class requiredType) throws DataAccessException; 564 565 583 Map queryForMap(String sql, Object [] args, int[] argTypes) throws DataAccessException; 584 585 604 Map queryForMap(String sql, Object [] args) throws DataAccessException; 605 606 622 long queryForLong(String sql, Object [] args, int[] argTypes) throws DataAccessException; 623 624 638 long queryForLong(String sql, Object [] args) throws DataAccessException; 639 640 656 int queryForInt(String sql, Object [] args, int[] argTypes) throws DataAccessException; 657 658 672 int queryForInt(String sql, Object [] args) throws DataAccessException; 673 674 691 List queryForList(String sql, Object [] args, int[] argTypes, Class elementType) 692 throws DataAccessException; 693 694 709 List queryForList(String sql, Object [] args, Class elementType) throws DataAccessException; 710 711 728 List queryForList(String sql, Object [] args, int[] argTypes) throws DataAccessException; 729 730 744 List queryForList(String sql, Object [] args) throws DataAccessException; 745 746 767 SqlRowSet queryForRowSet(String sql, Object [] args, int[] argTypes) throws DataAccessException; 768 769 788 SqlRowSet queryForRowSet(String sql, Object [] args) throws DataAccessException; 789 790 800 int update(PreparedStatementCreator psc) throws DataAccessException; 801 802 815 int update(PreparedStatementCreator psc, KeyHolder generatedKeyHolder) throws DataAccessException; 816 817 828 int update(String sql, PreparedStatementSetter pss) throws DataAccessException; 829 830 840 int update(String sql, Object [] args, int[] argTypes) throws DataAccessException; 841 842 850 int update(String sql, Object [] args) throws DataAccessException; 851 852 864 int[] batchUpdate(String sql, BatchPreparedStatementSetter pss) throws DataAccessException; 865 866 867 871 884 Object execute(CallableStatementCreator csc, CallableStatementCallback action) 885 throws DataAccessException; 886 887 900 Object execute(String callString, CallableStatementCallback action) throws DataAccessException; 901 902 910 Map call(CallableStatementCreator csc, List declaredParameters) throws DataAccessException; 911 912 } 913 | Popular Tags |