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() |
void |
delete(T entity) |
void |
deleteAll() |
void |
deleteAll(Iterable<? extends T> entities) |
void |
deleteById(ID id) |
boolean |
existsById(ID id) |
Iterable<T> |
findAll() |
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) |
<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)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.