public interface EntityRepository extends org.springframework.data.repository.Repository<EntityWrapper<?>,java.lang.String>
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletableFuture<DeletedEntity> |
delete(EntityWrapper<?> entity)
Deletes a given entity.
|
java.util.concurrent.CompletableFuture<DeletedEntity> |
delete(java.lang.String id)
Deletes the entity with the given id.
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
deleteAll() |
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
exists(java.lang.String id)
Returns whether an entity with the given id exists.
|
java.util.concurrent.CompletableFuture<EntityWrapper<?>> |
findOne(java.lang.String id)
Retrieves an entity by its id.
|
<S extends EntityWrapper<?>> |
findOne(java.lang.String path,
java.lang.Class<S> type) |
<S extends EntityWrapper<?>> |
save(S entity)
Saves a given entity.
|
@Async java.util.concurrent.CompletableFuture<DeletedEntity> delete(EntityWrapper<?> entity)
entity - the entity to deletedjava.lang.IllegalArgumentException - in case the given entity is null.@Async java.util.concurrent.CompletableFuture<DeletedEntity> delete(java.lang.String id)
id - must not be null.java.lang.IllegalArgumentException - in case the given id is null@Async java.util.concurrent.CompletableFuture<java.lang.Boolean> exists(java.lang.String id)
id - must not be null.java.lang.IllegalArgumentException - if id is null@Async java.util.concurrent.CompletableFuture<EntityWrapper<?>> findOne(java.lang.String id)
id - must not be null.java.lang.IllegalArgumentException - if id is null@Async <S extends EntityWrapper<?>> java.util.concurrent.CompletableFuture<S> findOne(java.lang.String path, java.lang.Class<S> type)
@Async <S extends EntityWrapper<?>> java.util.concurrent.CompletableFuture<S> save(S entity)
S - the type of the entity being savedentity - The entity to be saved.@Async java.util.concurrent.CompletableFuture<java.lang.Void> deleteAll()