@@ -137,7 +137,8 @@ public interface JdbcOperations {
137
137
* {@code null} as argument array.
138
138
* @param sql SQL query to execute
139
139
* @param rowMapper object that will map one object per row
140
- * @return the single mapped object
140
+ * @return the single mapped object (may be {@code null} if the given
141
+ * {@link RowMapper} returned {@code} null)
141
142
* @throws IncorrectResultSizeDataAccessException if the query does not
142
143
* return exactly one row
143
144
* @throws DataAccessException if there is any problem executing the query
@@ -359,6 +360,7 @@ public interface JdbcOperations {
359
360
* only the argument value but also the SQL type and optionally the scale
360
361
* @return an arbitrary result object, as returned by the ResultSetExtractor
361
362
* @throws DataAccessException if the query fails
363
+ * @since 3.0.1
362
364
*/
363
365
<T > T query (String sql , ResultSetExtractor <T > rse , Object ... args ) throws DataAccessException ;
364
366
@@ -428,6 +430,7 @@ public interface JdbcOperations {
428
430
* may also contain {@link SqlParameterValue} objects which indicate not
429
431
* only the argument value but also the SQL type and optionally the scale
430
432
* @throws DataAccessException if the query fails
433
+ * @since 3.0.1
431
434
*/
432
435
void query (String sql , RowCallbackHandler rch , Object ... args ) throws DataAccessException ;
433
436
@@ -501,6 +504,7 @@ public interface JdbcOperations {
501
504
* only the argument value but also the SQL type and optionally the scale
502
505
* @return the result List, containing mapped objects
503
506
* @throws DataAccessException if the query fails
507
+ * @since 3.0.1
504
508
*/
505
509
<T > List <T > query (String sql , RowMapper <T > rowMapper , Object ... args ) throws DataAccessException ;
506
510
@@ -514,7 +518,8 @@ public interface JdbcOperations {
514
518
* @param argTypes SQL types of the arguments
515
519
* (constants from {@code java.sql.Types})
516
520
* @param rowMapper object that will map one object per row
517
- * @return the single mapped object
521
+ * @return the single mapped object (may be {@code null} if the given
522
+ * {@link RowMapper} returned {@code} null)
518
523
* @throws IncorrectResultSizeDataAccessException if the query does not
519
524
* return exactly one row
520
525
* @throws DataAccessException if the query fails
@@ -532,7 +537,8 @@ <T> T queryForObject(String sql, Object[] args, int[] argTypes, RowMapper<T> row
532
537
* may also contain {@link SqlParameterValue} objects which indicate not
533
538
* only the argument value but also the SQL type and optionally the scale
534
539
* @param rowMapper object that will map one object per row
535
- * @return the single mapped object
540
+ * @return the single mapped object (may be {@code null} if the given
541
+ * {@link RowMapper} returned {@code} null)
536
542
* @throws IncorrectResultSizeDataAccessException if the query does not
537
543
* return exactly one row
538
544
* @throws DataAccessException if the query fails
@@ -549,10 +555,12 @@ <T> T queryForObject(String sql, Object[] args, int[] argTypes, RowMapper<T> row
549
555
* (leaving it to the PreparedStatement to guess the corresponding SQL type);
550
556
* may also contain {@link SqlParameterValue} objects which indicate not
551
557
* only the argument value but also the SQL type and optionally the scale
552
- * @return the single mapped object
558
+ * @return the single mapped object (may be {@code null} if the given
559
+ * {@link RowMapper} returned {@code} null)
553
560
* @throws IncorrectResultSizeDataAccessException if the query does not
554
561
* return exactly one row
555
562
* @throws DataAccessException if the query fails
563
+ * @since 3.0.1
556
564
*/
557
565
<T > T queryForObject (String sql , RowMapper <T > rowMapper , Object ... args ) throws DataAccessException ;
558
566
@@ -610,6 +618,7 @@ <T> T queryForObject(String sql, Object[] args, int[] argTypes, Class<T> require
610
618
* @throws IncorrectResultSizeDataAccessException if the query does not return
611
619
* exactly one row, or does not return exactly one column in that row
612
620
* @throws DataAccessException if the query fails
621
+ * @since 3.0.1
613
622
* @see #queryForObject(String, Class)
614
623
*/
615
624
<T > T queryForObject (String sql , Class <T > requiredType , Object ... args ) throws DataAccessException ;
@@ -709,6 +718,7 @@ <T>List<T> queryForList(String sql, Object[] args, int[] argTypes, Class<T> elem
709
718
* only the argument value but also the SQL type and optionally the scale
710
719
* @return a List of objects that match the specified element type
711
720
* @throws DataAccessException if the query fails
721
+ * @since 3.0.1
712
722
* @see #queryForList(String, Class)
713
723
* @see SingleColumnRowMapper
714
724
*/
0 commit comments