public class SimpleSpannerRepository<T,ID> extends Object implements SpannerRepository<T,ID>
| Modifier and Type | Method and Description |
|---|---|
long |
count() |
void |
delete(Object entity) |
void |
deleteAll() |
void |
deleteAll(Iterable<? extends T> entities) |
void |
deleteById(Object key) |
boolean |
existsById(ID key) |
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> iterable) |
Optional<T> |
findById(ID key) |
SpannerOperations |
getSpannerTemplate()
Gets a
SpannerOperations, which allows more-direct access to Google Cloud Spanner
functions. |
<A> A |
performReadOnlyTransaction(Function<SpannerRepository<T,ID>,A> operations)
Performs multiple read-only operations in a single transaction.
|
<A> A |
performReadWriteTransaction(Function<SpannerRepository<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 SpannerOperations getSpannerTemplate()
SpannerRepositorySpannerOperations, which allows more-direct access to Google Cloud Spanner
functions.getSpannerTemplate in interface SpannerRepository<T,ID>public <A> A performReadOnlyTransaction(Function<SpannerRepository<T,ID>,A> operations)
SpannerRepositoryperformReadOnlyTransaction in interface SpannerRepository<T,ID>A - the final return type of the operations.operations - the function representing the operations to perform using a
SpannerRepository based on a single transaction.public <A> A performReadWriteTransaction(Function<SpannerRepository<T,ID>,A> operations)
SpannerRepositoryperformReadWriteTransaction in interface SpannerRepository<T,ID>A - the final return type of the operations.operations - the function representing the operations to perform using a
SpannerRepository based on a single transaction.public <S extends T> S save(S entity)
public boolean existsById(ID key)
public long count()
public void deleteById(Object key)
public void delete(Object entity)
public void deleteAll()
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.