Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2014-11-11 01:18:18 +0000
committerRoberto E. Escobar2014-11-11 18:39:00 +0000
commit4e9ca0e5f2696e84f52db7342ec59983b168057c (patch)
tree69000d21f4e49f463284a1f24333068118d2dd1f /plugins
parenteb9c07cbf1e8b9c11617856940db8e86420f1db1 (diff)
downloadorg.eclipse.osee-4e9ca0e5f2696e84f52db7342ec59983b168057c.tar.gz
org.eclipse.osee-4e9ca0e5f2696e84f52db7342ec59983b168057c.tar.xz
org.eclipse.osee-4e9ca0e5f2696e84f52db7342ec59983b168057c.zip
refinement: Remove unused osee_join_search_tags table
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/task/CleanJoinTablesServerTask.java1
-rw-r--r--plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/DatabaseCoreTestSuite.java1
-rw-r--r--plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/SearchTagJoinQueryTest.java73
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DatabaseJoinAccessor.java5
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/JoinUtility.java8
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/SearchTagJoinQuery.java62
-rw-r--r--plugins/org.eclipse.osee.orcs.db/schema/SKYNET.VERSIONING.SCHEMA.xml17
7 files changed, 0 insertions, 167 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/task/CleanJoinTablesServerTask.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/task/CleanJoinTablesServerTask.java
index 6078345447d..d3fa6ecd0e7 100644
--- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/task/CleanJoinTablesServerTask.java
+++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/task/CleanJoinTablesServerTask.java
@@ -50,7 +50,6 @@ public class CleanJoinTablesServerTask implements IServerTask {
"osee_join_artifact",
"osee_join_transaction",
"osee_join_export_import",
- "osee_join_search_tags",
"osee_tag_gamma_queue",
"osee_join_id"};
diff --git a/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/DatabaseCoreTestSuite.java b/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/DatabaseCoreTestSuite.java
index b8be0113964..c9928922a2b 100644
--- a/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/DatabaseCoreTestSuite.java
+++ b/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/DatabaseCoreTestSuite.java
@@ -19,7 +19,6 @@ import org.junit.runners.Suite;
CharJoinQueryTest.class,
ExportImportJoinQueryTest.class,
IdJoinQueryTest.class,
- SearchTagJoinQueryTest.class,
TagQueueJoinQueryTest.class,
TransactionJoinQueryTest.class})
/**
diff --git a/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/SearchTagJoinQueryTest.java b/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/SearchTagJoinQueryTest.java
deleted file mode 100644
index 16e637cec9e..00000000000
--- a/plugins/org.eclipse.osee.framework.database.test/src/org/eclipse/osee/framework/database/core/SearchTagJoinQueryTest.java
+++ /dev/null
@@ -1,73 +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.database.core;
-
-import java.sql.Timestamp;
-import java.util.List;
-import org.junit.Assert;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
-import org.eclipse.osee.framework.database.test.mocks.MockJoinAccessor;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.junit.Test;
-
-/**
- * Test Case for {@link SearchTagJoinQuery}
- *
- * @author Roberto E. Escobar
- */
-public class SearchTagJoinQueryTest {
-
- @Test
- public void testAdd() throws OseeCoreException {
- MockJoinAccessor joinAccessor = new MockJoinAccessor();
- SearchTagJoinQuery join = new SearchTagJoinQuery(joinAccessor, 999);
- Assert.assertEquals(0, join.size());
- Assert.assertEquals(true, join.isEmpty());
-
- join.add(1234L);
- Assert.assertEquals(1, join.size());
- Assert.assertEquals(false, join.isEmpty());
-
- join.add(1234L);
- Assert.assertEquals(1, join.size());
-
- Assert.assertEquals(false, join.wasStored());
- join.store();
- Assert.assertEquals(true, join.wasStored());
-
- Assert.assertNull(joinAccessor.getConnection());
- Assert.assertEquals(999, joinAccessor.getQueryId());
-
- List<Object[]> data = joinAccessor.getDataList();
- Assert.assertEquals(1, data.size());
-
- Object[] entry = data.get(0);
- Assert.assertEquals(3, entry.length);
- Assert.assertEquals(999, entry[0]);
- Assert.assertTrue(entry[1] instanceof Timestamp);
- Assert.assertEquals(1234L, entry[2]);
- }
-
- @Test(expected = OseeDataStoreException.class)
- public void testStoreTwice() throws OseeCoreException {
- MockJoinAccessor joinAccessor = new MockJoinAccessor();
- SearchTagJoinQuery join = new SearchTagJoinQuery(joinAccessor, 1000);
-
- Assert.assertEquals(false, join.wasStored());
- join.store();
- Assert.assertEquals(true, join.wasStored());
-
- Assert.assertNull(joinAccessor.getConnection());
- Assert.assertEquals(1000, joinAccessor.getQueryId());
-
- join.store();
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DatabaseJoinAccessor.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DatabaseJoinAccessor.java
index 81079e029a5..5f233056be8 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DatabaseJoinAccessor.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/DatabaseJoinAccessor.java
@@ -29,9 +29,6 @@ public class DatabaseJoinAccessor implements IJoinAccessor {
private static final String INSERT_INTO_JOIN_TRANSACTION =
"INSERT INTO osee_join_transaction (query_id, insert_time, gamma_id, transaction_id) VALUES (?, ?, ?, ?)";
- private static final String INSERT_INTO_JOIN_SEARCH_TAGS =
- "INSERT INTO osee_join_search_tags (query_id, insert_time, coded_tag_id) VALUES (?, ?, ?)";
-
private static final String INSERT_INTO_TAG_GAMMA_QUEUE =
"INSERT INTO osee_tag_gamma_queue (query_id, insert_time, gamma_id) VALUES (?, ?, ?)";
@@ -49,7 +46,6 @@ public class DatabaseJoinAccessor implements IJoinAccessor {
private static final String DELETE_FROM_JOIN_ID = "DELETE FROM osee_join_id WHERE query_id = ?";
private static final String DELETE_FROM_JOIN_TRANSACTION = "DELETE FROM osee_join_transaction WHERE query_id = ?";
private static final String DELETE_FROM_JOIN_ARTIFACT = "DELETE FROM osee_join_artifact WHERE query_id = ?";
- private static final String DELETE_FROM_JOIN_SEARCH_TAGS = "DELETE FROM osee_join_search_tags WHERE query_id = ?";
private static final String DELETE_FROM_TAG_GAMMA_QUEUE = "DELETE FROM osee_tag_gamma_queue WHERE query_id = ?";
private static final String DELETE_FROM_JOIN_EXPORT_IMPORT = "DELETE FROM osee_join_export_import WHERE query_id =?";
private static final String DELETE_FROM_JOIN = "DELETE FROM osee_join_cleanup WHERE query_id =?";
@@ -58,7 +54,6 @@ public class DatabaseJoinAccessor implements IJoinAccessor {
public enum JoinItem {
TRANSACTION("osee_join_transaction", INSERT_INTO_JOIN_TRANSACTION, DELETE_FROM_JOIN_TRANSACTION),
ARTIFACT("osee_join_artifact", INSERT_INTO_JOIN_ARTIFACT, DELETE_FROM_JOIN_ARTIFACT),
- SEARCH_TAGS("osee_join_search_tags", INSERT_INTO_JOIN_SEARCH_TAGS, DELETE_FROM_JOIN_SEARCH_TAGS),
TAG_GAMMA_QUEUE("osee_tag_gamma_queue", INSERT_INTO_TAG_GAMMA_QUEUE, DELETE_FROM_TAG_GAMMA_QUEUE),
EXPORT_IMPORT("osee_join_export_import", INSERT_INTO_JOIN_EXPORT_IMPORT, DELETE_FROM_JOIN_EXPORT_IMPORT),
ID("osee_join_id", INSERT_INTO_JOIN_ID, DELETE_FROM_JOIN_ID),
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/JoinUtility.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/JoinUtility.java
index 5e924bd0eea..cee448da401 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/JoinUtility.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/JoinUtility.java
@@ -55,10 +55,6 @@ public class JoinUtility {
return new ArtifactJoinQuery(createAccessor(service), getNewQueryId(), getMaxArtifactJoinSize(service));
}
- public static SearchTagJoinQuery createSearchTagJoinQuery(IOseeDatabaseService service) {
- return new SearchTagJoinQuery(createAccessor(service), getNewQueryId());
- }
-
public static TagQueueJoinQuery createTagQueueJoinQuery(IOseeDatabaseService service) {
return new TagQueueJoinQuery(createAccessor(service), getNewQueryId());
}
@@ -93,10 +89,6 @@ public class JoinUtility {
getMaxArtifactJoinSize(getDatabase()));
}
- public static SearchTagJoinQuery createSearchTagJoinQuery() throws OseeDataStoreException {
- return new SearchTagJoinQuery(createAccessor(getDatabase()), getNewQueryId());
- }
-
public static TagQueueJoinQuery createTagQueueJoinQuery() throws OseeDataStoreException {
return new TagQueueJoinQuery(createAccessor(getDatabase()), getNewQueryId());
}
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/SearchTagJoinQuery.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/SearchTagJoinQuery.java
deleted file mode 100644
index db52a011533..00000000000
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/SearchTagJoinQuery.java
+++ /dev/null
@@ -1,62 +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.database.core;
-
-import org.eclipse.osee.framework.database.core.DatabaseJoinAccessor.JoinItem;
-
-/**
- * @author Roberto E. Escobar
- */
-public final class SearchTagJoinQuery extends AbstractJoinQuery {
-
- private final class TagEntry implements IJoinRow {
- private final long value;
-
- private TagEntry(Long value) {
- this.value = value;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[] {getQueryId(), getInsertTime(), value};
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof TagEntry)) {
- return false;
- }
- TagEntry other = (TagEntry) obj;
- return this.value == other.value;
- }
-
- @Override
- public int hashCode() {
- return Long.valueOf(37 * value).hashCode();
- }
-
- @Override
- public String toString() {
- return String.format("tag=%s", value);
- }
- }
-
- protected SearchTagJoinQuery(IJoinAccessor joinAccessor, int queryId) {
- super(joinAccessor, JoinItem.SEARCH_TAGS, queryId);
- }
-
- public void add(Long tag) {
- entries.add(new TagEntry(tag));
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.db/schema/SKYNET.VERSIONING.SCHEMA.xml b/plugins/org.eclipse.osee.orcs.db/schema/SKYNET.VERSIONING.SCHEMA.xml
index 4791bd3a6aa..8c040457253 100644
--- a/plugins/org.eclipse.osee.orcs.db/schema/SKYNET.VERSIONING.SCHEMA.xml
+++ b/plugins/org.eclipse.osee.orcs.db/schema/SKYNET.VERSIONING.SCHEMA.xml
@@ -280,23 +280,6 @@
Usually this references an Action (type-of-artifact)" example="370"/>
</TableDescription>
- <Table name="OSEE_JOIN_SEARCH_TAGS" schema="OSEE" tablespace="osee_data">
- <Column id="QUERY_ID" defaultValue="not null" type="INTEGER" />
- <Column id="CODED_TAG_ID" defaultValue="not null" type="BIGINT" />
- <Column id="INSERT_TIME" defaultValue="not null" type="TIMESTAMP" />
- <Constraint schema="OSEE" id="OSEE_JOIN_SEARCH_TAGS_Q_C_PK" type="PRIMARY KEY" appliesTo="QUERY_ID, CODED_TAG_ID" />
- <Index id="OSEE_JOIN_SEARCH_TAGS_Q_IDX" tablespace="osee_index">
- <AppliesTo id="QUERY_ID"/>
- </Index>
- </Table>
-
- <TableDescription referenceTable="OSEE_JOIN_SEARCH_TAGS">
- <Note purpose="Core table describing ?"/>
- <Column id="QUERY_ID" description="randomly generated identifier for this short-lived join" />
- <Column id="CODED_TAG_ID" description="" />
- <Column id="INSERT_TIME" description="" />
- </TableDescription>
-
<Table name="OSEE_TAG_GAMMA_QUEUE" schema="OSEE" tablespace="osee_data">
<Column id="QUERY_ID" defaultValue="not null" type="INTEGER" />
<Column id="GAMMA_ID" defaultValue="not null" type="BIGINT" />

Back to the top