Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn F. Cook2011-08-02 20:05:39 +0000
committerRyan D. Brooks2011-08-02 20:05:39 +0000
commita75fa5b6a515a19ae050b72a1d53ce1abc8b40c8 (patch)
tree9954703c59c080aca59a1e8e00187561b598ea32 /plugins/org.eclipse.osee.framework.skynet.core/src
parentd24f7321717fdd9b86a82724d03f5b0731720ca3 (diff)
downloadorg.eclipse.osee-a75fa5b6a515a19ae050b72a1d53ce1abc8b40c8.tar.gz
org.eclipse.osee-a75fa5b6a515a19ae050b72a1d53ce1abc8b40c8.tar.xz
org.eclipse.osee-a75fa5b6a515a19ae050b72a1d53ce1abc8b40c8.zip
refinement[bgz_350331]: Migrate PurgeAttributeType to server side command line
Deleted the BLAM: PurgeAttributeType. Deleted unreferenced method: AttributeTypeManager.purgeAttributeType(). Removed reference to deleted BLAM from org.eclipse.osee.framework.ui.skynet/plugin.xml.
Diffstat (limited to 'plugins/org.eclipse.osee.framework.skynet.core/src')
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java29
1 files changed, 0 insertions, 29 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java
index 84a3165c56e..71c512449c4 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java
@@ -24,9 +24,6 @@ import org.eclipse.osee.framework.core.model.cache.AbstractOseeCache;
import org.eclipse.osee.framework.core.model.cache.BranchCache;
import org.eclipse.osee.framework.core.model.type.ArtifactType;
import org.eclipse.osee.framework.core.model.type.AttributeType;
-import org.eclipse.osee.framework.database.core.ConnectionHandler;
-import org.eclipse.osee.framework.database.core.DbTransaction;
-import org.eclipse.osee.framework.database.core.OseeConnection;
import org.eclipse.osee.framework.jdk.core.util.GUID;
import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.skynet.core.artifact.Attribute;
@@ -135,32 +132,6 @@ public class AttributeTypeManager {
return getEnumerationValues(getType(attributeName));
}
- private static final String DELETE_VALID_ATTRIBUTE =
- "delete from osee_artifact_type_attributes where attr_type_id = ?";
- private static final String COUNT_ATTRIBUTE_OCCURRENCE =
- "select count(1) FROM osee_attribute where attr_type_id = ?";
- private static final String DELETE_ATTRIBUTE_TYPE = "delete from osee_attribute_type where attr_type_id = ?";
-
- public static void purgeAttributeType(final AttributeType attributeType) throws OseeCoreException {
- int attributeCount =
- ConnectionHandler.runPreparedQueryFetchInt(0, COUNT_ATTRIBUTE_OCCURRENCE, attributeType.getId());
- if (attributeCount != 0) {
- throw new OseeArgumentException(
- "Can not delete attribute type [%s] because there are %d existing attributes of this type.", attributeType,
- attributeCount);
- }
-
- DbTransaction dbTransaction = new DbTransaction() {
- @Override
- protected void handleTxWork(OseeConnection connection) throws OseeCoreException {
- int attributeTypeId = attributeType.getId();
- ConnectionHandler.runPreparedUpdate(connection, DELETE_VALID_ATTRIBUTE, attributeTypeId);
- ConnectionHandler.runPreparedUpdate(connection, DELETE_ATTRIBUTE_TYPE, attributeTypeId);
- }
- };
- dbTransaction.execute();
- }
-
public static void persist() throws OseeCoreException {
getCache().storeAllModified();
}

Back to the top