Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-08-24 21:33:04 +0000
committerrescobar2010-08-24 21:33:04 +0000
commit9552aa2e6c9505f73bd5a8b786993aeac2556cfa (patch)
tree222670cc8f4a5a2ea52af38ce3525c585d69dab9 /plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema
parent046596c4aeaac8082373a4e41a2aa6237bc75aba (diff)
downloadorg.eclipse.osee-9552aa2e6c9505f73bd5a8b786993aeac2556cfa.tar.gz
org.eclipse.osee-9552aa2e6c9505f73bd5a8b786993aeac2556cfa.tar.xz
org.eclipse.osee-9552aa2e6c9505f73bd5a8b786993aeac2556cfa.zip
Cleaned up warnings and fixed service dependencies
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema')
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/data/ForeignKey.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/data/SchemaXmlParser.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataExtractor.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataImporter.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/ExtractDatabaseSchemaOperation.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/FileUtility.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/OperationFactory.java1
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlFactory.java1
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java6
9 files changed, 8 insertions, 17 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/data/ForeignKey.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/data/ForeignKey.java
index d41d3bf2693..c3dfa07a207 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/data/ForeignKey.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/data/ForeignKey.java
@@ -14,14 +14,13 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
-import org.eclipse.osee.framework.jdk.core.persistence.Xmlizable;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
/**
* @author Roberto E. Escobar
*/
-public class ForeignKey extends ConstraintElement implements Xmlizable {
+public class ForeignKey extends ConstraintElement {
List<ReferenceClause> references;
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/data/SchemaXmlParser.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/data/SchemaXmlParser.java
index 44a85e5533c..7e34e5890bf 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/data/SchemaXmlParser.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/data/SchemaXmlParser.java
@@ -39,9 +39,6 @@ import org.w3c.dom.NamedNodeMap;
*/
public class SchemaXmlParser {
- public SchemaXmlParser() {
- }
-
private void parseTableDescription(Element element, TableElement tableEntry) {
NamedNodeMap attributes = element.getAttributes();
for (int i = 0; i < attributes.getLength(); i++) {
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataExtractor.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataExtractor.java
index 0089768e8d3..eb857203963 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataExtractor.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataExtractor.java
@@ -65,7 +65,7 @@ public class DatabaseDataExtractor extends AbstractOperation {
private final IOseeDatabaseService databaseService;
- public DatabaseDataExtractor(IOseeDatabaseService databaseService, Set<String> schemas, File directory) throws OseeDataStoreException {
+ public DatabaseDataExtractor(IOseeDatabaseService databaseService, Set<String> schemas, File directory) {
super("Extract Database Data", Activator.PLUGIN_ID);
this.databaseService = databaseService;
this.schemas = schemas;
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataImporter.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataImporter.java
index f0dd7d80ffe..09630735bf0 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataImporter.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataImporter.java
@@ -11,7 +11,6 @@
package org.eclipse.osee.framework.core.datastore.schema.operations;
import java.io.File;
-import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -152,7 +151,7 @@ public class DatabaseDataImporter {
return toReturn;
}
- private void processData(List<TableData> tables) throws OseeDataStoreException, ParseException {
+ private void processData(List<TableData> tables) throws OseeDataStoreException {
if (tables.size() != 0) {
for (TableData tableData : tables) {
OseeLog.log(Activator.class, Level.INFO, "Populating: [ " + tableData.getFullyQualifiedTableName() + "]\n");
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/ExtractDatabaseSchemaOperation.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/ExtractDatabaseSchemaOperation.java
index 2b85bbd06dd..3f81beb8352 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/ExtractDatabaseSchemaOperation.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/ExtractDatabaseSchemaOperation.java
@@ -264,9 +264,7 @@ public class ExtractDatabaseSchemaOperation extends AbstractOperation {
case java.sql.Types.CHAR:
case java.sql.Types.VARCHAR:
String limits = "255";
- if (limits != null && !limits.equals("")) {
- column.addColumnField(ColumnFields.limits, limits);
- }
+ column.addColumnField(ColumnFields.limits, limits);
break;
default:
break;
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/FileUtility.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/FileUtility.java
index 769c57bd34f..b4c54ab91d6 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/FileUtility.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/FileUtility.java
@@ -25,7 +25,7 @@ public final class FileUtility {
public static String DB_DATA_EXTENSION = ".DATA.xml";
private FileUtility() {
-
+ // Utility class
}
public static boolean isValidDirectory(File directory) {
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/OperationFactory.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/OperationFactory.java
index 2795d36cf91..dac751cd43c 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/OperationFactory.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/OperationFactory.java
@@ -29,6 +29,7 @@ import org.eclipse.osee.framework.database.IOseeDatabaseServiceProvider;
public final class OperationFactory {
private OperationFactory() {
+ // Utility class
}
public static IOperation createDbSchema(final IOseeDatabaseService databaseService, IOseeSchemaProvider schemaProvider, SchemaCreationOptions options) {
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 b170c473f35..857d92f44ec 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
@@ -46,7 +46,6 @@ public class SqlFactory {
instance = new PostgreSqlManager(new PostgresqlDataType());
break;
default:
- instance = null;
break;
}
return instance;
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java
index 6eeadfc78f6..57b22bcd175 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java
@@ -157,11 +157,9 @@ public abstract class SqlManager {
return toReturn.toString();
}
- @SuppressWarnings("unchecked")
- protected String handleConstraintCreationSection(List constraints, String tableId) {
+ protected String handleConstraintCreationSection(List<? extends ConstraintElement> constraints, String tableId) {
List<String> constraintStatements = new ArrayList<String>();
- for (Object object : constraints) {
- ConstraintElement constraint = (ConstraintElement) object;
+ for (ConstraintElement constraint : constraints) {
constraintStatements.add(constraintDataToSQL(constraint, tableId));
}
StringBuilder toExecute = new StringBuilder();

Back to the top