@NoRepositoryBean public interface CassandraRepository<T,ID> extends CrudRepository<T,ID>
CrudRepository interface that allows the specification of a type for the
identity of the @Table (or @Persistable) type.
Repositories based on CassandraRepository can define either a single primary key, use a primary key class or
a compound primary key without a primary key class. Types using a compound primary key without a primary key class
must use MapId to declare their key value.MapIdCassandraRepository| Modifier and Type | Method and Description |
|---|---|
List<T> |
findAll() |
Slice<T> |
findAll(Pageable pageable)
Returns a
Slice of entities meeting the paging restriction provided in the Pageable object. |
List<T> |
findAllById(Iterable<ID> ids)
Note: Cassandra supports single-field
IN queries only. |
<S extends T> |
insert(Iterable<S> entities)
Inserts the given entities.
|
<S extends T> |
insert(S entity)
Inserts the given entity.
|
<S extends T> |
saveAll(Iterable<S> entites) |
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save<S extends T> List<S> saveAll(Iterable<S> entites)
saveAll in interface CrudRepository<T,ID>List<T> findAllById(Iterable<ID> ids)
IN queries only. When using MapId with multiple components,
use CrudRepository.findById(Object).findAllById in interface CrudRepository<T,ID>InvalidDataAccessApiUsageException - thrown when using MapId with multiple
key components.Slice<T> findAll(Pageable pageable)
Slice of entities meeting the paging restriction provided in the Pageable object.pageable - must not be null.Slice of entities.CassandraPageRequest<S extends T> S insert(S entity)
CrudRepository.save(Object) instead to avoid the usage of store-specific API.entity - must not be null.<S extends T> List<S> insert(Iterable<S> entities)
saveAll(Iterable). Prefer using saveAll(Iterable) to avoid the usage of
store specific API.entities - must not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.