public class CassandraPersistentEntitySchemaCreator extends Object
CassandraMappingContext and CassandraPersistentEntity.
This class generates CQL to create user types (UDT) and tables.Table,
UserDefinedType,
CassandraType| Constructor and Description |
|---|
CassandraPersistentEntitySchemaCreator(CassandraMappingContext mappingContext,
CassandraAdminOperations cassandraAdminOperations)
Create a new
CassandraPersistentEntitySchemaCreator for the given CassandraMappingContext and
CassandraAdminOperations. |
| Modifier and Type | Method and Description |
|---|---|
void |
createIndexes(boolean ifNotExists)
Create indexes from types known to
CassandraMappingContext. |
protected List<CreateIndexSpecification> |
createIndexSpecifications(boolean ifNotExists)
Create
List of CreateIndexSpecification. |
void |
createTables(boolean ifNotExists)
Create tables from types known to
CassandraMappingContext. |
protected List<CreateTableSpecification> |
createTableSpecifications(boolean ifNotExists)
Create
List of CreateTableSpecification. |
void |
createUserTypes(boolean ifNotExists)
Create user types from types known to
CassandraMappingContext. |
protected List<CreateUserTypeSpecification> |
createUserTypeSpecifications(boolean ifNotExists)
Create
List of CreateUserTypeSpecification. |
public CassandraPersistentEntitySchemaCreator(CassandraMappingContext mappingContext, CassandraAdminOperations cassandraAdminOperations)
CassandraPersistentEntitySchemaCreator for the given CassandraMappingContext and
CassandraAdminOperations.mappingContext - must not be null.cassandraAdminOperations - must not be null.public void createTables(boolean ifNotExists)
CassandraMappingContext.ifNotExists - true to create tables using IF NOT EXISTS.protected List<CreateTableSpecification> createTableSpecifications(boolean ifNotExists)
List of CreateTableSpecification.ifNotExists - true to create tables using IF NOT EXISTS.List of CreateTableSpecification.public void createIndexes(boolean ifNotExists)
CassandraMappingContext.ifNotExists - true to create tables using IF NOT EXISTS.protected List<CreateIndexSpecification> createIndexSpecifications(boolean ifNotExists)
List of CreateIndexSpecification.ifNotExists - true to create indexes using IF NOT EXISTS.List of CreateIndexSpecification.public void createUserTypes(boolean ifNotExists)
CassandraMappingContext.ifNotExists - true to create types using IF NOT EXISTS.protected List<CreateUserTypeSpecification> createUserTypeSpecifications(boolean ifNotExists)
List of CreateUserTypeSpecification.ifNotExists - true to create types using IF NOT EXISTS.List of CreateUserTypeSpecification.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.