Skip to content

Commit 070eeef

Browse files
Jay Bryantschauder
authored andcommitted
DATAJPA-1800 - Wording changes.
Removed potential insensitive language and replaced it with more neutral language. Original pull request: #424.
1 parent 16135ab commit 070eeef

File tree

5 files changed

+18
-20
lines changed

5 files changed

+18
-20
lines changed

src/main/asciidoc/index.adoc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ ifdef::backend-epub3[:front-cover-image: image:epub-cover.png[Front Cover,1050,1
1010

1111
NOTE: Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
1212

13-
toc::[]
14-
1513
include::preface.adoc[]
1614

1715
include::new-features.adoc[leveloffset=+1]
@@ -21,12 +19,12 @@ include::{spring-data-commons-docs}/dependencies.adoc[leveloffset=+1]
2119
include::{spring-data-commons-docs}/repositories.adoc[leveloffset=+1]
2220

2321
[[reference]]
24-
= Reference Documentation
22+
== Reference Documentation
2523

2624
include::jpa.adoc[leveloffset=+1]
2725

2826
[[appendix]]
29-
= Appendix
27+
== Appendix
3028

3129
:numbered!:
3230
include::{spring-data-commons-docs}/repository-namespace-reference.adoc[leveloffset=+1]

src/main/asciidoc/jpa.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ In case you bootstrap JPA asynchronously, `DEFERRED` is a reasonable default as
122122
Still, it makes sure that repositories are properly initialized and validated before the application signals it's up.
123123

124124
`LAZY` is a decent choice for testing scenarios and local development.
125-
Once you're pretty sure that repositories will properly bootstrap, or in cases where you're testing other parts of the application, executing verification for all repositories might just unnecessarily increase the startup time.
126-
The same applies to local development in which you only access parts of the application which might just need a single repository initialized.
125+
Once you are pretty sure that repositories can properly bootstrap, or in cases where you are testing other parts of the application, running verification for all repositories might unnecessarily increase the startup time.
126+
The same applies to local development in which you only access parts of the application that might need to have a single repository initialized.
127127

128128
[[jpa.entity-persistence]]
129129
== Persisting Entities
@@ -287,7 +287,7 @@ public class User {
287287
====
288288

289289
==== Declaring Interfaces
290-
To allow execution of these named queries, specify the `UserRepository` as follows:
290+
To allow these named queries, specify the `UserRepository` as follows:
291291

292292
.Query method declaration in UserRepository
293293
====
@@ -307,7 +307,7 @@ Spring Data tries to resolve a call to these methods to a named query, starting
307307
[[jpa.query-methods.at-query]]
308308
=== Using `@Query`
309309

310-
Using named queries to declare queries for entities is a valid approach and works fine for a small number of queries. As the queries themselves are tied to the Java method that executes them, you can actually bind them directly by using the Spring Data JPA `@Query` annotation rather than annotating them to the domain class. This frees the domain class from persistence specific information and co-locates the query to the repository interface.
310+
Using named queries to declare queries for entities is a valid approach and works fine for a small number of queries. As the queries themselves are tied to the Java method that runs them, you can actually bind them directly by using the Spring Data JPA `@Query` annotation rather than annotating them to the domain class. This frees the domain class from persistence specific information and co-locates the query to the repository interface.
311311

312312
Queries annotated to the query method take precedence over queries defined using `@NamedQuery` or named queries declared in `orm.xml`.
313313

@@ -327,7 +327,7 @@ public interface UserRepository extends JpaRepository<User, Long> {
327327

328328
==== Using Advanced `LIKE` Expressions
329329

330-
The query execution mechanism for manually defined queries created with `@Query` allows the definition of advanced `LIKE` expressions inside the query definition, as shown in the following example:
330+
The query running mechanism for manually defined queries created with `@Query` allows the definition of advanced `LIKE` expressions inside the query definition, as shown in the following example:
331331

332332
.Advanced `like` expressions in @Query
333333
====
@@ -341,7 +341,7 @@ public interface UserRepository extends JpaRepository<User, Long> {
341341
----
342342
====
343343

344-
In the preceding example, the `LIKE` delimiter character (`%`) is recognized, and the query is transformed into a valid JPQL query (removing the `%`). Upon query execution, the parameter passed to the method call gets augmented with the previously recognized `LIKE` pattern.
344+
In the preceding example, the `LIKE` delimiter character (`%`) is recognized, and the query is transformed into a valid JPQL query (removing the `%`). Upon running the query, the parameter passed to the method call gets augmented with the previously recognized `LIKE` pattern.
345345

346346
==== Native Queries
347347

@@ -439,7 +439,7 @@ NOTE: As of version 4, Spring fully supports Java 8’s parameter name discovery
439439
[[jpa.query.spel-expressions]]
440440
=== Using SpEL Expressions
441441

442-
As of Spring Data JPA release 1.4, we support the usage of restricted SpEL template expressions in manually defined queries that are defined with `@Query`. Upon query execution, these expressions are evaluated against a predefined set of variables. Spring Data JPA supports a variable called `entityName`. Its usage is `select x from #{#entityName} x`. It inserts the `entityName` of the domain type associated with the given repository. The `entityName` is resolved as follows: If the domain type has set the name property on the `@Entity` annotation, it is used. Otherwise, the simple class-name of the domain type is used.
442+
As of Spring Data JPA release 1.4, we support the usage of restricted SpEL template expressions in manually defined queries that are defined with `@Query`. Upon the query being run, these expressions are evaluated against a predefined set of variables. Spring Data JPA supports a variable called `entityName`. Its usage is `select x from #{#entityName} x`. It inserts the `entityName` of the domain type associated with the given repository. The `entityName` is resolved as follows: If the domain type has set the name property on the `@Entity` annotation, it is used. Otherwise, the simple class-name of the domain type is used.
443443

444444
The following example demonstrates one use case for the `+#{#entityName}+` expression in a query string where you want to define a repository interface with a query method and a manually defined query:
445445

@@ -589,13 +589,13 @@ interface UserRepository extends Repository<User, Long> {
589589
----
590590
====
591591

592-
Although the `deleteByRoleId(…)` method looks like it basically produces the same result as the `deleteInBulkByRoleId(…)`, there is an important difference between the two method declarations in terms of the way they get executed.
592+
Although the `deleteByRoleId(…)` method looks like it basically produces the same result as the `deleteInBulkByRoleId(…)`, there is an important difference between the two method declarations in terms of the way they are run.
593593
As the name suggests, the latter method issues a single JPQL query (the one defined in the annotation) against the database.
594594
This means even currently loaded instances of `User` do not see lifecycle callbacks invoked.
595595

596-
To make sure lifecycle queries are actually invoked, an invocation of `deleteByRoleId(…)` executes a query and then deletes the returned instances one by one, so that the persistence provider can actually invoke `@PreRemove` callbacks on those entities.
596+
To make sure lifecycle queries are actually invoked, an invocation of `deleteByRoleId(…)` runs a query and then deletes the returned instances one by one, so that the persistence provider can actually invoke `@PreRemove` callbacks on those entities.
597597

598-
In fact, a derived delete query is a shortcut for executing the query and then calling `CrudRepository.delete(Iterable<User> users)` on the result and keeping behavior in sync with the implementations of other `delete(…)` methods in `CrudRepository`.
598+
In fact, a derived delete query is a shortcut for running the query and then calling `CrudRepository.delete(Iterable<User> users)` on the result and keeping behavior in sync with the implementations of other `delete(…)` methods in `CrudRepository`.
599599

600600
[[jpa.query-hints]]
601601
=== Applying Query Hints
@@ -785,7 +785,7 @@ public interface CustomerRepository extends CrudRepository<Customer, Long>, JpaS
785785
}
786786
----
787787

788-
The additional interface has methods that let you execute specifications in a variety of ways. For example, the `findAll` method returns all entities that match the specification, as shown in the following example:
788+
The additional interface has methods that let you run specifications in a variety of ways. For example, the `findAll` method returns all entities that match the specification, as shown in the following example:
789789

790790
[source, java]
791791
----

src/main/asciidoc/new-features.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Spring Data JPA 1.11 added the following features:
88

99
* Improved compatibility with Hibernate 5.2.
1010
* Support any-match mode for <<query-by-example>>.
11-
* Paged query execution optimizations.
11+
* Paged query optimizations.
1212
* Support for the `exists` projection in repository query derivation.
1313

1414
[[new-features.1-10-0]]

src/main/asciidoc/preface.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[[preface]]
2-
= Preface
2+
== Preface
33

44
Spring Data JPA provides repository support for the Java Persistence API (JPA). It eases development of applications that need to access JPA data sources.
55

66
[[project]]
7-
== Project Metadata
7+
=== Project Metadata
88

99
* Version control: https://github.com/spring-projects/spring-data-jpa
1010
* Bugtracker: https://jira.spring.io/browse/DATAJPA

src/main/asciidoc/query-by-example.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[[query-by-example.execution]]
2-
== Executing an example
1+
[[query-by-example.running]]
2+
== Running an Example
33

44
In Spring Data JPA, you can use Query by Example with Repositories, as shown in the following example:
55

0 commit comments

Comments
 (0)