Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2011-03-04 16:15:51 -0500
committerRyan D. Brooks2011-03-04 16:15:51 -0500
commit2a44605d583d6c7f90794269658ee0f1741fe267 (patch)
tree399f22a5031296591cfef1cd3d6d80c52fec9243 /plugins/org.eclipse.osee.framework.core.datastore
parent737c0ffb4e412cde548f3f9136850ed522cd2fe4 (diff)
downloadorg.eclipse.osee-2a44605d583d6c7f90794269658ee0f1741fe267.tar.gz
org.eclipse.osee-2a44605d583d6c7f90794269658ee0f1741fe267.tar.xz
org.eclipse.osee-2a44605d583d6c7f90794269658ee0f1741fe267.zip
feature: Remove Derby database
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.datastore')
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/DerbySqlDataType.java112
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/DerbySqlManager.java118
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlFactory.java3
3 files changed, 0 insertions, 233 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/DerbySqlDataType.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/DerbySqlDataType.java
deleted file mode 100644
index 3429ee8030..0000000000
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/DerbySqlDataType.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.core.datastore.schema.sql;
-
-/**
- * @author Roberto E. Escobar
- */
-public class DerbySqlDataType extends SqlDataType {
-
- public DerbySqlDataType() {
- super();
- }
-
- @Override
- public String getBooleanType() {
- return "boolean";
- }
-
- @Override
- public String getBitType() {
- return "smallint";
- }
-
- @Override
- public String getIntegerType() {
- return "integer";
- }
-
- @Override
- public String getDecimalType() {
- return "decimal";
- }
-
- @Override
- public String getFloatType() {
- return "float";
- }
-
- @Override
- public String getRealType() {
- return "real";
- }
-
- @Override
- public String getDoubleType() {
- return getRealType();
- }
-
- @Override
- public String getDateType() {
- return "date";
- }
-
- @Override
- public String getCharType() {
- return "char";
- }
-
- @Override
- public String getVarCharType() {
- return "varchar";
- }
-
- @Override
- public String getSmallIntType() {
- return "smallint";
- }
-
- @Override
- protected String getClobType() {
- return "clob";
- }
-
- @Override
- protected String getTimestamp() {
- return "timestamp";
- }
-
- @Override
- protected String getTime() {
- return "time";
- }
-
- @Override
- protected String getBlobType() {
- return "blob";
- }
-
- @Override
- protected String getBigInt() {
- return "bigint";
- }
-
- @Override
- protected String getLongVarCharType() {
- return "long varchar";
- }
-
- @Override
- protected String getNumericType() {
- return "numeric";
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/DerbySqlManager.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/DerbySqlManager.java
deleted file mode 100644
index 260276205a..0000000000
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/DerbySqlManager.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.osee.framework.core.datastore.schema.sql;
-
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import org.eclipse.osee.framework.core.datastore.internal.Activator;
-import org.eclipse.osee.framework.core.datastore.schema.data.ConstraintElement;
-import org.eclipse.osee.framework.core.datastore.schema.data.ForeignKey;
-import org.eclipse.osee.framework.core.datastore.schema.data.ReferenceClause;
-import org.eclipse.osee.framework.core.datastore.schema.data.ReferenceClause.OnDeleteEnum;
-import org.eclipse.osee.framework.core.datastore.schema.data.ReferenceClause.OnUpdateEnum;
-import org.eclipse.osee.framework.core.datastore.schema.data.TableElement.ColumnFields;
-import org.eclipse.osee.framework.database.core.SQL3DataType;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.osee.framework.logging.OseeLog;
-
-/**
- * @author Roberto E. Escobar
- */
-public class DerbySqlManager extends SqlManagerImpl {
-
- public DerbySqlManager(SqlDataType sqlDataType) {
- super(sqlDataType);
- }
-
- @Override
- public String constraintDataToSQL(ConstraintElement constraint, String tableID) {
- StringBuilder toReturn = new StringBuilder();
- String id = formatQuotedString(constraint.getId(), "\\.");
- String type = constraint.getConstraintType().toString();
- String appliesTo = formatQuotedString(constraint.getCommaSeparatedColumnsList(), ",");
-
- if (Strings.isValid(id) && Strings.isValid(appliesTo)) {
- toReturn.append("CONSTRAINT " + id + " " + type + " (" + appliesTo + ")");
-
- if (constraint instanceof ForeignKey) {
- ForeignKey fk = (ForeignKey) constraint;
- List<ReferenceClause> refs = fk.getReferences();
-
- for (ReferenceClause ref : refs) {
- String refTable = formatQuotedString(ref.getFullyQualifiedTableName(), "\\.");
- String refColumns = formatQuotedString(ref.getCommaSeparatedColumnsList(), ",");
-
- String onUpdate = "";
- if (!ref.getOnUpdateAction().equals(OnUpdateEnum.UNSPECIFIED)) {
- onUpdate = "ON UPDATE " + ref.getOnUpdateAction().toString();
- }
-
- String onDelete = "";
- if (!ref.getOnDeleteAction().equals(OnDeleteEnum.UNSPECIFIED)) {
- onDelete = "ON DELETE " + ref.getOnDeleteAction().toString();
- }
-
- if (refTable != null && refColumns != null && !refTable.equals("") && !refColumns.equals("")) {
- toReturn.append(" REFERENCES " + refTable + " (" + refColumns + ")");
- if (!onUpdate.equals("")) {
- toReturn.append(" " + onUpdate);
- }
-
- if (!onDelete.equals("")) {
- toReturn.append(" " + onDelete);
- }
-
- // Not Supported in Derby ?
- // if (constraint.isDeferrable()) {
- // toReturn.append(" DEFERRABLE");
- // }
- }
-
- else {
- OseeLog.log(Activator.class, Level.WARNING,
- "Skipping CONSTRAINT at Table: " + tableID + "\n\t " + fk.toString());
- }
-
- }
- }
- } else {
- OseeLog.log(Activator.class, Level.WARNING,
- "Skipping CONSTRAINT at Table: " + tableID + "\n\t " + constraint.toString());
- }
- return toReturn.toString();
- }
-
- @Override
- public String columnDataToSQL(Map<ColumnFields, String> column) {
- StringBuilder toReturn = new StringBuilder();
-
- String columnLimits = column.get(ColumnFields.limits);
- String defaultValue = column.get(ColumnFields.defaultValue);
-
- SQL3DataType dataType = SQL3DataType.valueOf(column.get(ColumnFields.type));
- columnLimits = sqlDataType.getLimit(dataType, columnLimits);
- toReturn.append("\"");
- toReturn.append(column.get(ColumnFields.id));
- toReturn.append("\"");
- toReturn.append(" ");
- toReturn.append(sqlDataType.getType(dataType));
-
- if (Strings.isValid(columnLimits)) {
- toReturn.append(" (" + columnLimits + ")");
- }
- if (Strings.isValid(defaultValue)) {
- toReturn.append(" " + defaultValue);
- }
- return toReturn.toString();
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlFactory.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlFactory.java
index bbc751a5a8..5434156848 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlFactory.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlFactory.java
@@ -33,9 +33,6 @@ public class SqlFactory {
case oracle:
instance = new OracleSqlManager(new OracleSqlDataType());
break;
- case derby:
- instance = new DerbySqlManager(new DerbySqlDataType());
- break;
case foxpro:
instance = new SqlManagerImpl(new FoxProDataType());
break;

Back to the top