public class SimpleCassandraRepository<T,ID> extends Object implements CassandraRepository<T,ID>
CassandraRepository| Constructor and Description |
|---|
SimpleCassandraRepository(CassandraEntityInformation<T,ID> metadata,
CassandraOperations operations)
Create a new
SimpleCassandraRepository for the given CassandraEntityInformation
and CassandraTemplate. |
| Modifier and Type | Method and Description |
|---|---|
long |
count() |
protected <S extends T> |
createInsert(S entity)
Create a
Insert statement containing all properties including these with null values. |
void |
delete(T entity) |
void |
deleteAll() |
void |
deleteAll(Iterable<? extends T> entities) |
void |
deleteById(ID id) |
boolean |
existsById(ID id) |
List<T> |
findAll() |
org.springframework.data.domain.Slice<T> |
findAll(org.springframework.data.domain.Pageable pageable)
Returns a
Slice of entities meeting the paging restriction provided in the Pageable object. |
List<T> |
findAllById(Iterable<ID> ids) |
Optional<T> |
findById(ID id) |
<S extends T> |
insert(Iterable<S> entities)
Inserts the given entities.
|
<S extends T> |
insert(S entity)
Inserts the given entity.
|
<S extends T> |
save(S entity) |
<S extends T> |
saveAll(Iterable<S> entities) |
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)
protected <S extends T> com.datastax.driver.core.querybuilder.Insert createInsert(S entity)
Insert statement containing all properties including these with null values.entity - the entity, must not be null.Insert statement.public <S extends T> S insert(S entity)
CassandraRepositoryCrudRepository.save(Object) instead to avoid the usage of store-specific API.insert in interface CassandraRepository<T,ID>entity - must not be null.public <S extends T> List<S> insert(Iterable<S> entities)
CassandraRepositoryCassandraRepository.saveAll(Iterable). Prefer using CassandraRepository.saveAll(Iterable) to avoid the usage of
store specific API.insert in interface CassandraRepository<T,ID>entities - must not be null.public boolean existsById(ID id)
public long count()
public List<T> findAllById(Iterable<ID> ids)
findAllById in interface CassandraRepository<T,ID>findAllById in interface org.springframework.data.repository.CrudRepository<T,ID>public org.springframework.data.domain.Slice<T> findAll(org.springframework.data.domain.Pageable pageable)
CassandraRepositorySlice of entities meeting the paging restriction provided in the Pageable object.findAll in interface CassandraRepository<T,ID>pageable - must not be null.Slice of entities.CassandraPageRequestpublic void deleteById(ID id)
public void delete(T entity)
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.