|
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. |
T |
findOne(ID id)
Retrives an entity by its primary key. |
Iterable<T> |
save(Iterable<? extends T> entities)
Saves all given entities. |
T |
save(T entity)
Saves a given entity. |
| Method Detail |
|---|
T save(T entity)
entity -
Iterable<T> save(Iterable<? extends T> entities)
entities -
T findOne(ID id)
id -
null if none
found
IllegalArgumentException - if primaryKey is nullboolean exists(ID id)
id -
IllegalArgumentException - if primaryKey is nullIterable<T> findAll()
long count()
void delete(ID id)
id - void delete(T entity)
entity - void delete(Iterable<? extends T> entities)
entities - void deleteAll()
|
Spring Data Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||