public class SimpleCouchbaseRepository<T,ID> extends Object implements CouchbaseRepository<T,ID>
Constructor and Description |
---|
SimpleCouchbaseRepository(CouchbaseEntityInformation<T,String> entityInformation,
CouchbaseOperations couchbaseOperations)
Create a new Repository.
|
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) |
List<T> |
findAll() |
Page<T> |
findAll(Pageable pageable) |
List<T> |
findAll(com.couchbase.client.java.query.QueryScanConsistency queryScanConsistency) |
List<T> |
findAll(Sort sort) |
List<T> |
findAllById(Iterable<ID> ids) |
Optional<T> |
findById(ID id) |
protected CouchbaseEntityInformation<T,String> |
getEntityInformation()
Returns the information for the underlying template.
|
<S extends T> |
save(S entity) |
<S extends T> |
saveAll(Iterable<S> entities) |
public SimpleCouchbaseRepository(CouchbaseEntityInformation<T,String> entityInformation, CouchbaseOperations couchbaseOperations)
entityInformation
- the Metadata for the entity.couchbaseOperations
- the reference to the template used.public <S extends T> S save(S entity)
save
in interface CrudRepository<T,ID>
public <S extends T> Iterable<S> saveAll(Iterable<S> entities)
saveAll
in interface CrudRepository<T,ID>
public Optional<T> findById(ID id)
findById
in interface CrudRepository<T,ID>
public List<T> findAllById(Iterable<ID> ids)
findAllById
in interface CouchbaseRepository<T,ID>
findAllById
in interface CrudRepository<T,ID>
public boolean existsById(ID id)
existsById
in interface CrudRepository<T,ID>
public void deleteById(ID id)
deleteById
in interface CrudRepository<T,ID>
public void delete(T entity)
delete
in interface CrudRepository<T,ID>
public void deleteAll(Iterable<? extends T> entities)
deleteAll
in interface CrudRepository<T,ID>
public long count()
count
in interface CrudRepository<T,ID>
public void deleteAll()
deleteAll
in interface CrudRepository<T,ID>
public List<T> findAll()
findAll
in interface CouchbaseRepository<T,ID>
findAll
in interface CrudRepository<T,ID>
public List<T> findAll(Sort sort)
findAll
in interface CouchbaseRepository<T,ID>
findAll
in interface PagingAndSortingRepository<T,ID>
public List<T> findAll(com.couchbase.client.java.query.QueryScanConsistency queryScanConsistency)
findAll
in interface CouchbaseRepository<T,ID>
public Page<T> findAll(Pageable pageable)
findAll
in interface PagingAndSortingRepository<T,ID>
protected CouchbaseEntityInformation<T,String> getEntityInformation()
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.