public class SimpleMongoRepository<T,ID extends Serializable> extends Object implements MongoRepository<T,ID>
| Constructor and Description |
|---|
SimpleMongoRepository(MongoEntityInformation<T,ID> metadata,
MongoOperations mongoOperations)
|
| Modifier and Type | Method and Description |
|---|---|
long |
count() |
<S extends T> |
count(Example<S> example) |
void |
delete(ID id) |
void |
delete(Iterable<? extends T> entities) |
void |
delete(T entity) |
void |
deleteAll() |
<S extends T> |
exists(Example<S> example) |
boolean |
exists(ID id) |
List<T> |
findAll() |
<S extends T> |
findAll(Example<S> example) |
<S extends T> |
findAll(Example<S> example,
Pageable pageable) |
<S extends T> |
findAll(Example<S> example,
Sort sort) |
Iterable<T> |
findAll(Iterable<ID> ids) |
Page<T> |
findAll(Pageable pageable) |
List<T> |
findAll(Sort sort) |
<S extends T> |
findOne(Example<S> example) |
T |
findOne(ID id) |
<S extends T> |
insert(Iterable<S> entities)
Inserts the given entities.
|
<S extends T> |
insert(S entity)
Inserts the given entity.
|
<S extends T> |
save(Iterable<S> entities) |
<S extends T> |
save(S entity) |
public SimpleMongoRepository(MongoEntityInformation<T,ID> metadata, MongoOperations mongoOperations)
metadata - must not be null.mongoOperations - must not be null.public <S extends T> S save(S entity)
save in interface CrudRepository<T,ID extends Serializable>public <S extends T> List<S> save(Iterable<S> entities)
save in interface MongoRepository<T,ID extends Serializable>save in interface CrudRepository<T,ID extends Serializable>public T findOne(ID id)
findOne in interface CrudRepository<T,ID extends Serializable>public boolean exists(ID id)
exists in interface CrudRepository<T,ID extends Serializable>public long count()
count in interface CrudRepository<T,ID extends Serializable>public void delete(ID id)
delete in interface CrudRepository<T,ID extends Serializable>public void delete(T entity)
delete in interface CrudRepository<T,ID extends Serializable>public void delete(Iterable<? extends T> entities)
delete in interface CrudRepository<T,ID extends Serializable>public void deleteAll()
deleteAll in interface CrudRepository<T,ID extends Serializable>public List<T> findAll()
findAll in interface MongoRepository<T,ID extends Serializable>findAll in interface CrudRepository<T,ID extends Serializable>public Iterable<T> findAll(Iterable<ID> ids)
findAll in interface CrudRepository<T,ID extends Serializable>public Page<T> findAll(Pageable pageable)
findAll in interface PagingAndSortingRepository<T,ID extends Serializable>public List<T> findAll(Sort sort)
findAll in interface MongoRepository<T,ID extends Serializable>findAll in interface PagingAndSortingRepository<T,ID extends Serializable>public <S extends T> S insert(S entity)
MongoRepositoryCrudRepository.save(Object) instead to avoid the usage of store-specific API.insert in interface MongoRepository<T,ID extends Serializable>entity - must not be null.public <S extends T> List<S> insert(Iterable<S> entities)
MongoRepositoryMongoRepository.save(Iterable). Prefer using MongoRepository.save(Iterable) to avoid the usage of store
specific API.insert in interface MongoRepository<T,ID extends Serializable>entities - must not be null.public <S extends T> Page<S> findAll(Example<S> example, Pageable pageable)
findAll in interface QueryByExampleExecutor<T>public <S extends T> List<S> findAll(Example<S> example, Sort sort)
findAll in interface MongoRepository<T,ID extends Serializable>findAll in interface QueryByExampleExecutor<T>public <S extends T> List<S> findAll(Example<S> example)
findAll in interface MongoRepository<T,ID extends Serializable>findAll in interface QueryByExampleExecutor<T>public <S extends T> S findOne(Example<S> example)
findOne in interface QueryByExampleExecutor<T>public <S extends T> long count(Example<S> example)
count in interface QueryByExampleExecutor<T>public <S extends T> boolean exists(Example<S> example)
exists in interface QueryByExampleExecutor<T>Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.