public interface CassandraOperations extends CqlOperations
| Modifier and Type | Method and Description |
|---|---|
long |
count(Class<?> type) |
<T> void |
delete(List<T> entities)
Remove the given object from the table by id.
|
<T> void |
delete(List<T> entities,
QueryOptions options) |
<T> void |
delete(T entity)
Remove the given object from the table by id.
|
<T> void |
delete(T entity,
QueryOptions options) |
<T> void |
deleteAll(Class<T> clazz)
Deletes all entities of a given class.
|
<T> Cancellable |
deleteAsynchronously(List<T> entities)
Remove the given objects from the table by id.
|
<T> Cancellable |
deleteAsynchronously(List<T> entities,
DeletionListener<T> listener)
Remove the given objects from the table by id.
|
<T> Cancellable |
deleteAsynchronously(List<T> entities,
DeletionListener<T> listener,
QueryOptions options)
Remove the given objects from the table by id.
|
<T> Cancellable |
deleteAsynchronously(List<T> entities,
QueryOptions options)
Remove the given objects from the table by id.
|
<T> Cancellable |
deleteAsynchronously(T entity)
Remove the given object from the table by id.
|
<T> Cancellable |
deleteAsynchronously(T entity,
DeletionListener<T> listener)
Remove the given object from the table by id.
|
<T> Cancellable |
deleteAsynchronously(T entity,
DeletionListener<T> listener,
QueryOptions options)
Remove the given object from the table by id.
|
<T> Cancellable |
deleteAsynchronously(T entity,
QueryOptions options)
Remove the given object from the table by id.
|
void |
deleteById(Class<?> type,
Object id) |
boolean |
exists(Class<?> type,
Object id) |
CassandraConverter |
getConverter()
Returns the underlying
CassandraConverter. |
CqlIdentifier |
getTableName(Class<?> entityClass)
The table name used for the specified class by this template.
|
<T> List<T> |
insert(List<T> entities)
Insert the given list of entities.
|
<T> List<T> |
insert(List<T> entities,
WriteOptions options)
Insert the given list of entities.
|
<T> T |
insert(T entity)
Insert the given entity.
|
<T> T |
insert(T entity,
WriteOptions options)
Insert the given entity.
|
<T> List<T> |
insertAsynchronously(List<T> entities)
Deprecated.
This method does not allow for query cancellation or notification of completion. Favor
insertAsynchronously(List, WriteListener). |
<T> Cancellable |
insertAsynchronously(List<T> entities,
WriteListener<T> listener)
Inserts the given entities asynchronously in a batch.
|
<T> Cancellable |
insertAsynchronously(List<T> entities,
WriteListener<T> listener,
WriteOptions options)
Inserts the given entities asynchronously in a batch.
|
<T> List<T> |
insertAsynchronously(List<T> entities,
WriteOptions options)
Deprecated.
This method does not allow for query cancellation or notification of completion. Favor
insertAsynchronously(List, WriteListener, WriteOptions). |
<T> T |
insertAsynchronously(T entity)
Deprecated.
This method does not allow for query cancellation or notification of completion. Favor
insertAsynchronously(Object, WriteListener). |
<T> Cancellable |
insertAsynchronously(T entity,
WriteListener<T> listener)
Inserts the given entity asynchronously.
|
<T> Cancellable |
insertAsynchronously(T entity,
WriteListener<T> listener,
WriteOptions options)
Inserts the given entity asynchronously.
|
<T> T |
insertAsynchronously(T entity,
WriteOptions options)
Deprecated.
This method does not allow for query cancellation or notification of completion. Favor
insertAsynchronously(Object, WriteListener, WriteOptions). |
<T> List<T> |
select(com.datastax.driver.core.querybuilder.Select select,
Class<T> type)
Execute the Select Query and convert to the list of entities
|
<T> List<T> |
select(String cql,
Class<T> type)
Execute query and convert ResultSet to the list of entities
|
<T> List<T> |
selectAll(Class<T> type)
Deprecated.
Calling this method could result in
OutOfMemoryError, as this is a brute force selection. |
<T> List<T> |
selectBySimpleIds(Class<T> type,
Iterable<?> ids) |
<T> T |
selectOne(com.datastax.driver.core.querybuilder.Select select,
Class<T> type)
Execute Select query and convert ResultSet to the entity
|
<T> T |
selectOne(String cql,
Class<T> type)
Execute CQL and convert ResultSet to the entity
|
<T> Cancellable |
selectOneAsynchronously(com.datastax.driver.core.querybuilder.Select select,
Class<T> type,
QueryForObjectListener<T> listener)
Executes the
Select query asynchronously. |
<T> Cancellable |
selectOneAsynchronously(com.datastax.driver.core.querybuilder.Select select,
Class<T> type,
QueryForObjectListener<T> listener,
QueryOptions options)
Executes the
Select query asynchronously. |
<T> Cancellable |
selectOneAsynchronously(String cql,
Class<T> type,
QueryForObjectListener<T> listener)
Executes the string CQL query asynchronously.
|
<T> Cancellable |
selectOneAsynchronously(String cql,
Class<T> type,
QueryForObjectListener<T> listener,
QueryOptions options)
Executes the string CQL query asynchronously.
|
<T> T |
selectOneById(Class<T> type,
Object id) |
<T> List<T> |
update(List<T> entities)
Update the given list of entities.
|
<T> List<T> |
update(List<T> entities,
WriteOptions options)
Update the given list of entities.
|
<T> T |
update(T entity)
Update the given entity.
|
<T> T |
update(T entity,
WriteOptions options)
Update the given entity.
|
<T> List<T> |
updateAsynchronously(List<T> entities)
Deprecated.
This method does not allow for query cancellation or notification of completion. Favor
updateAsynchronously(List, WriteListener). |
<T> Cancellable |
updateAsynchronously(List<T> entities,
WriteListener<T> listener)
Updates the given entities asynchronously in a batch.
|
<T> Cancellable |
updateAsynchronously(List<T> entities,
WriteListener<T> listener,
WriteOptions options)
Updates the given entities asynchronously in a batch.
|
<T> List<T> |
updateAsynchronously(List<T> entities,
WriteOptions options)
Deprecated.
This method does not allow for query cancellation or notification of completion. Favor
updateAsynchronously(List, WriteListener, WriteOptions). |
<T> T |
updateAsynchronously(T entity)
Deprecated.
This method does not allow for query cancellation or notification of completion. Favor
updateAsynchronously(Object, WriteListener). |
<T> Cancellable |
updateAsynchronously(T entity,
WriteListener<T> listener)
Updates the given entity asynchronously.
|
<T> Cancellable |
updateAsynchronously(T entity,
WriteListener<T> listener,
WriteOptions options)
Updates the given entity asynchronously.
|
<T> T |
updateAsynchronously(T entity,
WriteOptions options)
Deprecated.
This method does not allow for query cancellation or notification of completion. Favor
updateAsynchronously(Object, WriteListener, WriteOptions). |
count, count, describeRing, describeRing, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, execute, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, executeAsynchronously, getResultSetUninterruptibly, getResultSetUninterruptibly, getResultSetUninterruptibly, getSession, ingest, ingest, ingest, ingest, ingest, ingest, process, process, processList, processListOfMap, processMap, processOne, processOne, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, query, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryAsynchronously, queryForList, queryForList, queryForListAsynchronously, queryForListAsynchronously, queryForListOfMap, queryForListOfMap, queryForListOfMapAsynchronously, queryForListOfMapAsynchronously, queryForListOfMapAsynchronously, queryForMap, queryForMap, queryForMapAsynchronously, queryForMapAsynchronously, queryForMapAsynchronously, queryForObject, queryForObject, queryForObject, queryForObject, queryForObjectAsynchronously, queryForObjectAsynchronously, queryForObjectAsynchronously, queryForObjectAsynchronously, queryForObjectAsynchronously, queryForObjectAsynchronously, truncate, truncateCqlIdentifier getTableName(Class<?> entityClass)
entityClass - must not be null.<T> List<T> select(String cql, Class<T> type)
query - must not be null.type - must not be null, mapped entity type.<T> List<T> select(com.datastax.driver.core.querybuilder.Select select, Class<T> type)
select - must not be null.type - must not be null, mapped entity type.<T> T selectOne(String cql, Class<T> type)
query - must not be null.type - must not be null, mapped entity type.<T> Cancellable selectOneAsynchronously(com.datastax.driver.core.querybuilder.Select select, Class<T> type, QueryForObjectListener<T> listener)
Select query asynchronously.select - The Select query to execute.type - The type of entity to retrieve.Cancellable that can be used to cancel the query.<T> Cancellable selectOneAsynchronously(String cql, Class<T> type, QueryForObjectListener<T> listener)
select - The string query CQL to execute.type - The type of entity to retrieve.Cancellable that can be used to cancel the query.<T> Cancellable selectOneAsynchronously(com.datastax.driver.core.querybuilder.Select select, Class<T> type, QueryForObjectListener<T> listener, QueryOptions options)
Select query asynchronously.select - The Select query to execute.type - The type of entity to retrieve.options - The QueryOptions to use.Cancellable that can be used to cancel the query.<T> Cancellable selectOneAsynchronously(String cql, Class<T> type, QueryForObjectListener<T> listener, QueryOptions options)
select - The string query CQL to execute.type - The type of entity to retrieve.options - The QueryOptions to use.Cancellable that can be used to cancel the query.<T> T selectOne(com.datastax.driver.core.querybuilder.Select select,
Class<T> type)
query - must not be null.type - must not be null, mapped entity type.long count(Class<?> type)
<T> T insert(T entity)
entity - The entity to insert<T> T insert(T entity,
WriteOptions options)
entity - The entity to insertoptions - The WriteOptions to use.<T> List<T> insert(List<T> entities)
entities - The entities to insert.<T> List<T> insert(List<T> entities, WriteOptions options)
entities - The entities to insert.options - The WriteOptions to use.@Deprecated <T> T insertAsynchronously(T entity)
insertAsynchronously(Object, WriteListener).entity - The entity to insertinsertAsynchronously(Object, WriteListener)@Deprecated <T> T insertAsynchronously(T entity, WriteOptions options)
insertAsynchronously(Object, WriteListener, WriteOptions).entity - The entity to insertinsertAsynchronously(Object, WriteOptions)<T> Cancellable insertAsynchronously(T entity, WriteListener<T> listener)
entity - The entity to insertlistener - The listener to receive notification of completionCancellable enabling the cancellation of the operation<T> Cancellable insertAsynchronously(T entity, WriteListener<T> listener, WriteOptions options)
entity - The entity to insertlistener - The listener to receive notification of completionoptions - The WriteOptions to useCancellable enabling the cancellation of the operation@Deprecated <T> List<T> insertAsynchronously(List<T> entities)
insertAsynchronously(List, WriteListener).entity - The entities to insertinsertAsynchronously(List, WriteListener)@Deprecated <T> List<T> insertAsynchronously(List<T> entities, WriteOptions options)
insertAsynchronously(List, WriteListener, WriteOptions).entity - The entities to insertinsertAsynchronously(List, WriteListener, WriteOptions)<T> Cancellable insertAsynchronously(List<T> entities, WriteListener<T> listener)
entity - The entities to insertlistener - The listener to receive notification of completionCancellable enabling the cancellation of the operation<T> Cancellable insertAsynchronously(List<T> entities, WriteListener<T> listener, WriteOptions options)
entity - The entities to insertlistener - The listener to receive notification of completionoptions - The WriteOptions to useCancellable enabling the cancellation of the operation<T> T update(T entity)
entity - The entity to update<T> T update(T entity,
WriteOptions options)
entity - The entity to updateoptions - The WriteOptions to use.<T> List<T> update(List<T> entities)
entities - The entities to update.<T> List<T> update(List<T> entities, WriteOptions options)
entities - The entities to update.options - The WriteOptions to use.@Deprecated <T> T updateAsynchronously(T entity)
updateAsynchronously(Object, WriteListener).entity - The entity to updateupdateAsynchronously(Object, WriteListener)@Deprecated <T> T updateAsynchronously(T entity, WriteOptions options)
updateAsynchronously(Object, WriteListener, WriteOptions).entity - The entity to updateupdateAsynchronously(Object, WriteOptions)<T> Cancellable updateAsynchronously(T entity, WriteListener<T> listener)
entity - The entity to updatelistener - The listener to receive notification of completionCancellable enabling the cancellation of the operation<T> Cancellable updateAsynchronously(T entity, WriteListener<T> listener, WriteOptions options)
entity - The entity to updatelistener - The listener to receive notification of completionoptions - The WriteOptions to useCancellable enabling the cancellation of the operation@Deprecated <T> List<T> updateAsynchronously(List<T> entities)
updateAsynchronously(List, WriteListener).entity - The entities to updateupdateAsynchronously(List, WriteListener)@Deprecated <T> List<T> updateAsynchronously(List<T> entities, WriteOptions options)
updateAsynchronously(List, WriteListener, WriteOptions).entity - The entities to updateupdateAsynchronously(List, WriteListener, WriteOptions)<T> Cancellable updateAsynchronously(List<T> entities, WriteListener<T> listener)
entity - The entities to updatelistener - The listener to receive notification of completionCancellable enabling the cancellation of the operation<T> Cancellable updateAsynchronously(List<T> entities, WriteListener<T> listener, WriteOptions options)
entity - The entities to updatelistener - The listener to receive notification of completionoptions - The WriteOptions to useCancellable enabling the cancellation of the operation<T> void delete(T entity)
object - <T> void delete(T entity,
QueryOptions options)
entity - tableName - options - <T> void delete(List<T> entities)
object - <T> void delete(List<T> entities, QueryOptions options)
<T> void deleteAll(Class<T> clazz)
<T> Cancellable deleteAsynchronously(T entity)
entity - The object to delete<T> Cancellable deleteAsynchronously(T entity, QueryOptions options)
entity - The object to deleteoptions - The QueryOptions to use<T> Cancellable deleteAsynchronously(T entity, DeletionListener<T> listener)
entity - The object to deletelistener - The DeletionListener to receive notification upon completion<T> Cancellable deleteAsynchronously(T entity, DeletionListener<T> listener, QueryOptions options)
entity - The object to deletelistener - The DeletionListener to receive notification upon completionoptions - The QueryOptions to use<T> Cancellable deleteAsynchronously(List<T> entities)
entities - The objects to delete<T> Cancellable deleteAsynchronously(List<T> entities, DeletionListener<T> listener)
entities - The objects to deletelistener - The DeletionListener to receive notification upon completion<T> Cancellable deleteAsynchronously(List<T> entities, QueryOptions options)
entities - The objects to deleteoptions - The QueryOptions to use<T> Cancellable deleteAsynchronously(List<T> entities, DeletionListener<T> listener, QueryOptions options)
entities - The objects to deletelistener - The DeletionListener to receive notification upon completionoptions - The QueryOptions to useCassandraConverter getConverter()
CassandraConverter.@Deprecated <T> List<T> selectAll(Class<T> type)
OutOfMemoryError, as this is a brute force selection.type - The type of entity to select.T.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.