Class SimpleDatastoreRepository<T,I>
java.lang.Object
com.google.cloud.spring.data.datastore.repository.support.SimpleDatastoreRepository<T,I>
- Type Parameters:
T- the type of the entitiesI- the id type of the entities
- All Implemented Interfaces:
DatastoreRepository<T,,I> org.springframework.data.repository.CrudRepository<T,,I> org.springframework.data.repository.PagingAndSortingRepository<T,,I> org.springframework.data.repository.query.QueryByExampleExecutor<T>,org.springframework.data.repository.Repository<T,I>
Implementation of
DatastoreRepository.- Since:
- 1.1
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleDatastoreRepository(DatastoreOperations datastoreTemplate, Class<T> entityType) -
Method Summary
Modifier and TypeMethodDescriptionlongcount()<S extends T>
longcount(org.springframework.data.domain.Example<S> example) voidvoidvoidvoiddeleteAllById(Iterable<? extends I> iterable) voiddeleteById(I id) <S extends T>
booleanexists(org.springframework.data.domain.Example<S> example) booleanexistsById(I id) findAll()findAll(org.springframework.data.domain.Example<S> example) <S extends T>
org.springframework.data.domain.Page<S>findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Pageable pageable) 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) findAll(org.springframework.data.domain.Sort sort) findAllById(Iterable<I> ids) <S extends T,R>
RfindBy(org.springframework.data.domain.Example<S> example, Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>, R> queryFunction) findOne(org.springframework.data.domain.Example<S> example) <A> AperformTransaction(Function<DatastoreRepository<T, I>, A> operations) Performs multiple read and write operations in a single transaction.<S extends T>
Ssave(S entity)
-
Constructor Details
-
SimpleDatastoreRepository
-
-
Method Details
-
performTransaction
Description copied from interface:DatastoreRepositoryPerforms multiple read and write operations in a single transaction.- Specified by:
performTransactionin interfaceDatastoreRepository<T,I> - Type Parameters:
A- the final return type of the operations.- Parameters:
operations- the function representing the operations to perform using a DatastoreRepository based on a single transaction.- Returns:
- the final result of the transaction.
-
findAll
-
findAll
public org.springframework.data.domain.Page<T> findAll(org.springframework.data.domain.Pageable pageable) -
save
-
saveAll
-
findById
-
existsById
-
findAll
-
findAllById
-
count
public long count() -
deleteById
-
delete
-
deleteAll
-
deleteAll
public void deleteAll() -
findOne
- Specified by:
findOnein interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
findAll
- Specified by:
findAllin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
findAll
public <S extends T> Iterable<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Sort sort) - Specified by:
findAllin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
findAll
public <S extends T> org.springframework.data.domain.Page<S> findAll(org.springframework.data.domain.Example<S> example, org.springframework.data.domain.Pageable pageable) - Specified by:
findAllin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
count
- Specified by:
countin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
exists
- Specified by:
existsin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
deleteAllById
-
findBy
public <S extends T,R> R findBy(org.springframework.data.domain.Example<S> example, Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>, R> queryFunction) - Specified by:
findByin interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-