1
1
/*
2
- * Copyright 2002-2013 the original author or authors.
2
+ * Copyright 2002-2014 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -311,8 +311,7 @@ public interface JdbcOperations {
311
311
* @return a result object returned by the action, or {@code null}
312
312
* @throws DataAccessException if there is any problem
313
313
*/
314
- <T > T execute (PreparedStatementCreator psc , PreparedStatementCallback <T > action )
315
- throws DataAccessException ;
314
+ <T > T execute (PreparedStatementCreator psc , PreparedStatementCallback <T > action ) throws DataAccessException ;
316
315
317
316
/**
318
317
* Execute a JDBC data access operation, implemented as callback action
@@ -354,8 +353,7 @@ <T> T execute(PreparedStatementCreator psc, PreparedStatementCallback<T> action)
354
353
* @return an arbitrary result object, as returned by the ResultSetExtractor
355
354
* @throws DataAccessException if there is any problem
356
355
*/
357
- <T > T query (String sql , PreparedStatementSetter pss , ResultSetExtractor <T > rse )
358
- throws DataAccessException ;
356
+ <T > T query (String sql , PreparedStatementSetter pss , ResultSetExtractor <T > rse ) throws DataAccessException ;
359
357
360
358
/**
361
359
* Query given SQL to create a prepared statement from SQL and a list
@@ -370,8 +368,7 @@ <T> T query(String sql, PreparedStatementSetter pss, ResultSetExtractor<T> rse)
370
368
* @throws DataAccessException if the query fails
371
369
* @see java.sql.Types
372
370
*/
373
- <T > T query (String sql , Object [] args , int [] argTypes , ResultSetExtractor <T > rse )
374
- throws DataAccessException ;
371
+ <T > T query (String sql , Object [] args , int [] argTypes , ResultSetExtractor <T > rse ) throws DataAccessException ;
375
372
376
373
/**
377
374
* Query given SQL to create a prepared statement from SQL and a list
@@ -428,8 +425,7 @@ <T> T query(String sql, Object[] args, int[] argTypes, ResultSetExtractor<T> rse
428
425
* @param rch object that will extract results, one row at a time
429
426
* @throws DataAccessException if the query fails
430
427
*/
431
- void query (String sql , PreparedStatementSetter pss , RowCallbackHandler rch )
432
- throws DataAccessException ;
428
+ void query (String sql , PreparedStatementSetter pss , RowCallbackHandler rch ) throws DataAccessException ;
433
429
434
430
/**
435
431
* Query given SQL to create a prepared statement from SQL and a list of
@@ -443,8 +439,7 @@ void query(String sql, PreparedStatementSetter pss, RowCallbackHandler rch)
443
439
* @throws DataAccessException if the query fails
444
440
* @see java.sql.Types
445
441
*/
446
- void query (String sql , Object [] args , int [] argTypes , RowCallbackHandler rch )
447
- throws DataAccessException ;
442
+ void query (String sql , Object [] args , int [] argTypes , RowCallbackHandler rch ) throws DataAccessException ;
448
443
449
444
/**
450
445
* Query given SQL to create a prepared statement from SQL and a list of
@@ -500,8 +495,7 @@ void query(String sql, Object[] args, int[] argTypes, RowCallbackHandler rch)
500
495
* @return the result List, containing mapped objects
501
496
* @throws DataAccessException if the query fails
502
497
*/
503
- <T > List <T > query (String sql , PreparedStatementSetter pss , RowMapper <T > rowMapper )
504
- throws DataAccessException ;
498
+ <T > List <T > query (String sql , PreparedStatementSetter pss , RowMapper <T > rowMapper ) throws DataAccessException ;
505
499
506
500
/**
507
501
* Query given SQL to create a prepared statement from SQL and a list
@@ -516,8 +510,7 @@ <T> List<T> query(String sql, PreparedStatementSetter pss, RowMapper<T> rowMappe
516
510
* @throws DataAccessException if the query fails
517
511
* @see java.sql.Types
518
512
*/
519
- <T > List <T > query (String sql , Object [] args , int [] argTypes , RowMapper <T > rowMapper )
520
- throws DataAccessException ;
513
+ <T > List <T > query (String sql , Object [] args , int [] argTypes , RowMapper <T > rowMapper ) throws DataAccessException ;
521
514
522
515
/**
523
516
* Query given SQL to create a prepared statement from SQL and a list
@@ -582,8 +575,7 @@ <T> T queryForObject(String sql, Object[] args, int[] argTypes, RowMapper<T> row
582
575
* return exactly one row
583
576
* @throws DataAccessException if the query fails
584
577
*/
585
- <T > T queryForObject (String sql , Object [] args , RowMapper <T > rowMapper )
586
- throws DataAccessException ;
578
+ <T > T queryForObject (String sql , Object [] args , RowMapper <T > rowMapper ) throws DataAccessException ;
587
579
588
580
/**
589
581
* Query given SQL to create a prepared statement from SQL and a list
@@ -600,8 +592,7 @@ <T> T queryForObject(String sql, Object[] args, RowMapper<T> rowMapper)
600
592
* return exactly one row
601
593
* @throws DataAccessException if the query fails
602
594
*/
603
- <T > T queryForObject (String sql , RowMapper <T > rowMapper , Object ... args )
604
- throws DataAccessException ;
595
+ <T > T queryForObject (String sql , RowMapper <T > rowMapper , Object ... args ) throws DataAccessException ;
605
596
606
597
/**
607
598
* Query given SQL to create a prepared statement from SQL and a
@@ -1009,7 +1000,7 @@ <T>List<T> queryForList(String sql, Object[] args, int[] argTypes, Class<T> elem
1009
1000
* @param batchArgs the List of Object arrays containing the batch of arguments for the query
1010
1001
* @return an array containing the numbers of rows affected by each update in the batch
1011
1002
*/
1012
- public int [] batchUpdate (String sql , List <Object []> batchArgs );
1003
+ public int [] batchUpdate (String sql , List <Object []> batchArgs ) throws DataAccessException ;
1013
1004
1014
1005
/**
1015
1006
* Execute a batch using the supplied SQL statement with the batch of supplied arguments.
@@ -1019,7 +1010,7 @@ <T>List<T> queryForList(String sql, Object[] args, int[] argTypes, Class<T> elem
1019
1010
* (constants from {@code java.sql.Types})
1020
1011
* @return an array containing the numbers of rows affected by each update in the batch
1021
1012
*/
1022
- public int [] batchUpdate (String sql , List <Object []> batchArgs , int [] argTypes );
1013
+ public int [] batchUpdate (String sql , List <Object []> batchArgs , int [] argTypes ) throws DataAccessException ;
1023
1014
1024
1015
/**
1025
1016
* Execute multiple batches using the supplied SQL statement with the collect of supplied arguments.
@@ -1032,7 +1023,9 @@ <T>List<T> queryForList(String sql, Object[] args, int[] argTypes, Class<T> elem
1032
1023
* @return an array containing for each batch another array containing the numbers of rows affected
1033
1024
* by each update in the batch
1034
1025
*/
1035
- public <T > int [][] batchUpdate (String sql , Collection <T > batchArgs , int batchSize , ParameterizedPreparedStatementSetter <T > pss );
1026
+ public <T > int [][] batchUpdate (String sql , Collection <T > batchArgs , int batchSize ,
1027
+ ParameterizedPreparedStatementSetter <T > pss ) throws DataAccessException ;
1028
+
1036
1029
1037
1030
//-------------------------------------------------------------------------
1038
1031
// Methods dealing with callable statements
@@ -1051,8 +1044,7 @@ <T>List<T> queryForList(String sql, Object[] args, int[] argTypes, Class<T> elem
1051
1044
* @return a result object returned by the action, or {@code null}
1052
1045
* @throws DataAccessException if there is any problem
1053
1046
*/
1054
- <T > T execute (CallableStatementCreator csc , CallableStatementCallback <T > action )
1055
- throws DataAccessException ;
1047
+ <T > T execute (CallableStatementCreator csc , CallableStatementCallback <T > action ) throws DataAccessException ;
1056
1048
1057
1049
/**
1058
1050
* Execute a JDBC data access operation, implemented as callback action
0 commit comments