Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-09-16 16:32:48 -0400
committerRyan D. Brooks2010-09-16 16:32:48 -0400
commitf0f991b4f728f2e7550016da91eb2e8d2c8c750c (patch)
tree7ad402016cbf8810f6f6ffe43c3a7dccab95f402 /plugins/org.eclipse.osee.framework.core.datastore
parent445b78e7fdb5067609dd91f8b348ea91313ecedc (diff)
downloadorg.eclipse.osee-f0f991b4f728f2e7550016da91eb2e8d2c8c750c.tar.gz
org.eclipse.osee-f0f991b4f728f2e7550016da91eb2e8d2c8c750c.tar.xz
org.eclipse.osee-f0f991b4f728f2e7550016da91eb2e8d2c8c750c.zip
refactor: Utilize utility method OseeExceptions.wrapAndThrow instead of in-place code
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/DatastoreInitOperation.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseArtifactTypeAccessor.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseAttributeTypeAccessor.java9
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/operations/DatabaseDataImporter.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/MysqlSqlManager.java8
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/OracleSqlManager.java6
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/PostgreSqlManager.java10
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SchemaSqlUtil.java14
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlFactory.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManager.java15
-rw-r--r--plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManagerImpl.java6
11 files changed, 41 insertions, 41 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/DatastoreInitOperation.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/DatastoreInitOperation.java
index 9038411806..355b8ce1fb 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/DatastoreInitOperation.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/DatastoreInitOperation.java
@@ -17,7 +17,7 @@ import org.eclipse.osee.framework.branch.management.IOseeBranchService;
import org.eclipse.osee.framework.core.datastore.internal.Activator;
import org.eclipse.osee.framework.core.datastore.schema.operations.OperationFactory;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.operation.AbstractOperation;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.server.IApplicationServerManager;
@@ -81,7 +81,7 @@ public class DatastoreInitOperation extends AbstractOperation {
}
@SuppressWarnings("unchecked")
- private void addDefaultPermissions() throws OseeDataStoreException {
+ private void addDefaultPermissions() throws OseeCoreException {
for (PermissionEnum permission : PermissionEnum.values()) {
dbService.runPreparedUpdate(ADD_PERMISSION, permission.getPermId(), permission.getName());
}
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseArtifactTypeAccessor.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseArtifactTypeAccessor.java
index 323837748b..a62ff79c5d 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseArtifactTypeAccessor.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseArtifactTypeAccessor.java
@@ -235,7 +235,7 @@ public class DatabaseArtifactTypeAccessor extends AbstractDatabaseAccessor<Artif
ArtifactType.ARTIFACT_IS_ABSTRACT_FIELD_KEY);
}
- private void storeArtifactTypeInheritance(Collection<ArtifactType> types) throws OseeDataStoreException {
+ private void storeArtifactTypeInheritance(Collection<ArtifactType> types) throws OseeCoreException {
List<Object[]> insertInheritanceData = new ArrayList<Object[]>();
List<Object[]> deleteInheritanceData = new ArrayList<Object[]>();
for (ArtifactType type : types) {
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseAttributeTypeAccessor.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseAttributeTypeAccessor.java
index 3e5fa9066f..61e2bc577e 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseAttributeTypeAccessor.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/cache/DatabaseAttributeTypeAccessor.java
@@ -17,7 +17,6 @@ import java.util.logging.Level;
import org.eclipse.osee.framework.core.datastore.internal.Activator;
import org.eclipse.osee.framework.core.enums.StorageState;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.model.cache.IOseeCache;
import org.eclipse.osee.framework.core.model.cache.OseeEnumTypeCache;
import org.eclipse.osee.framework.core.model.type.AttributeType;
@@ -126,7 +125,7 @@ public class DatabaseAttributeTypeAccessor extends AbstractDatabaseAccessor<Attr
}
}
- private Object[] toInsertValues(AttributeType type) throws OseeDataStoreException {
+ private Object[] toInsertValues(AttributeType type) throws OseeCoreException {
int attrBaseTypeId = getOrCreateAttributeBaseType(type.getBaseAttributeTypeId());
int attrProviderTypeId = getOrCreateAttributeProviderType(type.getAttributeProviderId());
return new Object[] {
@@ -144,7 +143,7 @@ public class DatabaseAttributeTypeAccessor extends AbstractDatabaseAccessor<Attr
type.getTaggerId() == null ? SQL3DataType.VARCHAR : type.getTaggerId()};
}
- private Object[] toUpdateValues(AttributeType type) throws OseeDataStoreException {
+ private Object[] toUpdateValues(AttributeType type) throws OseeCoreException {
int attrBaseTypeId = getOrCreateAttributeBaseType(type.getBaseAttributeTypeId());
int attrProviderTypeId = getOrCreateAttributeProviderType(type.getAttributeProviderId());
return new Object[] {
@@ -162,7 +161,7 @@ public class DatabaseAttributeTypeAccessor extends AbstractDatabaseAccessor<Attr
}
@SuppressWarnings("unchecked")
- private int getOrCreateAttributeProviderType(String attrProviderExtension) throws OseeDataStoreException {
+ private int getOrCreateAttributeProviderType(String attrProviderExtension) throws OseeCoreException {
int attrBaseTypeId = -1;
IOseeStatement chStmt = getDatabaseService().getStatement();
try {
@@ -181,7 +180,7 @@ public class DatabaseAttributeTypeAccessor extends AbstractDatabaseAccessor<Attr
}
@SuppressWarnings("unchecked")
- private int getOrCreateAttributeBaseType(String attrBaseExtension) throws OseeDataStoreException {
+ private int getOrCreateAttributeBaseType(String attrBaseExtension) throws OseeCoreException {
int attrBaseTypeId = -1;
IOseeStatement chStmt = getDatabaseService().getStatement();
try {
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 70f2720dce..c80a33c7d4 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
@@ -29,7 +29,7 @@ import org.eclipse.osee.framework.core.datastore.schema.data.TableElement.Column
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement.TableDescriptionFields;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement.TableTags;
import org.eclipse.osee.framework.core.datastore.schema.sql.SqlManager;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
import org.w3c.dom.Document;
@@ -152,7 +152,7 @@ public class DatabaseDataImporter {
return toReturn;
}
- private void processData(List<TableData> tables) throws OseeDataStoreException {
+ private void processData(List<TableData> tables) throws OseeCoreException {
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/sql/MysqlSqlManager.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/MysqlSqlManager.java
index 053fdb5df4..f38f90b99f 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/MysqlSqlManager.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/MysqlSqlManager.java
@@ -26,7 +26,7 @@ import org.eclipse.osee.framework.core.datastore.schema.data.ReferenceClause.OnD
import org.eclipse.osee.framework.core.datastore.schema.data.ReferenceClause.OnUpdateEnum;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement.ColumnFields;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.database.core.OseeConnection;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -52,7 +52,7 @@ public class MysqlSqlManager extends SqlManagerImpl {
return toExecute;
}
- public void createTable(OseeConnection connection, TableElement tableDef) throws OseeDataStoreException {
+ public void createTable(OseeConnection connection, TableElement tableDef) throws OseeCoreException {
String toExecute = "CREATE TABLE " + tableDef.getFullyQualifiedTableName() + " ( \n";
toExecute += handleColumnCreationSection(connection, tableDef.getColumns());
toExecute += handleConstraintCreationSection(tableDef.getConstraints(), tableDef.getFullyQualifiedTableName());
@@ -64,7 +64,7 @@ public class MysqlSqlManager extends SqlManagerImpl {
}
@Override
- public void dropTable(TableElement tableDef) throws OseeDataStoreException {
+ public void dropTable(TableElement tableDef) throws OseeCoreException {
String toExecute = "DROP TABLE " + formatQuotedString(tableDef.getFullyQualifiedTableName(), "\\.");
OseeLog.log(Activator.class, Level.INFO, "Dropping Table: [ " + tableDef.getFullyQualifiedTableName() + "]");
ConnectionHandler.runPreparedUpdate(toExecute);
@@ -80,7 +80,7 @@ public class MysqlSqlManager extends SqlManagerImpl {
}
@Override
- public void dropIndex(TableElement tableDef) throws OseeDataStoreException {
+ public void dropIndex(TableElement tableDef) throws OseeCoreException {
List<IndexElement> tableIndices = tableDef.getIndexData();
String tableName = tableDef.getFullyQualifiedTableName();
for (IndexElement iData : tableIndices) {
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/OracleSqlManager.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/OracleSqlManager.java
index bdcd8920e3..665cbb49ae 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/OracleSqlManager.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/OracleSqlManager.java
@@ -20,7 +20,7 @@ import org.eclipse.osee.framework.core.datastore.schema.data.ColumnMetadata;
import org.eclipse.osee.framework.core.datastore.schema.data.IndexElement;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement.ColumnFields;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -45,7 +45,7 @@ public class OracleSqlManager extends SqlManager {
}
@Override
- public void createTable(TableElement tableDef) throws OseeDataStoreException {
+ public void createTable(TableElement tableDef) throws OseeCoreException {
StringBuilder toExecute = new StringBuilder();
toExecute.append(SqlManager.CREATE_STRING + " TABLE " + formatQuotedString(tableDef.getFullyQualifiedTableName(),
"\\.") + " ( \n");
@@ -70,7 +70,7 @@ public class OracleSqlManager extends SqlManager {
}
@Override
- public void dropTable(TableElement tableDef) throws OseeDataStoreException {
+ public void dropTable(TableElement tableDef) throws OseeCoreException {
StringBuilder toExecute = new StringBuilder();
toExecute.append(SqlManager.DROP_STRING + " TABLE " + formatQuotedString(tableDef.getFullyQualifiedTableName(),
"\\.") + " cascade constraints purge");
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/PostgreSqlManager.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/PostgreSqlManager.java
index 473b8ed9bf..a3034544bc 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/PostgreSqlManager.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/PostgreSqlManager.java
@@ -27,7 +27,7 @@ import org.eclipse.osee.framework.core.datastore.schema.data.ReferenceClause.OnD
import org.eclipse.osee.framework.core.datastore.schema.data.ReferenceClause.OnUpdateEnum;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement.ColumnFields;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.database.core.OseeConnection;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -52,7 +52,7 @@ public class PostgreSqlManager extends SqlManagerImpl {
return toExecute;
}
- public void createTable(OseeConnection connection, TableElement tableDef) throws OseeDataStoreException {
+ public void createTable(OseeConnection connection, TableElement tableDef) throws OseeCoreException {
String toExecute = "CREATE TABLE " + tableDef.getFullyQualifiedTableName() + " ( \n";
toExecute += handleColumnCreationSection(connection, tableDef.getColumns());
toExecute += handleConstraintCreationSection(tableDef.getConstraints(), tableDef.getFullyQualifiedTableName());
@@ -64,7 +64,7 @@ public class PostgreSqlManager extends SqlManagerImpl {
}
@Override
- public void dropTable(TableElement tableDef) throws OseeDataStoreException {
+ public void dropTable(TableElement tableDef) throws OseeCoreException {
String toExecute = "DROP TABLE " + formatQuotedString(tableDef.getFullyQualifiedTableName(), "\\.") + " CASCADE";
OseeLog.log(Activator.class, Level.FINE, "Dropping Table: [ " + tableDef.getFullyQualifiedTableName() + "]");
ConnectionHandler.runPreparedUpdate(toExecute);
@@ -79,7 +79,7 @@ public class PostgreSqlManager extends SqlManagerImpl {
return StringUtils.join(array, splitAt.replaceAll("\\\\", ""));
}
- public void dropIndex(OseeConnection connection, TableElement tableDef) throws OseeDataStoreException {
+ public void dropIndex(OseeConnection connection, TableElement tableDef) throws OseeCoreException {
List<IndexElement> tableIndices = tableDef.getIndexData();
String tableName = tableDef.getFullyQualifiedTableName();
for (IndexElement iData : tableIndices) {
@@ -155,7 +155,7 @@ public class PostgreSqlManager extends SqlManagerImpl {
return toReturn.toString();
}
- public void createIndex(OseeConnection connection, TableElement tableDef) throws OseeDataStoreException {
+ public void createIndex(OseeConnection connection, TableElement tableDef) throws OseeCoreException {
List<IndexElement> tableIndices = tableDef.getIndexData();
String indexId = null;
StringBuilder appliesTo = new StringBuilder();
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SchemaSqlUtil.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SchemaSqlUtil.java
index 6c63551d79..760eca33af 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SchemaSqlUtil.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SchemaSqlUtil.java
@@ -15,7 +15,7 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.osee.framework.core.datastore.schema.data.SchemaData;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
public class SchemaSqlUtil {
private final SqlManager sqlManager;
@@ -24,7 +24,7 @@ public class SchemaSqlUtil {
this.sqlManager = sqlManager;
}
- public void addIndices(Set<String> schemas, Map<String, SchemaData> userSpecifiedConfig) throws OseeDataStoreException {
+ public void addIndices(Set<String> schemas, Map<String, SchemaData> userSpecifiedConfig) throws OseeCoreException {
for (String schemaId : schemas) {
if (userSpecifiedConfig.containsKey(schemaId)) {
SchemaData schemaData = userSpecifiedConfig.get(schemaId);
@@ -36,7 +36,7 @@ public class SchemaSqlUtil {
}
}
- public void addTables(Set<String> schemas, Map<String, SchemaData> userSpecifiedConfig) throws OseeDataStoreException {
+ public void addTables(Set<String> schemas, Map<String, SchemaData> userSpecifiedConfig) throws OseeCoreException {
for (String schemaId : schemas) {
if (userSpecifiedConfig.containsKey(schemaId)) {
SchemaData schemaData = userSpecifiedConfig.get(schemaId);
@@ -49,7 +49,7 @@ public class SchemaSqlUtil {
}
}
- public void dropTables(Set<String> schemas, Map<String, SchemaData> userSpecifiedConfig, Map<String, SchemaData> currentDatabaseConfig) throws OseeDataStoreException {
+ public void dropTables(Set<String> schemas, Map<String, SchemaData> userSpecifiedConfig, Map<String, SchemaData> currentDatabaseConfig) throws OseeCoreException {
for (String schemaId : schemas) {
if (currentDatabaseConfig.containsKey(schemaId)) {
SchemaData currentDbSchemaData = currentDatabaseConfig.get(schemaId);
@@ -75,7 +75,7 @@ public class SchemaSqlUtil {
}
}
- public void dropIndices(Set<String> schemas, Map<String, SchemaData> userSpecifiedConfig, Map<String, SchemaData> currentDatabaseConfig) throws OseeDataStoreException {
+ public void dropIndices(Set<String> schemas, Map<String, SchemaData> userSpecifiedConfig, Map<String, SchemaData> currentDatabaseConfig) throws OseeCoreException {
for (String schemaId : schemas) {
if (currentDatabaseConfig.containsKey(schemaId)) {
SchemaData currentDbSchemaData = currentDatabaseConfig.get(schemaId);
@@ -99,13 +99,13 @@ public class SchemaSqlUtil {
}
}
- public void createSchema(Set<String> schemas) throws OseeDataStoreException {
+ public void createSchema(Set<String> schemas) throws OseeCoreException {
for (String schemaId : schemas) {
sqlManager.createSchema(schemaId.toLowerCase());
}
}
- public void dropSchema(Set<String> schemas) throws OseeDataStoreException {
+ public void dropSchema(Set<String> schemas) throws OseeCoreException {
for (String schemaId : schemas) {
sqlManager.dropSchema(schemaId.toLowerCase());
}
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 857d92f44e..612aac946c 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
@@ -11,7 +11,7 @@
package org.eclipse.osee.framework.core.datastore.schema.sql;
import java.sql.DatabaseMetaData;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.database.core.SupportedDatabase;
/**
@@ -23,7 +23,7 @@ public class SqlFactory {
super();
}
- public static SqlManager getSqlManager(DatabaseMetaData metaData) throws OseeDataStoreException {
+ public static SqlManager getSqlManager(DatabaseMetaData metaData) throws OseeCoreException {
return getSqlManager(SupportedDatabase.getDatabaseType(metaData));
}
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 564c80e338..9d7e5c75e3 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
@@ -34,6 +34,7 @@ import org.eclipse.osee.framework.core.datastore.schema.data.ReferenceClause.OnU
import org.eclipse.osee.framework.core.datastore.schema.data.SchemaDataLookup;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement.ColumnFields;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.database.core.SQL3DataType;
@@ -53,11 +54,11 @@ public abstract class SqlManager {
this.sqlDataType = sqlDataType;
}
- public abstract void createTable(TableElement tableDef) throws OseeDataStoreException;
+ public abstract void createTable(TableElement tableDef) throws OseeCoreException;
- public abstract void dropTable(TableElement tableDef) throws OseeDataStoreException;
+ public abstract void dropTable(TableElement tableDef) throws OseeCoreException;
- public void insertData(List<ColumnDbData> rowData, TableElement tableMetadata) throws OseeDataStoreException {
+ public void insertData(List<ColumnDbData> rowData, TableElement tableMetadata) throws OseeCoreException {
List<String> columnNames = new ArrayList<String>();
List<String> placeHolders = new ArrayList<String>();
List<String> columnValues = new ArrayList<String>();
@@ -233,11 +234,11 @@ public abstract class SqlManager {
return toReturn.toString();
}
- public void createSchema(String schema) throws OseeDataStoreException {
+ public void createSchema(String schema) throws OseeCoreException {
ConnectionHandler.runPreparedUpdate(CREATE_STRING + " SCHEMA \"" + schema + "\"");
}
- public void dropSchema(String schema) throws OseeDataStoreException {
+ public void dropSchema(String schema) throws OseeCoreException {
ConnectionHandler.runPreparedUpdate(DROP_STRING + " SCHEMA \"" + schema + "\" CASCADE");
}
@@ -251,7 +252,7 @@ public abstract class SqlManager {
return toExecute.toString();
}
- public void createIndex(TableElement tableDef) throws OseeDataStoreException {
+ public void createIndex(TableElement tableDef) throws OseeCoreException {
List<IndexElement> tableIndices = tableDef.getIndexData();
String indexId = null;
StringBuilder appliesTo = new StringBuilder();
@@ -295,7 +296,7 @@ public abstract class SqlManager {
return original;
}
- public void dropIndex(TableElement tableDef) throws OseeDataStoreException {
+ public void dropIndex(TableElement tableDef) throws OseeCoreException {
List<IndexElement> tableIndices = tableDef.getIndexData();
String tableName = tableDef.getFullyQualifiedTableName();
for (IndexElement iData : tableIndices) {
diff --git a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManagerImpl.java b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManagerImpl.java
index 10c698953d..f95810fb85 100644
--- a/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManagerImpl.java
+++ b/plugins/org.eclipse.osee.framework.core.datastore/src/org/eclipse/osee/framework/core/datastore/schema/sql/SqlManagerImpl.java
@@ -19,7 +19,7 @@ import org.eclipse.osee.framework.core.datastore.internal.Activator;
import org.eclipse.osee.framework.core.datastore.schema.data.ColumnMetadata;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement;
import org.eclipse.osee.framework.core.datastore.schema.data.TableElement.ColumnFields;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.logging.OseeLog;
@@ -44,7 +44,7 @@ public class SqlManagerImpl extends SqlManager {
}
@Override
- public void createTable(TableElement tableDef) throws OseeDataStoreException {
+ public void createTable(TableElement tableDef) throws OseeCoreException {
StringBuilder toExecute = new StringBuilder();
toExecute.append(SqlManager.CREATE_STRING + " TABLE " + formatQuotedString(tableDef.getFullyQualifiedTableName(),
"\\.") + " ( \n");
@@ -58,7 +58,7 @@ public class SqlManagerImpl extends SqlManager {
}
@Override
- public void dropTable(TableElement tableDef) throws OseeDataStoreException {
+ public void dropTable(TableElement tableDef) throws OseeCoreException {
StringBuilder toExecute = new StringBuilder();
toExecute.append(SqlManager.DROP_STRING + " TABLE " + formatQuotedString(tableDef.getFullyQualifiedTableName(),
"\\."));

Back to the top