Skip to content

Commit

Permalink
feat: create new delete methods at Template
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Aug 10, 2023
1 parent ecbace5 commit 96a573b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions api/nosql-core/src/main/java/jakarta/nosql/Template.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,22 @@ public interface Template {
*/
<T, K> void delete(Class<T> type, K id);

/**
* Deletes a given entity. Deletion is performed by matching the Id.
*
* @param entity must not be {@literal null}.
* @throws NullPointerException when the entity is null
*/
<T> void delete(T entity);

/**
* Deletes the given entities. Deletion of each entity is performed by matching the Id.
*
* @param entities must not be {@literal null}. Must not contain {@literal null} elements.
* @throws NullPointerException when either the iterable is null or contains null elements
*/
<T> void delete(Iterable<? extends T> entities);

/**
* It starts a query using the fluent-API journey. It is a mutable and non-thread-safe instance.
*
Expand Down

0 comments on commit 96a573b

Please sign in to comment.