public class SimpleMongoRepository<T,ID extends Serializable> extends Object implements org.springframework.data.repository.PagingAndSortingRepository<T,ID>
Constructor and Description |
---|
SimpleMongoRepository(MongoEntityInformation<T,ID> metadata,
MongoOperations mongoOperations)
|
Modifier and Type | Method and Description |
---|---|
long |
count() |
void |
delete(ID id) |
void |
delete(Iterable<? extends T> entities) |
void |
delete(T entity) |
void |
deleteAll() |
boolean |
exists(ID id) |
List<T> |
findAll() |
org.springframework.data.domain.Page<T> |
findAll(org.springframework.data.domain.Pageable pageable) |
List<T> |
findAll(org.springframework.data.domain.Sort sort) |
T |
findOne(ID id) |
protected MongoEntityInformation<T,ID> |
getEntityInformation() |
protected MongoOperations |
getMongoOperations()
Returns the underlying
MongoOperations instance. |
List<T> |
save(Iterable<? extends T> entities) |
T |
save(T entity) |
public SimpleMongoRepository(MongoEntityInformation<T,ID> metadata, MongoOperations mongoOperations)
metadata
- template
- public T save(T entity)
save
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public List<T> save(Iterable<? extends T> entities)
save
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public T findOne(ID id)
findOne
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public boolean exists(ID id)
exists
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public long count()
count
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public void delete(ID id)
delete
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public void delete(T entity)
delete
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public void delete(Iterable<? extends T> entities)
delete
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public void deleteAll()
deleteAll
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public List<T> findAll()
findAll
in interface org.springframework.data.repository.CrudRepository<T,ID extends Serializable>
public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable)
findAll
in interface org.springframework.data.repository.PagingAndSortingRepository<T,ID extends Serializable>
public List<T> findAll(org.springframework.data.domain.Sort sort)
findAll
in interface org.springframework.data.repository.PagingAndSortingRepository<T,ID extends Serializable>
protected MongoOperations getMongoOperations()
MongoOperations
instance.protected MongoEntityInformation<T,ID> getEntityInformation()
Copyright © 2012. All Rights Reserved.