@NoRepositoryBean public interface CRUDRepository<T> extends PagingAndSortingRepository<T,Long>
Modifier and Type | Method and Description |
---|---|
long |
count()
uses the configured TypeRepresentationStrategy, depending on the strategy this number might be an
approximation
|
void |
delete(Iterable<? extends T> entities)
deletes the given entities by calling their entity.remove() methods
|
void |
delete(T entity)
deletes the given entity by calling its entity.remove() method
|
void |
deleteAll()
removes all entities of this type, use with care
|
boolean |
exists(Long id) |
EndResult<T> |
findAll()
uses the configured TypeRepresentationStrategy to load all entities, might return a large result
|
Page<T> |
findAll(Pageable pageable)
finder that takes the provided sorting and paging into account
NOTE: the sorting is not yet implemented
|
EndResult<T> |
findAll(Sort sort)
finder that takes the provided sorting into account
NOTE: the sorting is not yet implemented
|
T |
findOne(Long id) |
Class |
getStoredJavaType(Object entity) |
EndResult<T> |
query(String query,
Map<String,Object> params) |
<U extends T> |
save(Iterable<U> entities)
persists the provided entities by forwarding to their entity.persist() methods
|
<U extends T> |
save(U entity)
persists an entity by forwarding to entity.persist()
|
delete, findAll
@Transactional <U extends T> U save(U entity)
save
in interface CrudRepository<T,Long>
entity
- to be persisted@Transactional <U extends T> Iterable<U> save(Iterable<U> entities)
save
in interface CrudRepository<T,Long>
entities
- to be persistedT findOne(Long id)
findOne
in interface CrudRepository<T,Long>
id
- of the node or relationship-entityboolean exists(Long id)
exists
in interface CrudRepository<T,Long>
id
- EndResult<T> findAll()
findAll
in interface CrudRepository<T,Long>
long count()
count
in interface CrudRepository<T,Long>
@Transactional void delete(T entity)
delete
in interface CrudRepository<T,Long>
entity
- to delete@Transactional void delete(Iterable<? extends T> entities)
delete
in interface CrudRepository<T,Long>
entities
- to delete@Transactional void deleteAll()
deleteAll
in interface CrudRepository<T,Long>
EndResult<T> findAll(Sort sort)
findAll
in interface PagingAndSortingRepository<T,Long>
sort
- Page<T> findAll(Pageable pageable)
findAll
in interface PagingAndSortingRepository<T,Long>
pageable
- Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.