Skip to content

Commit 11e6479

Browse files
committed
go with List rather than Iterable because Iterable is just a PITA to deal with
1 parent 02274ce commit 11e6479

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

api/src/main/java/jakarta/data/repository/Delete.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
* to be deleted is the primary entity type of the repository. The method return type must be {@code void}, {@code int},
6666
* or {@code long}. Every parameter of the annotated method must have exactly the same name (the parameter name in the
6767
* Java source, or a name assigned by {@link By @By}) as a persistent field or property of the entity class and be of
68-
* type {@code T}, {@code T[]}, or {@code Iterable<T>} where {@code T} is the type of the field or property. Parameters
68+
* type {@code T}, {@code T[]}, or {@code List<T>} where {@code T} is the type of the field or property. Parameters
6969
* of type {@code Sort}, {@code Order}, {@code Limit}, and {@code PageRequest} are prohibited.
7070
* </p>
7171
* <p>For example, consider an interface representing a garage:</p>

api/src/main/java/jakarta/data/repository/Find.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
* </p>
3535
* <ul>
3636
* <li>have exactly the name (the parameter name in the Java source, or a name assigned by {@link By @By}) as a
37-
* persistent field or property of the entity class and be of type {@code T}, {@code T[]}, or {@code Iterable<T>}
38-
* where {@code T} is the type of the field or property, or</li>
37+
* persistent field or property of the entity class and be of type {@code T}, {@code T[]}, or {@code List<T>} where
38+
* {@code T} is the type of the field or property, or</li>
3939
* <li>be of type {@link jakarta.data.Limit}, {@link jakarta.data.Sort}, {@link jakarta.data.Order}, or
4040
* {@link jakarta.data.page.PageRequest}.</li>
4141
* </ul>

spec/src/main/asciidoc/repository.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -826,12 +826,12 @@ A _parameter-based automatic query method_ is an abstract method annotated with
826826

827827
Each automatic query method must be assigned an entity type. The rules for inferring the entity type depend on the semantics of the automatic query annotation. Typically:
828828

829-
- If the automatic query method returns an entity type, the method return type identifies the entity. For example, the return type might be `E`, `Optional<E>`, `Page<E>`, or `List<E>`, where `E` is an entity class. Then the automatic query method would be assigned the entity type `E`.
829+
- If the automatic query method returns an entity type, the method return type identifies the entity. For example, the return type might be `E`, `Optional<E>`, `E[]`, `Page<E>`, or `List<E>`, where `E` is an entity class. Then the automatic query method would be assigned the entity type `E`.
830830
- If the query does not return an entity type, the entity assigned to the automatic query method is the primary entity type of the repository.
831831

832832
Jakarta Data infers a query based on the parameters of the method. Each parameter must either:
833833

834-
- have exactly the same name as a persistent field or property of the entity class and be of type `T`, `T[]`, or `Iterable<T>` where `T` is the type of the field or property, or
834+
- have exactly the same name as a persistent field or property of the entity class and be of type `T`, `T[]`, or `List<T>` where `T` is the type of the field or property, or
835835
- be of type `Limit`, `Order`, `PageRequest`, or `Sort`.
836836

837837
Parameter names map parameters to persistent fields. A repository with parameter-based automatic query methods must either:

0 commit comments

Comments
 (0)