Permalink
Browse files

added button in schema pane

some refactoring
  • Loading branch information...
1 parent b4c31dc commit 27ec0450d7d7f7edc3118248cf77960ce580d0ae tomek committed Jul 26, 2012
@@ -49,7 +49,11 @@ qx.Class.define("helenos.components.SchemaPane",
var refreshButton = new qx.ui.toolbar.Button("Refresh", "icon/16/actions/view-refresh.png");
refreshButton.addListener('execute', this.refreshSchemaTree, this);
+ var addKeyspaceButton = new qx.ui.toolbar.Button("Add keyspace", "icon/16/actions/list-add.png");
+ addKeyspaceButton.addListener('execute', this.__addKeyspace, this);
+
this.__btnToolbar.add(refreshButton);
+ this.__btnToolbar.add(addKeyspaceButton);
},
__createSchemaTree : function() {
@@ -58,6 +62,10 @@ qx.Class.define("helenos.components.SchemaPane",
this.refreshSchemaTree();
},
+ __addKeyspace : function() {
+
+ },
+
refreshSchemaTree : function() {
this.__schemaTree.resetSelection();
this.__schemaTree.resetRoot();
@@ -8,8 +8,13 @@
import java.util.UUID;
/**
+ * ********************************************************
+ * Copyright: 2012 Tomek Kuprowski
*
- * @author tomek
+ * License: GPLv2: http://www.gnu.org/licences/gpl.html
+ *
+ * @author Tomek Kuprowski (tomekkuprowski at gmail dot com)
+ * *******************************************************
*/
public interface QueryProvider {
@@ -10,8 +10,13 @@
import java.util.List;
/**
+ * ********************************************************
+ * Copyright: 2012 Tomek Kuprowski
*
- * @author tomek
+ * License: GPLv2: http://www.gnu.org/licences/gpl.html
+ *
+ * @author Tomek Kuprowski (tomekkuprowski at gmail dot com)
+ * *******************************************************
*/
public interface SchemaProvider {
@@ -11,8 +11,13 @@
import org.springframework.beans.factory.annotation.Required;
/**
+ * ********************************************************
+ * Copyright: 2012 Tomek Kuprowski
*
- * @author tomek
+ * License: GPLv2: http://www.gnu.org/licences/gpl.html
+ *
+ * @author Tomek Kuprowski (tomekkuprowski at gmail dot com)
+ * *******************************************************
*/
public abstract class AbstractProvider {
@@ -1,7 +1,3 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
package com.kuprowski.helenos.service.impl;
import com.kuprowski.helenos.service.QueryProvider;
@@ -20,7 +16,15 @@
"column": "none"
}
}
- * @author tomek
+ */
+/**
+ * ********************************************************
+ * Copyright: 2012 Tomek Kuprowski
+ *
+ * License: GPLv2: http://www.gnu.org/licences/gpl.html
+ *
+ * @author Tomek Kuprowski (tomekkuprowski at gmail dot com)
+ * *******************************************************
*/
@Component("queryProvider")
public class QueryProviderImpl extends AbstractProvider implements QueryProvider {
@@ -1,7 +1,3 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
package com.kuprowski.helenos.service.impl;
import com.kuprowski.helenos.service.SchemaProvider;
@@ -18,8 +14,13 @@
import org.springframework.stereotype.Component;
/**
+ * ********************************************************
+ * Copyright: 2012 Tomek Kuprowski
+ *
+ * License: GPLv2: http://www.gnu.org/licences/gpl.html
*
- * @author tomek
+ * @author Tomek Kuprowski (tomekkuprowski at gmail dot com)
+ * *******************************************************
*/
@Component("schemaProvider")
public class SchemaProviderImpl extends AbstractProvider implements SchemaProvider {
@@ -72,7 +73,7 @@ public JsonColumnFamilyDefinition describeColumnFamily(String keyspaceName, Stri
}
return jsonDef;
}
-
+
@Override
public void createColumnFamily(QxJsonColumnFamilyDefinition qxDef) {
ColumnFamilyDefinition cfDef = new ThriftCfDef(qxDef.getKeyspaceName(), qxDef.getName());
@@ -85,7 +86,7 @@ public void createColumnFamily(QxJsonColumnFamilyDefinition qxDef) {
}
cfDef.setKeyValidationClass(qxDef.getKeyValidationclass());
cfDef.setDefaultValidationClass(qxDef.getDefaultValidationclass());
-
+
cluster.addColumnFamily(cfDef, true);
}
}

0 comments on commit 27ec045

Please sign in to comment.