public interface ReactiveCassandraOperations
ReactiveCassandraTemplate.
Not often used directly, but a useful option to enhance testability, as it can easily be mocked or stubbed.ReactiveCassandraTemplate,
ReactiveCqlOperations,
Statement,
InsertOptions,
UpdateOptions,
Flux,
Mono| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Long> |
count(Class<?> entityClass)
Returns the number of rows for the given entity class.
|
reactor.core.publisher.Mono<WriteResult> |
delete(Object entity,
QueryOptions options)
Delete the given entity applying
QueryOptions and emit the entity if the delete was applied. |
reactor.core.publisher.Mono<Boolean> |
delete(Query query,
Class<?> entityClass)
Remove entities (rows)/columns from the table by
Query. |
<T> reactor.core.publisher.Mono<T> |
delete(T entity)
Delete the given entity and emit the entity if the delete was applied.
|
reactor.core.publisher.Mono<Boolean> |
deleteById(Object id,
Class<?> entityClass)
Remove the given object from the table by id.
|
reactor.core.publisher.Mono<Boolean> |
exists(Object id,
Class<?> entityClass)
Determine whether the row
entityClass with the given id exists. |
CassandraConverter |
getConverter()
Returns the underlying
CassandraConverter. |
ReactiveCqlOperations |
getReactiveCqlOperations()
Expose the underlying
ReactiveCqlOperations to allow CQL operations. |
reactor.core.publisher.Mono<WriteResult> |
insert(Object entity,
InsertOptions options)
Insert the given entity applying
WriteOptions and emit the entity if the insert was applied. |
<T> reactor.core.publisher.Mono<T> |
insert(T entity)
Insert the given entity and emit the entity if the insert was applied.
|
<T> reactor.core.publisher.Flux<T> |
select(Query query,
Class<T> entityClass)
Execute a
SELECT query and convert the resulting items to a stream of entities. |
<T> reactor.core.publisher.Flux<T> |
select(com.datastax.driver.core.Statement statement,
Class<T> entityClass)
Execute a
SELECT query and convert the resulting items to a stream of entities. |
<T> reactor.core.publisher.Flux<T> |
select(String cql,
Class<T> entityClass)
Execute a
SELECT query and convert the resulting items to a stream of entities. |
<T> reactor.core.publisher.Mono<T> |
selectOne(Query query,
Class<T> entityClass)
Execute a
SELECT query and convert the resulting item to an entity. |
<T> reactor.core.publisher.Mono<T> |
selectOne(com.datastax.driver.core.Statement statement,
Class<T> entityClass)
Execute a
SELECT query and convert the resulting item to an entity. |
<T> reactor.core.publisher.Mono<T> |
selectOne(String cql,
Class<T> entityClass)
Execute a
SELECT query and convert the resulting item to an entity. |
<T> reactor.core.publisher.Mono<T> |
selectOneById(Object id,
Class<T> entityClass)
Execute the Select by
id for the given entityClass. |
reactor.core.publisher.Mono<Void> |
truncate(Class<?> entityClass)
Execute a
TRUNCATE query to remove all entities of a given class. |
reactor.core.publisher.Mono<WriteResult> |
update(Object entity,
UpdateOptions options)
Update the given entity applying
WriteOptions and emit the entity if the update was applied. |
reactor.core.publisher.Mono<Boolean> |
update(Query query,
Update update,
Class<?> entityClass)
Update the queried entities and return true if the update was applied.
|
<T> reactor.core.publisher.Mono<T> |
update(T entity)
Update the given entity and emit the entity if the update was applied.
|
CassandraConverter getConverter()
CassandraConverter.CassandraConverter.ReactiveCqlOperations getReactiveCqlOperations()
ReactiveCqlOperations to allow CQL operations.ReactiveCqlOperations.ReactiveCqlOperations<T> reactor.core.publisher.Flux<T> select(String cql, Class<T> entityClass) throws DataAccessException
SELECT query and convert the resulting items to a stream of entities.cql - must not be null.entityClass - The entity type must not be null.DataAccessException - if there is any problem issuing the execution.<T> reactor.core.publisher.Mono<T> selectOne(String cql, Class<T> entityClass) throws DataAccessException
SELECT query and convert the resulting item to an entity.cql - must not be null.entityClass - The entity type must not be null.Mono.empty()DataAccessException - if there is any problem issuing the execution.<T> reactor.core.publisher.Flux<T> select(com.datastax.driver.core.Statement statement,
Class<T> entityClass)
throws DataAccessException
SELECT query and convert the resulting items to a stream of entities.statement - must not be null.entityClass - The entity type must not be null.DataAccessException - if there is any problem issuing the execution.<T> reactor.core.publisher.Mono<T> selectOne(com.datastax.driver.core.Statement statement,
Class<T> entityClass)
throws DataAccessException
SELECT query and convert the resulting item to an entity.statement - must not be null.entityClass - The entity type must not be null.Mono.empty()DataAccessException - if there is any problem issuing the execution.<T> reactor.core.publisher.Flux<T> select(Query query, Class<T> entityClass) throws DataAccessException
SELECT query and convert the resulting items to a stream of entities.query - must not be null.entityClass - The entity type must not be null.DataAccessException - if there is any problem issuing the execution.<T> reactor.core.publisher.Mono<T> selectOne(Query query, Class<T> entityClass) throws DataAccessException
SELECT query and convert the resulting item to an entity.query - must not be null.entityClass - The entity type must not be null.Mono.empty()DataAccessException - if there is any problem issuing the execution.reactor.core.publisher.Mono<Boolean> update(Query query, Update update, Class<?> entityClass) throws DataAccessException
query - must not be null.update - must not be null.entityClass - The entity type must not be null.DataAccessException - if there is any problem executing the query.reactor.core.publisher.Mono<Boolean> delete(Query query, Class<?> entityClass) throws DataAccessException
Query.query - must not be null.entityClass - The entity type must not be null.DataAccessException - if there is any problem issuing the execution.reactor.core.publisher.Mono<Long> count(Class<?> entityClass) throws DataAccessException
entityClass - must not be null.DataAccessException - if there is any problem issuing the execution.reactor.core.publisher.Mono<Boolean> exists(Object id, Class<?> entityClass) throws DataAccessException
entityClass with the given id exists.id - the Id value. For single primary keys it's the plain value. For composite primary keys either the
PrimaryKeyClass or
MapId. Must not be null.entityClass - must not be null.DataAccessException - if there is any problem issuing the execution.<T> reactor.core.publisher.Mono<T> selectOneById(Object id, Class<T> entityClass) throws DataAccessException
id for the given entityClass.id - the Id value. For single primary keys it's the plain value. For composite primary keys either the
PrimaryKeyClass or
MapId. Must not be null.entityClass - The entity type must not be null.Mono.empty()DataAccessException - if there is any problem issuing the execution.<T> reactor.core.publisher.Mono<T> insert(T entity)
throws DataAccessException
entity - The entity to insert, must not be null.DataAccessException - if there is any problem issuing the execution.reactor.core.publisher.Mono<WriteResult> insert(Object entity, InsertOptions options) throws DataAccessException
WriteOptions and emit the entity if the insert was applied.entity - The entity to insert, must not be null.options - must not be null.WriteResult for this operation.DataAccessException - if there is any problem issuing the execution.InsertOptions.empty()<T> reactor.core.publisher.Mono<T> update(T entity)
throws DataAccessException
entity - The entity to update, must not be null.DataAccessException - if there is any problem issuing the execution.reactor.core.publisher.Mono<WriteResult> update(Object entity, UpdateOptions options) throws DataAccessException
WriteOptions and emit the entity if the update was applied.entity - The entity to update, must not be null.options - must not be null.WriteResult for this operation.DataAccessException - if there is any problem issuing the execution.UpdateOptions.empty()<T> reactor.core.publisher.Mono<T> delete(T entity)
throws DataAccessException
entity - must not be null.DataAccessException - if there is any problem issuing the execution.reactor.core.publisher.Mono<WriteResult> delete(Object entity, QueryOptions options) throws DataAccessException
QueryOptions and emit the entity if the delete was applied.entity - must not be null.options - must not be null.WriteResult for this operation.DataAccessException - if there is any problem issuing the execution.QueryOptions.empty()reactor.core.publisher.Mono<Boolean> deleteById(Object id, Class<?> entityClass) throws DataAccessException
id - the Id value. For single primary keys it's the plain value. For composite primary keys either the
PrimaryKeyClass or
MapId. Must not be null.entityClass - The entity type must not be null.DataAccessException - if there is any problem issuing the execution.reactor.core.publisher.Mono<Void> truncate(Class<?> entityClass) throws DataAccessException
TRUNCATE query to remove all entities of a given class.entityClass - The entity type must not be null.DataAccessException - if there is any problem issuing the execution.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.