public class CassandraAdminTemplate extends CassandraTemplate implements CassandraAdminOperations
CassandraAdminOperations.CassandraTemplate.ClauseCallbackcassandraConverter, mappingContextRESULT_SET_RETURNING_EXTRACTOR, RUN_RUNNABLE_EXECUTORlogger| Constructor and Description |
|---|
CassandraAdminTemplate(com.datastax.driver.core.Session session,
CassandraConverter converter)
Constructor used for a basic template configuration
|
| Modifier and Type | Method and Description |
|---|---|
void |
alterTable(CqlIdentifier tableName,
Class<?> entityClass,
boolean dropRemovedAttributeColumns)
Add columns to the given table from the given class.
|
void |
createTable(boolean ifNotExists,
CqlIdentifier tableName,
Class<?> entityClass,
Map<String,Object> optionsByName)
Create a table with the name given and fields corresponding to the given class.
|
protected void |
doAlterTable(Class<?> entityClass,
String keyspace,
CqlIdentifier tableName)
Create a list of query operations to alter the table for the given entity
|
void |
dropTable(Class<?> entityClass) |
void |
dropTable(CqlIdentifier tableName)
Drops the named table.
|
void |
dropUserType(CqlIdentifier typeName)
Drops a user type.
|
com.datastax.driver.core.KeyspaceMetadata |
getKeyspaceMetadata()
Returns
KeyspaceMetadata for the current keyspace. |
com.datastax.driver.core.TableMetadata |
getTableMetadata(String keyspace,
CqlIdentifier tableName)
Lookup
TableMetadata. |
void |
replaceTable(CqlIdentifier tableName,
Class<?> entityClass,
Map<String,Object> optionsByName)
Drops the existing table with the given name and creates a new one; basically a
#dropTable(String) followed
by a #createTable(boolean, String, Class, Map). |
afterPropertiesSet, appendIdCriteria, appendIdCriteria, appendIdCriteria, appendIdCriteria, batchOps, count, createDeleteBatchQuery, createDeleteQuery, createInsertBatchQuery, createInsertQuery, createUpdateBatchQuery, createUpdateQuery, delete, delete, delete, delete, deleteAll, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteById, doBatchDelete, doBatchDeleteAsync, doBatchInsert, doBatchInsertAsync, doBatchUpdate, doBatchUpdateAsync, doBatchWrite, doBatchWriteAsync, doDelete, doDeleteAsync, doInsert, doInsertAsync, doInsertAsynchronously, doSelectOneAsync, doUpdate, doUpdateAsync, doUpdateAsynchronously, exists, getCassandraMappingContext, getConverter, getMappingContext, getTableName, insert, insert, insert, insert, insertAsynchronously, insertAsynchronously, insertAsynchronously, insertAsynchronously, insertAsynchronously, insertAsynchronously, insertAsynchronously, insertAsynchronously, select, select, select, select, selectAll, selectBySimpleIds, selectOne, selectOne, selectOne, selectOne, selectOneAsynchronously, selectOneAsynchronously, selectOneAsynchronously, selectOneAsynchronously, selectOneById, setConverter, stream, toUpdateBatchQuery, toUpdateQueryX, update, update, update, update, updateAsynchronously, updateAsynchronously, updateAsynchronously, updateAsynchronously, updateAsynchronously, updateAsynchronously, updateAsynchronously, updateAsynchronouslyaddPreparedStatementOptions, addQueryOptions, addWriteOptions, addWriteOptions, count, count, describeRing, describeRing, doExecute, doExecute, doExecute, doExecute, doExecuteAsync, doExecuteAsync, doExecuteAsync, doExecuteQueryReturnResultSet, doExecuteQueryReturnResultSet, 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, logCql, logCql, logStatement, 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, logDebug, setExceptionTranslator, setSessionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbatchOps, count, delete, delete, delete, delete, deleteAll, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteAsynchronously, deleteById, exists, getConverter, getTableName, insert, insert, insert, insert, insertAsynchronously, insertAsynchronously, insertAsynchronously, insertAsynchronously, insertAsynchronously, insertAsynchronously, insertAsynchronously, insertAsynchronously, select, select, selectAll, selectBySimpleIds, selectOne, selectOne, selectOneAsynchronously, selectOneAsynchronously, selectOneAsynchronously, selectOneAsynchronously, selectOneById, stream, update, update, update, update, updateAsynchronously, updateAsynchronously, updateAsynchronously, updateAsynchronously, updateAsynchronously, updateAsynchronously, updateAsynchronously, updateAsynchronouslycount, 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, truncatepublic CassandraAdminTemplate(com.datastax.driver.core.Session session,
CassandraConverter converter)
session - must not be null.converter - must not be null.public void createTable(boolean ifNotExists,
CqlIdentifier tableName,
Class<?> entityClass,
Map<String,Object> optionsByName)
CassandraAdminOperationsifNotExists is true, this is a no-op and false is returned. If the
table doesn't exist, parameter ifNotExists is ignored, the table is created and true is
returned.createTable in interface CassandraAdminOperationsifNotExists - If true, will only create the table if it doesn't exist, else the create operation will be
ignored and the method will return false.tableName - The name of the table.entityClass - The class whose fields determine the columns created.optionsByName - Table options, given by the string option name and the appropriate option value.public void alterTable(CqlIdentifier tableName, Class<?> entityClass, boolean dropRemovedAttributeColumns)
CassandraAdminOperationsalterTable in interface CassandraAdminOperationstableName - The name of the existing table.entityClass - The class whose fields determine the columns added.dropRemovedAttributeColumns - Whether to drop columns that exist on the table but that don't have
corresponding fields in the class. If true, this effectively becomes a synchronziation operation.public void replaceTable(CqlIdentifier tableName, Class<?> entityClass, Map<String,Object> optionsByName)
CassandraAdminOperations#dropTable(String) followed
by a #createTable(boolean, String, Class, Map).replaceTable in interface CassandraAdminOperationstableName - The name of the table.entityClass - The class whose fields determine the new table's columns.optionsByName - Table options, given by the string option name and the appropriate option value.protected void doAlterTable(Class<?> entityClass, String keyspace, CqlIdentifier tableName)
entityClass - tableName - public void dropTable(Class<?> entityClass)
public void dropTable(CqlIdentifier tableName)
CassandraAdminOperationsdropTable in interface CassandraAdminOperationstableName - The name of the table.public void dropUserType(CqlIdentifier typeName)
CassandraAdminOperationsdropUserType in interface CassandraAdminOperationstypeName - must not be null.public com.datastax.driver.core.TableMetadata getTableMetadata(String keyspace, CqlIdentifier tableName)
CassandraAdminOperationsTableMetadata.getTableMetadata in interface CassandraAdminOperationskeyspace - must not be empty or null.tableName - must not be null.TableMetadata or null.public com.datastax.driver.core.KeyspaceMetadata getKeyspaceMetadata()
CassandraAdminOperationsKeyspaceMetadata for the current keyspace.getKeyspaceMetadata in interface CassandraAdminOperationsKeyspaceMetadata for the current keyspace.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.