Skip to content

Commit

Permalink
'criteria is' -> 'criteria are'
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Mar 17, 2024
1 parent 69c5d1d commit decb1ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/src/main/java/jakarta/data/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
* <p>When combined on a method with static sort criteria
* ({@code OrderBy} keyword or {@link OrderBy} annotation or
* {@link Query} with an {@code ORDER BY} clause), the static
* sort criteria is applied first, followed by the dynamic sort criteria
* that is defined by {@link Sort} instances in the order listed.</p>
* sort criteria are applied first, followed by the dynamic sort criteria
* that are defined by {@link Sort} instances in the order listed.</p>
*
* <p>In the example above, the matching employees are sorted first by salary
* from highest to lowest. Employees with the same salary are then sorted
Expand Down
4 changes: 2 additions & 2 deletions spec/src/main/asciidoc/repository.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1224,11 +1224,11 @@ A repository method that is annotated with `@Query` with a value that does not c

==== Static Mechanisms for Sort Criteria

Sort criteria is provided statically for a repository method by using the `OrderBy` keyword or by annotating the method with one or more `@OrderBy` annotations. The `OrderBy` keyword cannot be intermixed with the `@OrderBy` annotation or the `@Query` annotation. Static sort criteria takes precedence over dynamic sort criteria in that static sort criteria is evaluated first. When static sort criteria sorts entities to the same position, dynamic sort criteria is applied to further order those entities.
Sort criteria are provided statically for a repository method by using the `OrderBy` keyword or by annotating the method with one or more `@OrderBy` annotations. The `OrderBy` keyword cannot be intermixed with the `@OrderBy` annotation or the `@Query` annotation. Static sort criteria takes precedence over dynamic sort criteria in that static sort criteria are evaluated first. When static sort criteria sorts entities to the same position, dynamic sort criteria are applied to further order those entities.

==== Dynamic Mechanisms for Sort Criteria

Sort criteria is provided dynamically to repository methods either via `Sort` parameters or via a `PageRequest` or `Order` parameter that has one or more `Sort` values. `Sort` and `PageRequest` containing `Sort` must not both be provided to the same method. Similarly, `Order` and `PageRequest` containing `Sort` must not both be provided to the same method.
Sort criteria are provided dynamically to repository methods either via `Sort` parameters or via a `PageRequest` or `Order` parameter that has one or more `Sort` values. `Sort` and `PageRequest` containing `Sort` must not both be provided to the same method. Similarly, `Order` and `PageRequest` containing `Sort` must not both be provided to the same method.

==== Examples of Sort Criteria Precedence

Expand Down

0 comments on commit decb1ef

Please sign in to comment.