@NoRepositoryBean
public interface CassandraRepository<T,ID>
extends org.springframework.data.repository.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() |
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)
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) |
List<T> findAllById(Iterable<ID> ids)
Note: Cassandra supports single-field IN
queries only. When using MapId
with multiple components,
use CrudRepository.findById(Object)
.
findAllById
in interface org.springframework.data.repository.CrudRepository<T,ID>
InvalidDataAccessApiUsageException
- thrown when using MapId
with multiple
key components.org.springframework.data.domain.Slice<T> findAll(org.springframework.data.domain.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–2023 Pivotal Software, Inc.. All rights reserved.