From 6d78de85c7210dc476f7d955fc940713381ecd97 Mon Sep 17 00:00:00 2001 From: dwebb Date: Wed, 13 Nov 2013 14:31:31 -0500 Subject: [PATCH] IN PROGRESS - issue DATACASS-32: Implement the TemplateAPI for CQL https://jira.springsource.org/browse/DATACASS-32 New Interface for Admin Operations --- .../core/CassandraAdminOperations.java | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/main/java/org/springframework/data/cassandra/core/CassandraAdminOperations.java diff --git a/src/main/java/org/springframework/data/cassandra/core/CassandraAdminOperations.java b/src/main/java/org/springframework/data/cassandra/core/CassandraAdminOperations.java new file mode 100644 index 000000000..2583afe94 --- /dev/null +++ b/src/main/java/org/springframework/data/cassandra/core/CassandraAdminOperations.java @@ -0,0 +1,57 @@ +/** + * All BrightMove Code is Copyright 2004-2013 BrightMove Inc. + * Modification of code without the express written consent of + * BrightMove, Inc. is strictly forbidden. + * + * Author: David Webb (dwebb@brightmove.com) + * Created On: Nov 13, 2013 + */ +package org.springframework.data.cassandra.core; + +import java.util.Map; + +/** + * @author David Webb (dwebb@brightmove.com) + * + */ +public interface CassandraAdminOperations { + + /** + * Create a table with the name and fields indicated by the entity class + * + * @param ifNotExists + * @param tableName + * @param entityClass + * @param optionsByName + */ + void createTable(boolean ifNotExists, String tableName, Class entityClass, Map optionsByName); + + /** + * Alter table with the name and fields indicated by the entity class + * + * @param entityClass class that determines metadata of the table to create/drop. + * @param tableName explicit name of the table + */ + void alterTable(String tableName, Class entityClass, boolean dropRemovedAttributeColumns); + + /** + * @param tableName + * @param entityClass + */ + void replaceTable(String tableName, Class entityClass); + + /** + * Alter table with the name and fields indicated by the entity class + * + * @param entityClass class that determines metadata of the table to create/drop. + */ + void dropTable(Class entityClass); + + /** + * Alter table with the name and fields indicated by the entity class + * + * @param tableName explicit name of the table. + */ + void dropTable(String tableName); + +}