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
ConstructorDescriptionSimpleDatastoreRepository
(DatastoreOperations datastoreTemplate, Class<T> entityType) -
Method Summary
Modifier and TypeMethodDescriptionlong
count()
<S extends T>
longcount
(org.springframework.data.domain.Example<S> example) void
void
void
void
deleteAllById
(Iterable<? extends I> iterable) void
deleteById
(I id) <S extends T>
booleanexists
(org.springframework.data.domain.Example<S> example) boolean
existsById
(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> A
performTransaction
(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:DatastoreRepository
Performs multiple read and write operations in a single transaction.- Specified by:
performTransaction
in 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:
findOne
in interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
findAll
- Specified by:
findAll
in 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:
findAll
in 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:
findAll
in interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
count
- Specified by:
count
in interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-
exists
- Specified by:
exists
in 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:
findBy
in interfaceorg.springframework.data.repository.query.QueryByExampleExecutor<T>
-