Class CassandraPersistentEntitySchemaDropper
java.lang.Object
org.springframework.data.cassandra.core.CassandraPersistentEntitySchemaDropper
Schema drop support for Cassandra based on
CassandraMappingContext
and CassandraPersistentEntity
.
This class generates CQL to drop user types (UDT) and tables.- Since:
- 1.5
- Author:
- Mark Paluch
- See Also:
-
Constructor Summary
ConstructorDescriptionCassandraPersistentEntitySchemaDropper
(CassandraMappingContext mappingContext, CassandraAdminOperations cassandraAdminOperations) Create a newCassandraPersistentEntitySchemaDropper
for the givenCassandraMappingContext
andCassandraAdminOperations
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dropTables
(boolean dropUnused) Drop tables that exist in the keyspace.void
dropUserTypes
(boolean dropUnused) Drop user types that exist in the keyspace.
-
Constructor Details
-
CassandraPersistentEntitySchemaDropper
public CassandraPersistentEntitySchemaDropper(CassandraMappingContext mappingContext, CassandraAdminOperations cassandraAdminOperations) Create a newCassandraPersistentEntitySchemaDropper
for the givenCassandraMappingContext
andCassandraAdminOperations
.- Parameters:
mappingContext
- must not be null.cassandraAdminOperations
- must not be null.
-
-
Method Details
-
dropTables
public void dropTables(boolean dropUnused) Drop tables that exist in the keyspace.- Parameters:
dropUnused
- true to drop unused tables. Table usage is determined by existing table mappings.
-
dropUserTypes
public void dropUserTypes(boolean dropUnused) Drop user types that exist in the keyspace.- Parameters:
dropUnused
- true to drop unused types before creation. Type usage is determined from existing mappedUserDefinedType
s and UDT names on field specifications.
-