diff --git a/src/main/asciidoc/query-by-example.adoc b/src/main/asciidoc/query-by-example.adoc index 5314b380e..068663712 100644 --- a/src/main/asciidoc/query-by-example.adoc +++ b/src/main/asciidoc/query-by-example.adoc @@ -72,7 +72,7 @@ Example example = Example.of(person); <3> <3> Create the `Example`. ==== -Example queries can be executed by using repositories. +You can run the example queries by using repositories. To do so, let your repository interface extend `QueryByExampleExecutor`. The following listing shows an excerpt from the `QueryByExampleExecutor` interface: diff --git a/src/main/asciidoc/repositories.adoc b/src/main/asciidoc/repositories.adoc index 08333c8cc..49355ce1f 100644 --- a/src/main/asciidoc/repositories.adoc +++ b/src/main/asciidoc/repositories.adoc @@ -647,9 +647,9 @@ interface UserRepository extends Repository { } ---- <1> The repository resides in a package (or sub-package) for which we have defined non-null behavior. -<2> Throws an `EmptyResultDataAccessException` when the query executed does not produce a result. Throws an `IllegalArgumentException` when the `emailAddress` handed to the method is `null`. -<3> Returns `null` when the query executed does not produce a result. Also accepts `null` as the value for `emailAddress`. -<4> Returns `Optional.empty()` when the query executed does not produce a result. Throws an `IllegalArgumentException` when the `emailAddress` handed to the method is `null`. +<2> Throws an `EmptyResultDataAccessException` when the query does not produce a result. Throws an `IllegalArgumentException` when the `emailAddress` handed to the method is `null`. +<3> Returns `null` when the query does not produce a result. Also accepts `null` as the value for `emailAddress`. +<4> Returns `Optional.empty()` when the query does not produce a result. Throws an `IllegalArgumentException` when the `emailAddress` handed to the method is `null`. ==== [[repositories.nullability.kotlin]] @@ -670,8 +670,8 @@ interface UserRepository : Repository { fun findByFirstname(firstname: String?): User? <2> } ---- -<1> The method defines both the parameter and the result as non-nullable (the Kotlin default). The Kotlin compiler rejects method invocations that pass `null` to the method. If the query execution yields an empty result, an `EmptyResultDataAccessException` is thrown. -<2> This method accepts `null` for the `firstname` parameter and returns `null` if the query execution does not produce a result. +<1> The method defines both the parameter and the result as non-nullable (the Kotlin default). The Kotlin compiler rejects method invocations that pass `null` to the method. If the query yields an empty result, an `EmptyResultDataAccessException` is thrown. +<2> This method accepts `null` for the `firstname` parameter and returns `null` if the query does not produce a result. ==== [[repositories.query-streaming]]