public class SimpleCassandraRepository<T,ID extends Serializable> extends Object implements TypedIdCassandraRepository<T,ID>
Constructor and Description |
---|
SimpleCassandraRepository(CassandraEntityInformation<T,ID> metadata,
CassandraOperations operations)
Creates a new
SimpleCassandraRepository for the given CassandraEntityInformation and
CassandraTemplate . |
Modifier and Type | Method and Description |
---|---|
long |
count() |
void |
delete(ID id) |
void |
delete(Iterable<? extends T> entities) |
void |
delete(T entity) |
void |
deleteAll() |
boolean |
exists(ID id) |
List<T> |
findAll() |
Iterable<T> |
findAll(Iterable<ID> ids) |
protected List<T> |
findAll(com.datastax.driver.core.querybuilder.Select query) |
T |
findOne(ID id) |
<S extends T> |
insert(S entity)
Inserts the given entity.
|
<S extends T> |
save(Iterable<S> entities) |
<S extends T> |
save(S entity) |
public SimpleCassandraRepository(CassandraEntityInformation<T,ID> metadata, CassandraOperations operations)
SimpleCassandraRepository
for the given CassandraEntityInformation
and
CassandraTemplate
.metadata
- must not be null.operations
- must not be null.public <S extends T> S save(S entity)
save
in interface CrudRepository<T,ID extends Serializable>
public <S extends T> List<S> save(Iterable<S> entities)
save
in interface CrudRepository<T,ID extends Serializable>
public <S extends T> S insert(S entity)
TypedIdCassandraRepository
CrudRepository.save(Object)
instead to avoid the usage of store-specific API.insert
in interface TypedIdCassandraRepository<T,ID extends Serializable>
entity
- must not be null.public T findOne(ID id)
findOne
in interface CrudRepository<T,ID extends Serializable>
public boolean exists(ID id)
exists
in interface CrudRepository<T,ID extends Serializable>
public long count()
count
in interface CrudRepository<T,ID extends Serializable>
public void delete(ID id)
delete
in interface CrudRepository<T,ID extends Serializable>
public void delete(T entity)
delete
in interface CrudRepository<T,ID extends Serializable>
public void delete(Iterable<? extends T> entities)
delete
in interface CrudRepository<T,ID extends Serializable>
public void deleteAll()
deleteAll
in interface CrudRepository<T,ID extends Serializable>
public List<T> findAll()
findAll
in interface CrudRepository<T,ID extends Serializable>
public Iterable<T> findAll(Iterable<ID> ids)
findAll
in interface CrudRepository<T,ID extends Serializable>
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.