Skip to content

Commit bca1047

Browse files
marcwrobelsbrannen
authored andcommitted
Fix and improve Javadoc in spring-jdbc
Closes gh-28796
1 parent b30eb68 commit bca1047

28 files changed

+50
-50
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentPreparedStatementSetter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void setValues(PreparedStatement ps) throws SQLException {
5454

5555
/**
5656
* Set the value for prepared statements specified parameter index using the passed in value.
57-
* This method can be overridden by sub-classes if needed.
57+
* This method can be overridden by subclasses if needed.
5858
* @param ps the PreparedStatement
5959
* @param parameterPosition index of the parameter position
6060
* @param argValue the value to set

spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentTypePreparedStatementSetter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void setValues(PreparedStatement ps) throws SQLException {
8787

8888
/**
8989
* Set the value for the prepared statement's specified parameter position using the passed in
90-
* value and type. This method can be overridden by sub-classes if needed.
90+
* value and type. This method can be overridden by subclasses if needed.
9191
* @param ps the PreparedStatement
9292
* @param parameterPosition index of the parameter position
9393
* @param argType the argument type

spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -109,7 +109,7 @@ public void setUpdatableResults(boolean updatableResults) {
109109

110110

111111
/**
112-
* Return a new CallableStatementCreator instance given this parameters.
112+
* Return a new CallableStatementCreator instance given these parameters.
113113
* @param params list of parameters (may be {@code null})
114114
*/
115115
public CallableStatementCreator newCallableStatementCreator(@Nullable Map<String, ?> params) {

spring-jdbc/src/main/java/org/springframework/jdbc/core/ColumnMapRowMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected String getColumnKey(String columnName) {
8484
* Retrieve a JDBC object value for the specified column.
8585
* <p>The default implementation uses the {@code getObject} method.
8686
* Additionally, this implementation includes a "hack" to get around Oracle
87-
* returning a non standard object for their TIMESTAMP data type.
87+
* returning a non-standard object for their TIMESTAMP data type.
8888
* @param rs the ResultSet holding the data
8989
* @param index the column index
9090
* @return the Object returned

spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public interface JdbcOperations {
234234
* Each element in the list will be of the form returned by this interface's
235235
* {@code queryForMap} methods.
236236
* @param sql the SQL query to execute
237-
* @return an List that contains a Map per row
237+
* @return a List that contains a Map per row
238238
* @throws DataAccessException if there is any problem executing the query
239239
* @see #queryForList(String, Object...)
240240
*/

spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
111111
private static final String RETURN_UPDATE_COUNT_PREFIX = "#update-count-";
112112

113113

114-
/** If this variable is false, we will throw exceptions on SQL warnings. */
114+
/** If this variable is {@code false}, we will throw exceptions on SQL warnings. */
115115
private boolean ignoreWarnings = true;
116116

117117
/**
@@ -149,7 +149,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations {
149149

150150
/**
151151
* If this variable is set to true then execution of a CallableStatement will return
152-
* the results in a Map that uses case insensitive names for the parameters.
152+
* the results in a Map that uses case-insensitive names for the parameters.
153153
*/
154154
private boolean resultsMapCaseInsensitive = false;
155155

@@ -187,7 +187,7 @@ public JdbcTemplate(DataSource dataSource, boolean lazyInit) {
187187

188188

189189
/**
190-
* Set whether or not we want to ignore SQLWarnings.
190+
* Set whether we want to ignore SQLWarnings.
191191
* <p>Default is "true", swallowing and logging all warnings. Switch this flag
192192
* to "false" to make the JdbcTemplate throw an SQLWarningException instead.
193193
* @see java.sql.SQLWarning
@@ -199,7 +199,7 @@ public void setIgnoreWarnings(boolean ignoreWarnings) {
199199
}
200200

201201
/**
202-
* Return whether or not we ignore SQLWarnings.
202+
* Return whether we ignore SQLWarnings.
203203
*/
204204
public boolean isIgnoreWarnings() {
205205
return this.ignoreWarnings;
@@ -303,15 +303,15 @@ public boolean isSkipUndeclaredResults() {
303303

304304
/**
305305
* Set whether execution of a CallableStatement will return the results in a Map
306-
* that uses case insensitive names for the parameters.
306+
* that uses case-insensitive names for the parameters.
307307
*/
308308
public void setResultsMapCaseInsensitive(boolean resultsMapCaseInsensitive) {
309309
this.resultsMapCaseInsensitive = resultsMapCaseInsensitive;
310310
}
311311

312312
/**
313313
* Return whether execution of a CallableStatement will return the results in a Map
314-
* that uses case insensitive names for the parameters.
314+
* that uses case-insensitive names for the parameters.
315315
*/
316316
public boolean isResultsMapCaseInsensitive() {
317317
return this.resultsMapCaseInsensitive;

spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ else if (meta.getParameterType() == DatabaseMetaData.procedureColumnInOut) {
478478
*/
479479
public Map<String, Object> matchInParameterValuesWithCallParameters(SqlParameterSource parameterSource) {
480480
// For parameter source lookups we need to provide case-insensitive lookup support
481-
// since the database meta-data is not necessarily providing case sensitive parameter names.
481+
// since the database meta-data is not necessarily providing case-sensitive parameter names.
482482
Map<String, String> caseInsensitiveParameterNames =
483483
SqlParameterSourceUtils.extractCaseInsensitiveParameterNames(parameterSource);
484484

spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcTemplate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ protected PreparedStatementCreator getPreparedStatementCreator(String sql, SqlPa
406406
* @param sql the SQL statement to execute
407407
* @param paramSource container of arguments to bind
408408
* @param customizer callback for setting further properties on the
409-
* {@link PreparedStatementCreatorFactory} in use), applied before the
409+
* {@link PreparedStatementCreatorFactory} in use, applied before the
410410
* actual {@code newPreparedStatementCreator} call
411411
* @return the corresponding {@link PreparedStatementCreator}
412412
* @since 5.0.5

spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/ParsedSql.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void addNamedParameter(String parameterName, int startIndex, int endIndex) {
6969
}
7070

7171
/**
72-
* Return all of the parameters (bind variables) in the parsed SQL statement.
72+
* Return all the parameters (bind variables) in the parsed SQL statement.
7373
* Repeated occurrences of the same parameter name are included here.
7474
*/
7575
List<String> getParameterNames() {
@@ -81,7 +81,7 @@ List<String> getParameterNames() {
8181
* @param parameterPosition the position of the parameter
8282
* (as index in the parameter names List)
8383
* @return the start index and end index, combined into
84-
* a int array of length 2
84+
* an int array of length 2
8585
*/
8686
int[] getParameterIndexes(int parameterPosition) {
8787
return this.parameterIndexes.get(parameterPosition);
@@ -104,29 +104,29 @@ int getNamedParameterCount() {
104104
}
105105

106106
/**
107-
* Set the count of all of the unnamed parameters in the SQL statement.
107+
* Set the count of all the unnamed parameters in the SQL statement.
108108
*/
109109
void setUnnamedParameterCount(int unnamedParameterCount) {
110110
this.unnamedParameterCount = unnamedParameterCount;
111111
}
112112

113113
/**
114-
* Return the count of all of the unnamed parameters in the SQL statement.
114+
* Return the count of all the unnamed parameters in the SQL statement.
115115
*/
116116
int getUnnamedParameterCount() {
117117
return this.unnamedParameterCount;
118118
}
119119

120120
/**
121-
* Set the total count of all of the parameters in the SQL statement.
121+
* Set the total count of all the parameters in the SQL statement.
122122
* Repeated occurrences of the same parameter name do count here.
123123
*/
124124
void setTotalParameterCount(int totalParameterCount) {
125125
this.totalParameterCount = totalParameterCount;
126126
}
127127

128128
/**
129-
* Return the total count of all of the parameters in the SQL statement.
129+
* Return the total count of all the parameters in the SQL statement.
130130
* Repeated occurrences of the same parameter name do count here.
131131
*/
132132
int getTotalParameterCount() {

spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/SqlParameterSourceUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public static Object getTypedValue(SqlParameterSource source, String parameterNa
106106
}
107107

108108
/**
109-
* Create a Map of case insensitive parameter names together with the original name.
109+
* Create a Map of case-insensitive parameter names together with the original name.
110110
* @param parameterSource the source of parameter names
111-
* @return the Map that can be used for case insensitive matching of parameter names
111+
* @return the Map that can be used for case-insensitive matching of parameter names
112112
*/
113113
public static Map<String, String> extractCaseInsensitiveParameterNames(SqlParameterSource parameterSource) {
114114
Map<String, String> caseInsensitiveParameterNames = new HashMap<>();

0 commit comments

Comments
 (0)