public class CassandraTemplate extends CqlTemplate implements CassandraOperations
CqlTemplate.CqlTemplate| Modifier and Type | Class and Description |
|---|---|
protected static interface |
CassandraTemplate.ClauseCallback |
| Modifier and Type | Field and Description |
|---|---|
protected CassandraConverter |
cassandraConverter |
protected CassandraMappingContext |
mappingContext |
loglogger| Constructor and Description |
|---|
CassandraTemplate()
Default Constructor for wiring in the required components later
|
CassandraTemplate(com.datastax.driver.core.Session session) |
CassandraTemplate(com.datastax.driver.core.Session session,
CassandraConverter converter)
Constructor if only session and converter are known at time of Template Creation
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
protected void |
appendIdCriteria(CassandraTemplate.ClauseCallback clauseCallback,
CassandraPersistentEntity<?> entity,
Map<?,?> id) |
protected void |
appendIdCriteria(CassandraTemplate.ClauseCallback clauseCallback,
CassandraPersistentEntity<?> entity,
Object id) |
protected void |
appendIdCriteria(com.datastax.driver.core.querybuilder.Delete.Where where,
CassandraPersistentEntity<?> entity,
Object id) |
protected void |
appendIdCriteria(com.datastax.driver.core.querybuilder.Select.Where where,
CassandraPersistentEntity<?> entity,
Object id) |
long |
count(Class<?> type) |
static <T> com.datastax.driver.core.querybuilder.Batch |
createDeleteBatchQuery(String tableName,
List<T> entities,
QueryOptions options,
EntityWriter<Object,Object> entityWriter)
Create a Batch Query object for multiple deletes.
|
static com.datastax.driver.core.querybuilder.Delete |
createDeleteQuery(String tableName,
Object object,
QueryOptions options,
EntityWriter<Object,Object> entityWriter)
Create a Delete Query Object from an annotated POJO
|
static <T> com.datastax.driver.core.querybuilder.Batch |
createInsertBatchQuery(String tableName,
List<T> entities,
WriteOptions options,
EntityWriter<Object,Object> entityWriter)
Generates a Batch Object for multiple inserts
|
static com.datastax.driver.core.querybuilder.Insert |
createInsertQuery(String tableName,
Object objectToSave,
WriteOptions options,
EntityWriter<Object,Object> entityWriter)
Generates a Query Object for an insert
|
static <T> com.datastax.driver.core.querybuilder.Batch |
createUpdateBatchQuery(String tableName,
List<T> objectsToSave,
WriteOptions options,
EntityWriter<Object,Object> entityWriter)
Generates a Batch Object for multiple Updates
|
static com.datastax.driver.core.querybuilder.Update |
createUpdateQuery(String tableName,
Object objectToSave,
WriteOptions options,
EntityWriter<Object,Object> entityWriter)
Generates a Query Object for an Update
|
<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) |
protected <T> void |
doBatchDelete(List<T> entities,
QueryOptions options) |
protected <T> Cancellable |
doBatchDeleteAsync(List<T> entities,
DeletionListener listener,
QueryOptions options) |
protected <T> List<T> |
doBatchInsert(List<T> entities,
WriteOptions options) |
protected <T> Cancellable |
doBatchInsertAsync(List<T> entities,
WriteListener<T> listener,
WriteOptions options)
Asynchronously performs a batch insert or update.
|
protected <T> List<T> |
doBatchUpdate(List<T> entities,
WriteOptions options) |
protected <T> Cancellable |
doBatchUpdateAsync(List<T> entities,
WriteListener<T> listener,
WriteOptions options)
Asynchronously performs a batch insert or update.
|
protected <T> List<T> |
doBatchWrite(List<T> entities,
WriteOptions options,
boolean insert) |
protected <T> Cancellable |
doBatchWriteAsync(List<T> entities,
WriteListener<T> listener,
WriteOptions options,
boolean insert)
Asynchronously performs a batch insert or update.
|
protected <T> void |
doDelete(T entity,
QueryOptions options) |
protected <T> Cancellable |
doDeleteAsync(T entity,
DeletionListener listener,
QueryOptions options) |
protected <T> T |
doInsert(T entity,
WriteOptions options) |
protected <T> Cancellable |
doInsertAsync(T entity,
WriteListener<T> listener,
WriteOptions options) |
protected <T> Cancellable |
doInsertAsynchronously(List<T> entities,
WriteListener<T> listener,
WriteOptions options)
This method resolves ambiguity the compiler sees as a result of type erasure between
insertAsynchronously(Object, WriteListener, WriteOptions) and #insertAsynchronously(List. |
protected <T> Cancellable |
doSelectOneAsync(Object query,
Class<T> type,
QueryForObjectListener<T> listener,
QueryOptions options) |
protected <T> T |
doUpdate(T entity,
WriteOptions options) |
protected <T> Cancellable |
doUpdateAsync(T entity,
WriteListener<T> listener,
WriteOptions options) |
protected <T> Cancellable |
doUpdateAsynchronously(List<T> entities,
WriteListener<T> listener,
WriteOptions options)
This method resolves ambiguity the compiler sees as a result of type erasure between
updateAsynchronously(Object, WriteListener, WriteOptions) and #updateAsynchronously(List. |
boolean |
exists(Class<?> type,
Object id) |
CassandraMappingContext |
getCassandraMappingContext() |
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.
|
<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.
|
<T> T |
insertAsynchronously(T entity)
Deprecated.
See
CqlOperations#insert(Object) |
<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.
See
CqlOperations#insert(Object,WriteOptions) |
protected <T> List<T> |
select(com.datastax.driver.core.querybuilder.Select query,
CassandraConverterRowCallback<T> readRowCallback) |
<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
|
protected <T> List<T> |
select(String query,
CassandraConverterRowCallback<T> readRowCallback) |
<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) |
<T> List<T> |
selectBySimpleIds(Class<T> type,
Iterable<?> ids) |
protected <T> T |
selectOne(com.datastax.driver.core.querybuilder.Select query,
CassandraConverterRowCallback<T> readRowCallback) |
<T> T |
selectOne(com.datastax.driver.core.querybuilder.Select select,
Class<T> type)
Execute Select query and convert ResultSet to the entity
|
protected <T> T |
selectOne(String query,
CassandraConverterRowCallback<T> readRowCallback) |
<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) |
void |
setConverter(CassandraConverter cassandraConverter)
Set the
CassandraConverter used by this template to perform conversions. |
static <T> com.datastax.driver.core.querybuilder.Batch |
toUpdateBatchQuery(String tableName,
List<T> objectsToSave,
WriteOptions options,
EntityWriter<Object,Object> entityWriter)
Deprecated.
Method renamed. Use
createUpdateBatchQuery(String, List, WriteOptions, EntityWriter) |
static com.datastax.driver.core.querybuilder.Update |
toUpdateQueryX(String tableName,
Object objectToSave,
WriteOptions options,
EntityWriter<Object,Object> entityWriter)
Deprecated.
Method renamed. Use
createUpdateQuery(String, Object, WriteOptions, EntityWriter) |
<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)
Updates the given entities asynchronously in a batch.
|
<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)
Updates the given entities asynchronously in a batch.
|
<T> T |
updateAsynchronously(T entity)
Updates the given entity asynchronously.
|
<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)
Updates the given entity asynchronously.
|
addPreparedStatementOptions, addQueryOptions, addWriteOptions, addWriteOptions, count, count, describeRing, describeRing, doExecute, doExecute, doExecute, doExecute, doExecuteAsync, doExecuteAsync, doExecuteAsync, 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, firstColumnToObject, getHosts, getResultSetUninterruptibly, getResultSetUninterruptibly, getResultSetUninterruptibly, 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, 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, selectCount, toMap, translateExceptionIfPossible, translateExceptionIfPossible, truncate, truncategetExceptionTranslator, getSession, setExceptionTranslator, setSessionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcount, 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, truncateprotected CassandraConverter cassandraConverter
protected CassandraMappingContext mappingContext
public CassandraTemplate()
public CassandraTemplate(com.datastax.driver.core.Session session)
public CassandraTemplate(com.datastax.driver.core.Session session,
CassandraConverter converter)
session - must not be nullconverter - must not be null.public void setConverter(CassandraConverter cassandraConverter)
CassandraConverter used by this template to perform conversions.cassandraConverter - Converter used to perform conversion of Cassandra data types to entity types.
Must not be null.public CassandraConverter getConverter()
CassandraOperationsCassandraConverter.getConverter in interface CassandraOperationspublic CassandraMappingContext getCassandraMappingContext()
public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class CassandraAccessorpublic boolean exists(Class<?> type, Object id)
exists in interface CassandraOperationspublic long count(Class<?> type)
count in interface CassandraOperationspublic <T> void delete(List<T> entities)
CassandraOperationsdelete in interface CassandraOperationspublic <T> void delete(List<T> entities, QueryOptions options)
delete in interface CassandraOperationspublic void deleteById(Class<?> type, Object id)
deleteById in interface CassandraOperationspublic <T> void delete(T entity)
CassandraOperationsdelete in interface CassandraOperationspublic <T> void delete(T entity,
QueryOptions options)
delete in interface CassandraOperationspublic <T> Cancellable deleteAsynchronously(List<T> entities)
CassandraOperationsdeleteAsynchronously in interface CassandraOperationsentities - The objects to deletepublic <T> Cancellable deleteAsynchronously(List<T> entities, QueryOptions options)
CassandraOperationsdeleteAsynchronously in interface CassandraOperationsentities - The objects to deleteoptions - The QueryOptions to usepublic <T> Cancellable deleteAsynchronously(List<T> entities, DeletionListener<T> listener)
CassandraOperationsdeleteAsynchronously in interface CassandraOperationsentities - The objects to deletelistener - The DeletionListener to receive notification upon completionpublic <T> Cancellable deleteAsynchronously(List<T> entities, DeletionListener<T> listener, QueryOptions options)
CassandraOperationsdeleteAsynchronously in interface CassandraOperationsentities - The objects to deletelistener - The DeletionListener to receive notification upon completionoptions - The QueryOptions to usepublic <T> Cancellable deleteAsynchronously(T entity)
CassandraOperationsdeleteAsynchronously in interface CassandraOperationsentity - The object to deletepublic <T> Cancellable deleteAsynchronously(T entity, QueryOptions options)
CassandraOperationsdeleteAsynchronously in interface CassandraOperationsentity - The object to deleteoptions - The QueryOptions to usepublic <T> Cancellable deleteAsynchronously(T entity, DeletionListener<T> listener)
CassandraOperationsdeleteAsynchronously in interface CassandraOperationsentity - The object to deletelistener - The DeletionListener to receive notification upon completionpublic <T> Cancellable deleteAsynchronously(T entity, DeletionListener<T> listener, QueryOptions options)
CassandraOperationsdeleteAsynchronously in interface CassandraOperationsentity - The object to deletelistener - The DeletionListener to receive notification upon completionoptions - The QueryOptions to usepublic CqlIdentifier getTableName(Class<?> entityClass)
CassandraOperationsgetTableName in interface CassandraOperationsentityClass - must not be null.public <T> List<T> insert(List<T> entities)
CassandraOperationsinsert in interface CassandraOperationsentities - The entities to insert.public <T> List<T> insert(List<T> entities, WriteOptions options)
CassandraOperationsinsert in interface CassandraOperationsentities - The entities to insert.options - The WriteOptions to use.public <T> T insert(T entity)
CassandraOperationsinsert in interface CassandraOperationsentity - The entity to insertpublic <T> T insert(T entity,
WriteOptions options)
CassandraOperationsinsert in interface CassandraOperationsentity - The entity to insertoptions - The WriteOptions to use.@Deprecated public <T> List<T> insertAsynchronously(List<T> entities)
insertAsynchronously(List)CassandraOperationsinsertAsynchronously in interface CassandraOperationsCassandraOperations.insertAsynchronously(List, WriteListener)@Deprecated public <T> List<T> insertAsynchronously(List<T> entities, WriteOptions options)
insertAsynchronously(List, WriteOptions)CassandraOperationsinsertAsynchronously in interface CassandraOperationsCassandraOperations.insertAsynchronously(List, WriteListener, WriteOptions)public <T> Cancellable insertAsynchronously(List<T> entities, WriteListener<T> listener)
CassandraOperationsinsertAsynchronously in interface CassandraOperationslistener - The listener to receive notification of completionCancellable enabling the cancellation of the operationpublic <T> Cancellable insertAsynchronously(List<T> entities, WriteListener<T> listener, WriteOptions options)
CassandraOperationsinsertAsynchronously in interface CassandraOperationslistener - The listener to receive notification of completionoptions - The WriteOptions to useCancellable enabling the cancellation of the operationprotected <T> Cancellable doInsertAsynchronously(List<T> entities, WriteListener<T> listener, WriteOptions options)
insertAsynchronously(Object, WriteListener, WriteOptions) and #insertAsynchronously(List,
WriteListener, WriteOptions) .@Deprecated public <T> T insertAsynchronously(T entity)
CqlOperations#insert(Object)CassandraOperationsinsertAsynchronously in interface CassandraOperationsentity - The entity to insertCassandraOperations.insertAsynchronously(Object, WriteListener)@Deprecated public <T> T insertAsynchronously(T entity, WriteOptions options)
CqlOperations#insert(Object,WriteOptions)CassandraOperationsinsertAsynchronously in interface CassandraOperationsentity - The entity to insertCassandraOperations.insertAsynchronously(Object, WriteOptions)public <T> Cancellable insertAsynchronously(T entity, WriteListener<T> listener)
CassandraOperationsinsertAsynchronously in interface CassandraOperationsentity - The entity to insertlistener - The listener to receive notification of completionCancellable enabling the cancellation of the operationpublic <T> Cancellable insertAsynchronously(T entity, WriteListener<T> listener, WriteOptions options)
CassandraOperationsinsertAsynchronously in interface CassandraOperationsentity - The entity to insertlistener - The listener to receive notification of completionoptions - The WriteOptions to useCancellable enabling the cancellation of the operationpublic <T> List<T> selectAll(Class<T> type)
selectAll in interface CassandraOperationstype - The type of entity to select.T.public <T> List<T> select(String cql, Class<T> type)
CassandraOperationsselect in interface CassandraOperationstype - must not be null, mapped entity type.public <T> List<T> select(com.datastax.driver.core.querybuilder.Select select, Class<T> type)
CassandraOperationsselect in interface CassandraOperationsselect - must not be null.type - must not be null, mapped entity type.public <T> List<T> selectBySimpleIds(Class<T> type, Iterable<?> ids)
selectBySimpleIds in interface CassandraOperationspublic <T> T selectOneById(Class<T> type, Object id)
selectOneById in interface CassandraOperationsprotected void appendIdCriteria(CassandraTemplate.ClauseCallback clauseCallback, CassandraPersistentEntity<?> entity, Map<?,?> id)
protected void appendIdCriteria(CassandraTemplate.ClauseCallback clauseCallback, CassandraPersistentEntity<?> entity, Object id)
protected void appendIdCriteria(com.datastax.driver.core.querybuilder.Select.Where where,
CassandraPersistentEntity<?> entity,
Object id)
protected void appendIdCriteria(com.datastax.driver.core.querybuilder.Delete.Where where,
CassandraPersistentEntity<?> entity,
Object id)
public <T> T selectOne(String cql, Class<T> type)
CassandraOperationsselectOne in interface CassandraOperationstype - must not be null, mapped entity type.public <T> T selectOne(com.datastax.driver.core.querybuilder.Select select,
Class<T> type)
CassandraOperationsselectOne in interface CassandraOperationstype - must not be null, mapped entity type.public <T> List<T> update(List<T> entities)
CassandraOperationsupdate in interface CassandraOperationsentities - The entities to update.public <T> List<T> update(List<T> entities, WriteOptions options)
CassandraOperationsupdate in interface CassandraOperationsentities - The entities to update.options - The WriteOptions to use.public <T> T update(T entity)
CassandraOperationsupdate in interface CassandraOperationsentity - The entity to updatepublic <T> T update(T entity,
WriteOptions options)
CassandraOperationsupdate in interface CassandraOperationsentity - The entity to updateoptions - The WriteOptions to use.public <T> List<T> updateAsynchronously(List<T> entities)
CassandraOperationsupdateAsynchronously in interface CassandraOperationsCassandraOperations.updateAsynchronously(List, WriteListener)public <T> List<T> updateAsynchronously(List<T> entities, WriteOptions options)
CassandraOperationsupdateAsynchronously in interface CassandraOperationsCassandraOperations.updateAsynchronously(List, WriteListener, WriteOptions)public <T> Cancellable updateAsynchronously(List<T> entities, WriteListener<T> listener)
CassandraOperationsupdateAsynchronously in interface CassandraOperationslistener - The listener to receive notification of completionCancellable enabling the cancellation of the operationpublic <T> Cancellable updateAsynchronously(List<T> entities, WriteListener<T> listener, WriteOptions options)
CassandraOperationsupdateAsynchronously in interface CassandraOperationslistener - The listener to receive notification of completionoptions - The WriteOptions to useCancellable enabling the cancellation of the operationprotected <T> Cancellable doUpdateAsynchronously(List<T> entities, WriteListener<T> listener, WriteOptions options)
updateAsynchronously(Object, WriteListener, WriteOptions) and #updateAsynchronously(List,
WriteListener, WriteOptions) .public <T> T updateAsynchronously(T entity)
CassandraOperationsupdateAsynchronously in interface CassandraOperationsentity - The entity to updateCassandraOperations.updateAsynchronously(Object, WriteListener)public <T> T updateAsynchronously(T entity,
WriteOptions options)
CassandraOperationsupdateAsynchronously in interface CassandraOperationsentity - The entity to updateCassandraOperations.updateAsynchronously(Object, WriteOptions)public <T> Cancellable updateAsynchronously(T entity, WriteListener<T> listener)
CassandraOperationsupdateAsynchronously in interface CassandraOperationsentity - The entity to updatelistener - The listener to receive notification of completionCancellable enabling the cancellation of the operationpublic <T> Cancellable updateAsynchronously(T entity, WriteListener<T> listener, WriteOptions options)
CassandraOperationsupdateAsynchronously in interface CassandraOperationsentity - The entity to updatelistener - The listener to receive notification of completionoptions - The WriteOptions to useCancellable enabling the cancellation of the operationprotected <T> List<T> select(String query, CassandraConverterRowCallback<T> readRowCallback)
protected <T> List<T> select(com.datastax.driver.core.querybuilder.Select query, CassandraConverterRowCallback<T> readRowCallback)
protected <T> T selectOne(String query, CassandraConverterRowCallback<T> readRowCallback)
query - readRowCallback - protected <T> T selectOne(com.datastax.driver.core.querybuilder.Select query,
CassandraConverterRowCallback<T> readRowCallback)
protected <T> void doBatchDelete(List<T> entities, QueryOptions options)
protected <T> Cancellable doBatchDeleteAsync(List<T> entities, DeletionListener listener, QueryOptions options)
protected <T> T doInsert(T entity,
WriteOptions options)
protected <T> Cancellable doInsertAsync(T entity, WriteListener<T> listener, WriteOptions options)
protected <T> List<T> doBatchInsert(List<T> entities, WriteOptions options)
protected <T> List<T> doBatchUpdate(List<T> entities, WriteOptions options)
protected <T> List<T> doBatchWrite(List<T> entities, WriteOptions options, boolean insert)
protected <T> Cancellable doBatchInsertAsync(List<T> entities, WriteListener<T> listener, WriteOptions options)
entities - The entities to insert or update.listener - The listener that will receive notification of the completion of the batch insert or update. May be
null.options - The WriteOptions to use. May be null.Cancellable that can be used to cancel the query if necessary.protected <T> Cancellable doBatchUpdateAsync(List<T> entities, WriteListener<T> listener, WriteOptions options)
entities - The entities to insert or update.listener - The listener that will receive notification of the completion of the batch insert or update. May be
null.options - The WriteOptions to use. May be null.Cancellable that can be used to cancel the query if necessary.protected <T> Cancellable doBatchWriteAsync(List<T> entities, WriteListener<T> listener, WriteOptions options, boolean insert)
entities - The entities to insert or update.listener - The listener that will receive notification of the completion of the batch insert or update. May be
null.options - The WriteOptions to use. May be null.insert - If true, then an insert is performed, else an update is performed.Cancellable that can be used to cancel the query if necessary.protected <T> void doDelete(T entity,
QueryOptions options)
protected <T> Cancellable doDeleteAsync(T entity, DeletionListener listener, QueryOptions options)
protected <T> T doUpdate(T entity,
WriteOptions options)
protected <T> Cancellable doUpdateAsync(T entity, WriteListener<T> listener, WriteOptions options)
public static com.datastax.driver.core.querybuilder.Insert createInsertQuery(String tableName, Object objectToSave, WriteOptions options, EntityWriter<Object,Object> entityWriter)
@Deprecated public static com.datastax.driver.core.querybuilder.Update toUpdateQueryX(String tableName, Object objectToSave, WriteOptions options, EntityWriter<Object,Object> entityWriter)
createUpdateQuery(String, Object, WriteOptions, EntityWriter)public static com.datastax.driver.core.querybuilder.Update createUpdateQuery(String tableName, Object objectToSave, WriteOptions options, EntityWriter<Object,Object> entityWriter)
@Deprecated public static <T> com.datastax.driver.core.querybuilder.Batch toUpdateBatchQuery(String tableName, List<T> objectsToSave, WriteOptions options, EntityWriter<Object,Object> entityWriter)
createUpdateBatchQuery(String, List, WriteOptions, EntityWriter)public static <T> com.datastax.driver.core.querybuilder.Batch createUpdateBatchQuery(String tableName, List<T> objectsToSave, WriteOptions options, EntityWriter<Object,Object> entityWriter)
public static <T> com.datastax.driver.core.querybuilder.Batch createInsertBatchQuery(String tableName, List<T> entities, WriteOptions options, EntityWriter<Object,Object> entityWriter)
public static com.datastax.driver.core.querybuilder.Delete createDeleteQuery(String tableName, Object object, QueryOptions options, EntityWriter<Object,Object> entityWriter)
public static <T> com.datastax.driver.core.querybuilder.Batch createDeleteBatchQuery(String tableName, List<T> entities, QueryOptions options, EntityWriter<Object,Object> entityWriter)
public <T> void deleteAll(Class<T> clazz)
CassandraOperationsdeleteAll in interface CassandraOperationspublic <T> Cancellable selectOneAsynchronously(com.datastax.driver.core.querybuilder.Select select, Class<T> type, QueryForObjectListener<T> listener)
CassandraOperationsSelect query asynchronously.selectOneAsynchronously in interface CassandraOperationsselect - The Select query to execute.type - The type of entity to retrieve.Cancellable that can be used to cancel the query.public <T> Cancellable selectOneAsynchronously(String cql, Class<T> type, QueryForObjectListener<T> listener)
CassandraOperationsselectOneAsynchronously in interface CassandraOperationstype - The type of entity to retrieve.Cancellable that can be used to cancel the query.public <T> Cancellable selectOneAsynchronously(com.datastax.driver.core.querybuilder.Select select, Class<T> type, QueryForObjectListener<T> listener, QueryOptions options)
CassandraOperationsSelect query asynchronously.selectOneAsynchronously in interface CassandraOperationsselect - 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.public <T> Cancellable selectOneAsynchronously(String cql, Class<T> type, QueryForObjectListener<T> listener, QueryOptions options)
CassandraOperationsselectOneAsynchronously in interface CassandraOperationstype - The type of entity to retrieve.options - The QueryOptions to use.Cancellable that can be used to cancel the query.protected <T> Cancellable doSelectOneAsync(Object query, Class<T> type, QueryForObjectListener<T> listener, QueryOptions options)
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.