|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@NoRepositoryBean public interface CrudRepository<T,ID extends Serializable>
Interface for generic CRUD operations on a repository for a specific type.
| Method Summary | ||
|---|---|---|
long |
count()
Returns the number of entities available. |
|
void |
delete(ID id)
Deletes the entity with the given id. |
|
void |
delete(Iterable<? extends T> entities)
Deletes the given entities. |
|
void |
delete(T entity)
Deletes a given entity. |
|
void |
deleteAll()
Deletes all entities managed by the repository. |
|
boolean |
exists(ID id)
Returns whether an entity with the given id exists. |
|
Iterable<T> |
findAll()
Returns all instances of the type. |
|
Iterable<T> |
findAll(Iterable<ID> ids)
Returns all instances of the type with the given IDs. |
|
T |
findOne(ID id)
Retrives an entity by its id. |
|
|
save(Iterable<S> entities)
Saves all given entities. |
|
|
save(S entity)
Saves a given entity. |
|
| Method Detail |
|---|
<S extends T> S save(S entity)
entity -
<S extends T> Iterable<S> save(Iterable<S> entities)
entities -
IllegalArgumentException - in case the given entity is (@literal null}.T findOne(ID id)
id - must not be null.
IllegalArgumentException - if id is nullboolean exists(ID id)
id - must not be null.
IllegalArgumentException - if id is nullIterable<T> findAll()
Iterable<T> findAll(Iterable<ID> ids)
ids -
long count()
void delete(ID id)
id - must not be null.
IllegalArgumentException - in case the given id is nullvoid delete(T entity)
entity -
IllegalArgumentException - in case the given entity is (@literal null}.void delete(Iterable<? extends T> entities)
entities -
IllegalArgumentException - in case the given Iterable is (@literal null}.void deleteAll()
|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||