T - the type of the entitiesID - the id type of the entitiespublic class SimpleDatastoreRepository<T,ID> extends Object implements DatastoreRepository<T,ID>
DatastoreRepository.| Constructor and Description |
|---|
SimpleDatastoreRepository(DatastoreOperations datastoreTemplate,
Class<T> entityType) |
| Modifier and Type | Method and Description |
|---|---|
long |
count() |
<S extends T> |
count(org.springframework.data.domain.Example<S> example) |
void |
delete(T entity) |
void |
deleteAll() |
void |
deleteAll(Iterable<? extends T> entities) |
void |
deleteById(ID id) |
<S extends T> |
exists(org.springframework.data.domain.Example<S> example) |
boolean |
existsById(ID id) |
Iterable<T> |
findAll() |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example) |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example,
org.springframework.data.domain.Pageable pageable) |
<S extends T> |
findAll(org.springframework.data.domain.Example<S> example,
org.springframework.data.domain.Sort sort) |
org.springframework.data.domain.Page<T> |
findAll(org.springframework.data.domain.Pageable pageable) |
Iterable<T> |
findAll(org.springframework.data.domain.Sort sort) |
Iterable<T> |
findAllById(Iterable<ID> ids) |
Optional<T> |
findById(ID id) |
<S extends T> |
findOne(org.springframework.data.domain.Example<S> example) |
<A> A |
performTransaction(Function<DatastoreRepository<T,ID>,A> operations)
Performs multiple read and write operations in a single transaction.
|
<S extends T> |
save(S entity) |
<S extends T> |
saveAll(Iterable<S> entities) |
public SimpleDatastoreRepository(DatastoreOperations datastoreTemplate, Class<T> entityType)
public <A> A performTransaction(Function<DatastoreRepository<T,ID>,A> operations)
DatastoreRepositoryperformTransaction in interface DatastoreRepository<T,ID>A - the final return type of the operations.operations - the function representing the operations to perform using a
DatastoreRepository based on a single transaction.public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable)
public <S extends T> S save(S entity)
public boolean existsById(ID id)
public long count()
public void deleteById(ID id)
public void delete(T entity)
public void deleteAll()
public <S extends T> Optional<S> findOne(org.springframework.data.domain.Example<S> example)
findOne in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>public <S extends T> Iterable<S> findAll(org.springframework.data.domain.Example<S> example)
findAll in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>public <S extends T> Iterable<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Sort sort)
findAll in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>public <S extends T> org.springframework.data.domain.Page<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Pageable pageable)
findAll in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>public <S extends T> long count(org.springframework.data.domain.Example<S> example)
count in interface org.springframework.data.repository.query.QueryByExampleExecutor<T>Copyright © 2021 Pivotal Software, Inc.. All rights reserved.