Skip to content

Commit

Permalink
chore: aling updateall method and get consistency to insert at CrudRe…
Browse files Browse the repository at this point in the history
…pository

Signed-off-by: Otavio Santana <[email protected]>
  • Loading branch information
otaviojava committed Mar 17, 2024
1 parent 9fb86bd commit 974a16c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/src/main/java/jakarta/data/repository/CrudRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public interface CrudRepository<T, K> extends BasicRepository<T, K> {
* the update.</p>
*
* @param entity the entity to update. Must not be {@code null}.
* @param <S> Type of the entity to insert.
* @param <S> 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
Expand All @@ -168,6 +168,7 @@ public interface CrudRepository<T, K> extends BasicRepository<T, K> {
* the update.</p>
*
* @param entities entities to update.
* @param <S> 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.
Expand All @@ -176,6 +177,6 @@ public interface CrudRepository<T, K> extends BasicRepository<T, K> {
* @throws NullPointerException if either the supplied {@code Iterable} is null or any element is null.
*/
@Update
<S extends T> updateAll(Iterable<T> entities);
<S extends T> Iterable<S> updateAll(Iterable<S> entities);

}

0 comments on commit 974a16c

Please sign in to comment.