Browse Source

Fix and improve Javadoc in spring-r2dbc

See gh-28796
pull/28850/head
Marc Wrobel 2 years ago committed by Sam Brannen
parent
commit
cfb39acc97
  1. 4
      spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/R2dbcTransactionManager.java
  2. 8
      spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/init/ScriptUtils.java
  3. 4
      spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ConnectionAccessor.java
  4. 2
      spring-r2dbc/src/main/java/org/springframework/r2dbc/core/Parameter.java
  5. 12
      spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ParsedSql.java
  6. 2
      spring-r2dbc/src/main/java/org/springframework/r2dbc/core/StatementFilterFunction.java
  7. 2
      spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/AnonymousBindMarkers.java
  8. 2
      spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/Bindings.java
  9. 2
      spring-r2dbc/src/test/java/org/springframework/r2dbc/core/DefaultDatabaseClientUnitTests.java

4
spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/R2dbcTransactionManager.java

@ -107,7 +107,7 @@ public class R2dbcTransactionManager extends AbstractReactiveTransactionManager @@ -107,7 +107,7 @@ public class R2dbcTransactionManager extends AbstractReactiveTransactionManager
/**
* Set the R2DBC {@link ConnectionFactory} that this instance should manage transactions for.
* <p>This will typically be a locally defined {@code ConnectionFactory}, for example an connection pool.
* <p>This will typically be a locally defined {@code ConnectionFactory}, for example a connection pool.
* <p><b>The {@code ConnectionFactory} passed in here needs to return independent {@link Connection}s.</b>
* The {@code Connection}s may come from a pool (the typical case), but the {@code ConnectionFactory}
* must not return scoped {@code Connection}s or the like.
@ -138,7 +138,7 @@ public class R2dbcTransactionManager extends AbstractReactiveTransactionManager @@ -138,7 +138,7 @@ public class R2dbcTransactionManager extends AbstractReactiveTransactionManager
/**
* Specify whether to enforce the read-only nature of a transaction (as indicated by
* {@link TransactionDefinition#isReadOnly()} through an explicit statement on the
* {@link TransactionDefinition#isReadOnly()}) through an explicit statement on the
* transactional connection: "SET TRANSACTION READ ONLY" as understood by Oracle,
* MySQL and Postgres.
* <p>The exact treatment, including any SQL statement executed on the connection,

8
spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/init/ScriptUtils.java

@ -166,9 +166,9 @@ public abstract class ScriptUtils { @@ -166,9 +166,9 @@ public abstract class ScriptUtils {
* @param resource the resource (potentially associated with a specific encoding)
* to load the SQL script from
* @param dataBufferFactory the factory to create data buffers with
* @param continueOnError whether or not to continue without throwing an exception
* @param continueOnError whether to continue without throwing an exception
* in the event of an error
* @param ignoreFailedDrops whether or not to continue in the event of specifically
* @param ignoreFailedDrops whether to continue in the event of specifically
* an error on a {@code DROP} statement
* @param commentPrefix the prefix that identifies single-line comments in the
* SQL script (typically "--")
@ -207,9 +207,9 @@ public abstract class ScriptUtils { @@ -207,9 +207,9 @@ public abstract class ScriptUtils {
* @param resource the resource (potentially associated with a specific encoding)
* to load the SQL script from
* @param dataBufferFactory the factory to create data buffers with
* @param continueOnError whether or not to continue without throwing an exception
* @param continueOnError whether to continue without throwing an exception
* in the event of an error
* @param ignoreFailedDrops whether or not to continue in the event of specifically
* @param ignoreFailedDrops whether to continue in the event of specifically
* an error on a {@code DROP} statement
* @param commentPrefixes the prefixes that identify single-line comments in the
* SQL script (typically "--")

4
spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ConnectionAccessor.java

@ -45,7 +45,7 @@ public interface ConnectionAccessor { @@ -45,7 +45,7 @@ public interface ConnectionAccessor {
* Execute a callback {@link Function} within a {@link Connection} scope.
* The function is responsible for creating a {@link Mono}. The connection
* is released after the {@link Mono} terminates (or the subscription
* is cancelled). Connection resources must not be passed outside of the
* is cancelled). Connection resources must not be passed outside the
* {@link Function} closure, otherwise resources may get defunct.
* @param action the callback object that specifies the connection action
* @return the resulting {@link Mono}
@ -56,7 +56,7 @@ public interface ConnectionAccessor { @@ -56,7 +56,7 @@ public interface ConnectionAccessor {
* Execute a callback {@link Function} within a {@link Connection} scope.
* The function is responsible for creating a {@link Flux}. The connection
* is released after the {@link Flux} terminates (or the subscription
* is cancelled). Connection resources must not be passed outside of the
* is cancelled). Connection resources must not be passed outside the
* {@link Function} closure, otherwise resources may get defunct.
* @param action the callback object that specifies the connection action
* @return the resulting {@link Flux}

2
spring-r2dbc/src/main/java/org/springframework/r2dbc/core/Parameter.java

@ -100,7 +100,7 @@ public final class Parameter { @@ -100,7 +100,7 @@ public final class Parameter {
}
/**
* Return whether this {@link Parameter} has a empty.
* Return whether this {@link Parameter} has an empty value.
* @return {@code true} if {@link #getValue()} is {@code null}
*/
public boolean isEmpty() {

12
spring-r2dbc/src/main/java/org/springframework/r2dbc/core/ParsedSql.java

@ -69,7 +69,7 @@ class ParsedSql { @@ -69,7 +69,7 @@ class ParsedSql {
}
/**
* Return all of the parameters (bind variables) in the parsed SQL statement.
* Return all the parameters (bind variables) in the parsed SQL statement.
* Repeated occurrences of the same parameter name are included here.
*/
List<String> getParameterNames() {
@ -81,7 +81,7 @@ class ParsedSql { @@ -81,7 +81,7 @@ class ParsedSql {
* @param parameterPosition the position of the parameter
* (as index in the parameter names List)
* @return the start index and end index, combined into
* a int array of length 2
* an int array of length 2
*/
int[] getParameterIndexes(int parameterPosition) {
return this.parameterIndexes.get(parameterPosition);
@ -104,21 +104,21 @@ class ParsedSql { @@ -104,21 +104,21 @@ class ParsedSql {
}
/**
* Set the count of all of the unnamed parameters in the SQL statement.
* Set the count of all the unnamed parameters in the SQL statement.
*/
void setUnnamedParameterCount(int unnamedParameterCount) {
this.unnamedParameterCount = unnamedParameterCount;
}
/**
* Return the count of all of the unnamed parameters in the SQL statement.
* Return the count of all the unnamed parameters in the SQL statement.
*/
int getUnnamedParameterCount() {
return this.unnamedParameterCount;
}
/**
* Set the total count of all of the parameters in the SQL statement.
* Set the total count of all the parameters in the SQL statement.
* Repeated occurrences of the same parameter name do count here.
*/
void setTotalParameterCount(int totalParameterCount) {
@ -126,7 +126,7 @@ class ParsedSql { @@ -126,7 +126,7 @@ class ParsedSql {
}
/**
* Return the total count of all of the parameters in the SQL statement.
* Return the total count of all the parameters in the SQL statement.
* Repeated occurrences of the same parameter name do count here.
*/
int getTotalParameterCount() {

2
spring-r2dbc/src/main/java/org/springframework/r2dbc/core/StatementFilterFunction.java

@ -48,7 +48,7 @@ public interface StatementFilterFunction { @@ -48,7 +48,7 @@ public interface StatementFilterFunction {
/**
* Apply this filter to the given {@link Statement} and {@link ExecuteFunction}.
* <p>The given {@link ExecuteFunction} represents the next entity in the chain,
* to be invoked via {@link ExecuteFunction#execute(Statement)} invoked} in
* to be invoked via {@link ExecuteFunction#execute(Statement)} in
* order to proceed with the execution, or not invoked to shortcut the chain.
* @param statement the current {@link Statement}
* @param next the next execute function in the chain

2
spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/AnonymousBindMarkers.java

@ -24,7 +24,7 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; @@ -24,7 +24,7 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
* the placeholder. This implementation creates indexed bind markers using
* an anonymous placeholder that correlates with an index.
*
* <p>Note: Anonymous bind markers are problematic because the have to appear
* <p>Note: Anonymous bind markers are problematic because they have to appear
* in generated SQL in the same order they get generated. This might cause
* challenges in the future with complex generate statements. For example those
* containing subselects which limit the freedom of arranging bind markers.

2
spring-r2dbc/src/main/java/org/springframework/r2dbc/core/binding/Bindings.java

@ -167,7 +167,7 @@ public class Bindings implements Iterable<Bindings.Binding> { @@ -167,7 +167,7 @@ public class Bindings implements Iterable<Bindings.Binding> {
/**
* Return whether the binding is empty.
* @return {@code true} if this is is a {@code NULL} binding
* @return {@code true} if this is a {@code NULL} binding
*/
public boolean isNull() {
return !hasValue();

2
spring-r2dbc/src/test/java/org/springframework/r2dbc/core/DefaultDatabaseClientUnitTests.java

@ -428,7 +428,7 @@ class DefaultDatabaseClientUnitTests { @@ -428,7 +428,7 @@ class DefaultDatabaseClientUnitTests {
}
/**
* Mocks a {@link Result} with a single column "name" and a single row if a non null
* Mocks a {@link Result} with a single column "name" and a single row if a non-null
* row is provided.
*/
private MockResult mockSingleColumnResult(@Nullable MockRow.Builder row) {

Loading…
Cancel
Save