From 3c5c97bd31d401960623386fba6583a6e2be2f89 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Sun, 17 Mar 2024 07:07:41 +0000 Subject: [PATCH 1/2] chore: aling update method at the CrudRepository Signed-off-by: Otavio Santana --- .../main/java/jakarta/data/repository/CrudRepository.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/jakarta/data/repository/CrudRepository.java b/api/src/main/java/jakarta/data/repository/CrudRepository.java index b11b7c314..ef0887dea 100644 --- a/api/src/main/java/jakarta/data/repository/CrudRepository.java +++ b/api/src/main/java/jakarta/data/repository/CrudRepository.java @@ -145,6 +145,7 @@ public interface CrudRepository extends BasicRepository { * the update.

* * @param entity the entity to update. Must not be {@code null}. + * @param Type of the entity to insert. * @return an updated entity instance including all automatically generated values, * updated versions, and incremented values which changed as a result of the update. * @throws OptimisticLockingFailureException the entity is not found in the database @@ -152,7 +153,7 @@ public interface CrudRepository extends BasicRepository { * @throws NullPointerException if the entity is null. */ @Update - T update(T entity); + S update(S entity); /** *

Modifies entities that already exist in the database.

@@ -175,6 +176,6 @@ public interface CrudRepository extends BasicRepository { * @throws NullPointerException if either the supplied {@code Iterable} is null or any element is null. */ @Update - Iterable updateAll(Iterable entities); + updateAll(Iterable entities); } From 8cf89b08a266a4a0511fe6c19e2c106181477c47 Mon Sep 17 00:00:00 2001 From: Otavio Santana Date: Sun, 17 Mar 2024 07:09:04 +0000 Subject: [PATCH 2/2] chore: aling updateall method and get consistency to insert at CrudRepository Signed-off-by: Otavio Santana --- .../main/java/jakarta/data/repository/CrudRepository.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/jakarta/data/repository/CrudRepository.java b/api/src/main/java/jakarta/data/repository/CrudRepository.java index ef0887dea..c4b841188 100644 --- a/api/src/main/java/jakarta/data/repository/CrudRepository.java +++ b/api/src/main/java/jakarta/data/repository/CrudRepository.java @@ -145,7 +145,7 @@ public interface CrudRepository extends BasicRepository { * the update.

* * @param entity the entity to update. Must not be {@code null}. - * @param Type of the entity to insert. + * @param Type of the entity to update. * @return an updated entity instance including all automatically generated values, * updated versions, and incremented values which changed as a result of the update. * @throws OptimisticLockingFailureException the entity is not found in the database @@ -168,6 +168,7 @@ public interface CrudRepository extends BasicRepository { * the update.

* * @param entities entities to update. + * @param Type of the entities to update. * @return updated entity instances, in the same order as the supplied entities, * and including all automatically generated values, updated versions, and * incremented values which changed as a result of the update. @@ -176,6 +177,6 @@ public interface CrudRepository extends BasicRepository { * @throws NullPointerException if either the supplied {@code Iterable} is null or any element is null. */ @Update - updateAll(Iterable entities); + Iterable updateAll(Iterable entities); }