public class SimpleCouchbaseRepository<T,ID extends Serializable> extends Object implements CouchbaseRepository<T,ID>
| Constructor and Description |
|---|
SimpleCouchbaseRepository(CouchbaseEntityInformation<T,String> metadata,
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) |
Iterable<T> |
findAll() |
Iterable<T> |
findAllById(Iterable<ID> ids) |
Optional<T> |
findById(ID id) |
CouchbaseOperations |
getCouchbaseOperations() |
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) |
void |
setViewMetadataProvider(ViewMetadataProvider viewMetadataProvider)
Configures a custom
ViewMetadataProvider to be used to detect Views to be applied to queries. |
public SimpleCouchbaseRepository(CouchbaseEntityInformation<T,String> metadata, CouchbaseOperations couchbaseOperations)
metadata - the Metadata for the entity.couchbaseOperations - the reference to the template used.public void setViewMetadataProvider(ViewMetadataProvider viewMetadataProvider)
ViewMetadataProvider to be used to detect Views to be applied to queries.viewMetadataProvider - that is used to lookup any annotated View on a query method.public <S extends T> S save(S entity)
save in interface CrudRepository<T,ID extends Serializable>public <S extends T> Iterable<S> saveAll(Iterable<S> entities)
saveAll in interface CrudRepository<T,ID extends Serializable>public Optional<T> findById(ID id)
findById in interface CrudRepository<T,ID extends Serializable>public boolean existsById(ID id)
existsById in interface CrudRepository<T,ID extends Serializable>public void deleteById(ID id)
deleteById in interface CrudRepository<T,ID extends Serializable>public void delete(T entity)
delete in interface CrudRepository<T,ID extends Serializable>public void deleteAll(Iterable<? extends T> entities)
deleteAll in interface CrudRepository<T,ID extends Serializable>public Iterable<T> findAll()
findAll in interface CrudRepository<T,ID extends Serializable>public Iterable<T> findAllById(Iterable<ID> ids)
findAllById in interface CrudRepository<T,ID extends Serializable>public long count()
count in interface CrudRepository<T,ID extends Serializable>public void deleteAll()
deleteAll in interface CrudRepository<T,ID extends Serializable>public CouchbaseOperations getCouchbaseOperations()
getCouchbaseOperations in interface CouchbaseRepository<T,ID extends Serializable>operation template.protected CouchbaseEntityInformation<T,String> getEntityInformation()
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.