Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-09-22 16:49:04 -0400
committerAngel Avila2016-10-04 21:35:31 -0400
commitf02b7b37995ae419017245f1a615c63f01367594 (patch)
tree1546f19b6c60bb866ec7997c9963784ef0ab9b08
parent6ed460acb9873d62390a9ec9a5eb97d2cee72bcc (diff)
downloadorg.eclipse.osee-f02b7b37995ae419017245f1a615c63f01367594.tar.gz
org.eclipse.osee-f02b7b37995ae419017245f1a615c63f01367594.tar.xz
org.eclipse.osee-f02b7b37995ae419017245f1a615c63f01367594.zip
refactor: Remove getGuid from IRelationType
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java5
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java16
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockModel.java9
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/RelationTypeSide.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelation.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelationReorder.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IRelationType.java3
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IRelationTypeSide.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/InRelationSearch.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/NotInRelationSearch.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/RelationCriteria.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationManagerTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImplTest.java28
-rw-r--r--plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacenciesTest.java10
-rw-r--r--plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java14
-rw-r--r--plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeRelationTypeCommand.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationUtil.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java9
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacencies.java12
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParser.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/RelationTypesImpl.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataFactoryImplTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeRelationTypeDatabaseTxCallable.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/OrcsObjectFactoryImpl.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/RelationTypeExistsSqlHandler.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/RelationTypeNotExistsSqlHandler.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/predicate/ExistenceTypePredicateHandlerTest.java8
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/ExistenceTypePredicateHandler.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OwFactory.java4
33 files changed, 92 insertions, 90 deletions
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java
index aeb8b6eb2fc..da694894c55 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java
@@ -54,7 +54,7 @@ public class AtsArtifactChecks extends ArtifactCheck {
public IStatus isDeleteableRelation(Artifact artifact, IRelationType relationType) throws OseeCoreException {
if (deletionChecksEnabled) {
boolean isAtsAdmin = AtsUtilClient.isAtsAdmin();
- if (!isAtsAdmin && Admin_Only_Relation_Type_Ids.contains(relationType.getGuid())) {
+ if (!isAtsAdmin && Admin_Only_Relation_Type_Ids.contains(relationType.getId())) {
return createStatus(
String.format("Deletion of relation type [%s] off artifact [%s] is only permitted by ATS Admin",
relationType, artifact));
@@ -176,8 +176,7 @@ public class AtsArtifactChecks extends ArtifactCheck {
private Set<String> getActionableItemGuidsWithRecurse(HashSet<String> aiaGuids, Collection<Artifact> artifacts) {
for (Artifact art : artifacts) {
if (art.isOfType(AtsArtifactTypes.ActionableItem)) {
- IAtsActionableItem aia =
- AtsClientService.get().getCache().getAtsObject(art.getId());
+ IAtsActionableItem aia = AtsClientService.get().getCache().getAtsObject(art.getId());
if (aia != null) {
aiaGuids.add(AtsUtilCore.getGuid(aia));
Collection<Artifact> childArts = art.getChildren();
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java
index a2c71067b1c..83b00c089f0 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java
@@ -369,7 +369,7 @@ public class ArtifactEventTest {
remGuidRel.setBranchGuid(COMMON);
remGuidRel.setGammaId(incrementingGammaId++);
- remGuidRel.setRelTypeGuid(relType.getGuid());
+ remGuidRel.setRelTypeGuid(relType.getId());
remGuidRel.setRelationId(relationId);
remGuidRel.setArtAId(artA.getArtId());
remGuidRel.setArtBId(artB.getArtId());
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java
index ce879136c34..ba5a98ecf3f 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java
@@ -63,7 +63,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe
@Test
public void testProcessDataRelationTypeNoMatch() throws OseeCoreException {
IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child;
- XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName());
+ XRelationType relationTypeRef = MockModel.createXRelationType(relationType);
RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction();
restriction.setPermission(AccessPermissionEnum.ALLOW);
@@ -78,7 +78,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe
@Test
public void testProcessDataRelationTypeMatchSideANoMatch() throws OseeCoreException {
IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child;
- XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName());
+ XRelationType relationTypeRef = MockModel.createXRelationType(relationType);
RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction();
restriction.setPermission(AccessPermissionEnum.ALLOW);
@@ -102,7 +102,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe
@Test
public void testProcessDataRelationTypeMatchSideAMatch() throws OseeCoreException {
IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child;
- XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName());
+ XRelationType relationTypeRef = MockModel.createXRelationType(relationType);
RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction();
restriction.setPermission(AccessPermissionEnum.ALLOW);
@@ -130,7 +130,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe
@Test
public void testProcessDataRelationTypeMatchSideBNoMatch() throws OseeCoreException {
IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child;
- XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName());
+ XRelationType relationTypeRef = MockModel.createXRelationType(relationType);
RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction();
restriction.setPermission(AccessPermissionEnum.ALLOW);
@@ -155,7 +155,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe
@Test
public void testProcessDataRelationTypeMatchSideBMatch() throws OseeCoreException {
IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child;
- XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName());
+ XRelationType relationTypeRef = MockModel.createXRelationType(relationType);
RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction();
restriction.setPermission(AccessPermissionEnum.ALLOW);
@@ -183,7 +183,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe
@Test
public void testProcessDataRelationTypeMatchBothMatch() throws OseeCoreException {
IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child;
- XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName());
+ XRelationType relationTypeRef = MockModel.createXRelationType(relationType);
RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction();
restriction.setPermission(AccessPermissionEnum.ALLOW);
@@ -314,7 +314,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe
private void testProcessRelationWithArtifactHelper(String artifactName, String matcherArtifactName, Scope expectedScope) throws OseeCoreException {
IRelationType relationType = CoreRelationTypes.Default_Hierarchical__Child;
- XRelationType relationTypeRef = MockModel.createXRelationType(relationType.getGuid(), relationType.getName());
+ XRelationType relationTypeRef = MockModel.createXRelationType(relationType);
RelationTypeRestriction restriction = MockModel.createRelationTypeRestriction();
restriction.setPermission(AccessPermissionEnum.ALLOW);
@@ -358,7 +358,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe
}
private static RelationType getTestRelationType(IRelationType relationType, IArtifactType aArtTypeToken, IArtifactType bArtTypeToken) {
- return new RelationType(relationType.getGuid(), relationType.getName(), "sideA_" + aArtTypeToken.getName(),
+ return new RelationType(relationType.getId(), relationType.getName(), "sideA_" + aArtTypeToken.getName(),
"sideB_" + bArtTypeToken.getName(), aArtTypeToken, bArtTypeToken, RelationTypeMultiplicity.MANY_TO_MANY,
RelationOrderBaseTypes.LEXICOGRAPHICAL_ASC.getGuid());
}
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockModel.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockModel.java
index 1433bf8121d..63fcf72fb88 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockModel.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/mocks/MockModel.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.dsl.integration.mocks;
+import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.dsl.OseeDslResourceUtil;
import org.eclipse.osee.framework.core.dsl.oseeDsl.AccessContext;
import org.eclipse.osee.framework.core.dsl.oseeDsl.ArtifactMatchRestriction;
@@ -121,12 +122,14 @@ public final class MockModel {
return toReturn;
}
- public static XRelationType createXRelationType(long uuid, String name) throws OseeCoreException {
+ public static XRelationType createXRelationType(IRelationType type) throws OseeCoreException {
+ String name = type.getName();
+ long id = type.getId();
XRelationType toReturn = OseeDslFactory.eINSTANCE.createXRelationType();
Assert.assertNotNull(toReturn);
- toReturn.setUuid(HexUtil.toString(uuid));
+ toReturn.setUuid(HexUtil.toString(id));
toReturn.setName(name);
- Assert.assertEquals(uuid, HexUtil.toLong(toReturn.getUuid()));
+ Assert.assertEquals(id, HexUtil.toLong(toReturn.getUuid()));
Assert.assertEquals(name, toReturn.getName());
return toReturn;
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/RelationTypeSide.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/RelationTypeSide.java
index 630d7870e14..6883034ae13 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/RelationTypeSide.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/RelationTypeSide.java
@@ -26,7 +26,7 @@ public class RelationTypeSide extends NamedId implements IRelationTypeSide {
private RelationTypeSide opposite;
public RelationTypeSide(IRelationType type, RelationSide side) {
- super(type.getGuid(), type.getName());
+ super(type.getId(), type.getName());
this.type = type;
this.side = side;
}
@@ -45,7 +45,7 @@ public class RelationTypeSide extends NamedId implements IRelationTypeSide {
@Override
public boolean isOfType(IRelationType type) {
- return type.getGuid() == this.type.getGuid();
+ return this.type.equals(type);
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelation.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelation.java
index 82e0b212aac..b78724d3606 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelation.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelation.java
@@ -145,7 +145,7 @@ public class DefaultBasicUuidRelation implements IBasicGuidRelation {
public boolean is(IRelationType... relationTypes) {
for (IRelationType relType : relationTypes) {
- if (relType.getGuid().equals(getRelTypeGuid())) {
+ if (relType.equals(getRelTypeGuid())) {
return true;
}
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelationReorder.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelationReorder.java
index 0ab8d47ab56..db9c43ea85f 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelationReorder.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicUuidRelationReorder.java
@@ -104,7 +104,7 @@ public class DefaultBasicUuidRelationReorder implements IBasicRelationReorder {
public boolean is(IRelationType... relationTypes) {
for (IRelationType relType : relationTypes) {
- if (relType.getGuid().equals(getRelTypeGuid())) {
+ if (relType.equals(getRelTypeGuid())) {
return true;
}
}
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IRelationType.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IRelationType.java
index 8514f23a69e..8b83bb8de4f 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IRelationType.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IRelationType.java
@@ -21,9 +21,6 @@ import org.eclipse.osee.framework.jdk.core.type.NamedId;
*/
@JsonSerialize(using = IdSerializer.class)
public interface IRelationType extends Named, Id {
- default Long getGuid() {
- return getId();
- }
public static IRelationType valueOf(long id, String name) {
final class RelationTypeImpl extends NamedId implements IRelationType {
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IRelationTypeSide.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IRelationTypeSide.java
index 2891cfd47c3..dd90fde4e4a 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IRelationTypeSide.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/IRelationTypeSide.java
@@ -18,4 +18,9 @@ public interface IRelationTypeSide extends IRelationType {
IRelationTypeSide getOpposite();
boolean isOfType(IRelationType type);
+
+ default Long getGuid() {
+ return getId();
+ }
+
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/InRelationSearch.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/InRelationSearch.java
index 0aad5a781f2..ac23ab68341 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/InRelationSearch.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/InRelationSearch.java
@@ -35,7 +35,7 @@ public class InRelationSearch implements ISearchPrimitive {
@Override
public String getStorageString() {
- return sideA + TOKEN + relationType.getGuid().toString();
+ return sideA + TOKEN + relationType.getId();
}
public static InRelationSearch getPrimitive(String storageString) {
@@ -54,7 +54,7 @@ public class InRelationSearch implements ISearchPrimitive {
builder.andExists(relationType);
} else {
RelationSide side = sideA.booleanValue() ? RelationSide.SIDE_A : RelationSide.SIDE_B;
- IRelationTypeSide rts = TokenFactory.createRelationTypeSide(side, relationType.getGuid(), "SearchRelTypeSide");
+ IRelationTypeSide rts = TokenFactory.createRelationTypeSide(side, relationType.getId(), "SearchRelTypeSide");
builder.andExists(rts);
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/NotInRelationSearch.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/NotInRelationSearch.java
index 3adbce98948..76016c6ef69 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/NotInRelationSearch.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/NotInRelationSearch.java
@@ -35,7 +35,7 @@ public class NotInRelationSearch implements ISearchPrimitive {
@Override
public String getStorageString() {
- return sideA + TOKEN + relationType.getGuid().toString();
+ return sideA + TOKEN + relationType.getId();
}
public static NotInRelationSearch getPrimitive(String storageString) {
@@ -54,7 +54,7 @@ public class NotInRelationSearch implements ISearchPrimitive {
builder.andNotExists(relationType);
} else {
RelationSide side = sideA.booleanValue() ? RelationSide.SIDE_A : RelationSide.SIDE_B;
- IRelationTypeSide rts = TokenFactory.createRelationTypeSide(side, relationType.getGuid(), "SearchRelTypeSide");
+ IRelationTypeSide rts = TokenFactory.createRelationTypeSide(side, relationType.getId(), "SearchRelTypeSide");
builder.andNotExists(rts);
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/RelationCriteria.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/RelationCriteria.java
index 9db2fb49429..1894d52814e 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/RelationCriteria.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/RelationCriteria.java
@@ -54,13 +54,13 @@ public class RelationCriteria implements ArtifactSearchCriteria {
public void addToQueryBuilder(QueryBuilder builder) throws OseeCoreException {
if (artifactId.isValid()) {
IRelationTypeSide rts =
- TokenFactory.createRelationTypeSide(relationSide, relationType.getGuid(), Strings.EMPTY_STRING);
+ TokenFactory.createRelationTypeSide(relationSide, relationType.getId(), Strings.EMPTY_STRING);
builder.andRelatedTo(rts, artifactId);
} else if (relationSide == null) {
builder.andExists(relationType);
} else {
IRelationTypeSide rts =
- TokenFactory.createRelationTypeSide(relationSide, relationType.getGuid(), "SearchRelationTypeSide");
+ TokenFactory.createRelationTypeSide(relationSide, relationType.getId(), "SearchRelationTypeSide");
builder.andExists(rts);
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java
index 14a23a80f0b..4dbdb9291bb 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java
@@ -162,7 +162,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender {
guidArts.add(record.getParentArt());
} else {
for (IRelationType type : relationTypes) {
- if (record.getRelTypeGuid().equals(type.getGuid())) {
+ if (type.equals(record.getRelTypeGuid())) {
guidArts.add(record.getParentArt());
}
}
diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationManagerTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationManagerTest.java
index b118a65e502..6a97c33c928 100644
--- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationManagerTest.java
+++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationManagerTest.java
@@ -215,7 +215,7 @@ public class RelationManagerTest {
graph.addAdjacencies(node, adjacents);
when(graph.getAdjacencies(node)).thenReturn(adjacents);
for (Relation relation : relations) {
- adjacents.add(relation.getRelationType().getGuid(), relation);
+ adjacents.add(relation.getRelationType().getId(), relation);
}
}
diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImplTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImplTest.java
index 49b56c4fc9b..b59e03aba70 100644
--- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImplTest.java
+++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImplTest.java
@@ -366,7 +366,7 @@ public class RelationManagerImplTest {
verify(resolver).resolve(session, graph, relations, SIDE_A);
- IRelationTypeSide typeSide = TokenFactory.createRelationTypeSide(SIDE_A, TYPE_1.getGuid(), TYPE_1.getName());
+ IRelationTypeSide typeSide = TokenFactory.createRelationTypeSide(SIDE_A, TYPE_1.getId(), TYPE_1.getName());
verify(orderManager1).sort(typeSide, nodes);
}
@@ -537,8 +537,8 @@ public class RelationManagerImplTest {
verify(container2).getRelation(node1, TYPE_1, node2, INCLUDE_DELETED);
verify(relationFactory).createRelation(node1, TYPE_1, node2);
verify(orderManager1).setOrder(eq(typeSide), eq(LEXICOGRAPHICAL_ASC), sortedListCaptor.capture());
- verify(container1).add(TYPE_1.getGuid(), relation1);
- verify(container2).add(TYPE_1.getGuid(), relation1);
+ verify(container1).add(TYPE_1.getId(), relation1);
+ verify(container2).add(TYPE_1.getId(), relation1);
}
@Test
@@ -565,8 +565,8 @@ public class RelationManagerImplTest {
verify(relationFactory).createRelation(node1, TYPE_1, node2);
verify(orderManager1).getSorterId(typeSide);
verify(orderManager1).setOrder(eq(typeSide), eq(UNORDERED), sortedListCaptor.capture());
- verify(container1).add(TYPE_1.getGuid(), relation1);
- verify(container2).add(TYPE_1.getGuid(), relation1);
+ verify(container1).add(TYPE_1.getId(), relation1);
+ verify(container2).add(TYPE_1.getId(), relation1);
}
@Test
@@ -592,8 +592,8 @@ public class RelationManagerImplTest {
verify(container1).getRelation(node1, TYPE_1, node2, INCLUDE_DELETED);
verify(container2).getRelation(node1, TYPE_1, node2, INCLUDE_DELETED);
- verify(container1).add(TYPE_1.getGuid(), relation1);
- verify(container2).add(TYPE_1.getGuid(), relation1);
+ verify(container1).add(TYPE_1.getId(), relation1);
+ verify(container2).add(TYPE_1.getId(), relation1);
verify(resolver).resolve(session, graph, toOrder, SIDE_B);
@@ -631,8 +631,8 @@ public class RelationManagerImplTest {
verify(container2).getRelation(node1, DEFAULT_HIERARCHY, node2, INCLUDE_DELETED);
verify(orderManager1).getSorterId(Default_Hierarchical__Child);
verify(orderManager1).setOrder(eq(Default_Hierarchical__Child), eq(UNORDERED), sortedListCaptor.capture());
- verify(container1).add(DEFAULT_HIERARCHY.getGuid(), relation1);
- verify(container2).add(DEFAULT_HIERARCHY.getGuid(), relation1);
+ verify(container1).add(DEFAULT_HIERARCHY.getId(), relation1);
+ verify(container2).add(DEFAULT_HIERARCHY.getId(), relation1);
}
@Test
@@ -657,8 +657,8 @@ public class RelationManagerImplTest {
verify(orderManager1).getSorterId(Default_Hierarchical__Child);
verify(orderManager1).setOrder(eq(Default_Hierarchical__Child), eq(UNORDERED), sortedListCaptor.capture());
- verify(container1).add(DEFAULT_HIERARCHY.getGuid(), relation1);
- verify(container2).add(DEFAULT_HIERARCHY.getGuid(), relation1);
+ verify(container1).add(DEFAULT_HIERARCHY.getId(), relation1);
+ verify(container2).add(DEFAULT_HIERARCHY.getId(), relation1);
}
@Test
@@ -680,8 +680,8 @@ public class RelationManagerImplTest {
verify(orderManager1).getSorterId(Default_Hierarchical__Child);
verify(orderManager1).setOrder(eq(Default_Hierarchical__Child), eq(UNORDERED), sortedListCaptor.capture());
- verify(container1, times(1)).add(DEFAULT_HIERARCHY.getGuid(), relation1);
- verify(container2, times(0)).add(DEFAULT_HIERARCHY.getGuid(), relation1);
+ verify(container1, times(1)).add(DEFAULT_HIERARCHY.getId(), relation1);
+ verify(container2, times(0)).add(DEFAULT_HIERARCHY.getId(), relation1);
verify(relation1).unDelete();
}
@@ -705,7 +705,7 @@ public class RelationManagerImplTest {
verify(orderManager1).getSorterId(Default_Hierarchical__Child);
- verify(container1, times(0)).remove(DEFAULT_HIERARCHY.getGuid(), relation1);
+ verify(container1, times(0)).remove(DEFAULT_HIERARCHY.getId(), relation1);
verify(resolver).resolve(session, graph, relations, SIDE_B);
diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacenciesTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacenciesTest.java
index b8f3d20042e..9b0b80feeac 100644
--- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacenciesTest.java
+++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacenciesTest.java
@@ -63,9 +63,9 @@ public class RelationNodeAdjacenciesTest {
MockitoAnnotations.initMocks(this);
collection = new RelationNodeAdjacencies();
- collection.add(TYPE_1.getGuid(), dirty);
- collection.add(TYPE_2.getGuid(), clean);
- collection.add(TYPE_3.getGuid(), deleted);
+ collection.add(TYPE_1.getId(), dirty);
+ collection.add(TYPE_2.getId(), clean);
+ collection.add(TYPE_3.getId(), deleted);
when(dirty.isDirty()).thenReturn(true);
@@ -84,7 +84,7 @@ public class RelationNodeAdjacenciesTest {
boolean actual1 = collection.hasDirty();
assertTrue(actual1);
- collection.remove(TYPE_1.getGuid(), dirty);
+ collection.remove(TYPE_1.getId(), dirty);
boolean actual2 = collection.hasDirty();
assertFalse(actual2);
@@ -205,7 +205,7 @@ public class RelationNodeAdjacenciesTest {
when(relation.getLocalIdForSide(RelationSide.SIDE_A)).thenReturn(11);
when(relation.getLocalIdForSide(RelationSide.SIDE_B)).thenReturn(22);
- collection.add(TYPE_1.getGuid(), relation);
+ collection.add(TYPE_1.getId(), relation);
when(localId.getLocalId()).thenReturn(22);
Relation actual = (Relation) collection.getResultSet(TYPE_1, DeletionFlag.EXCLUDE_DELETED, localId,
diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java
index 17f41eeffa2..7b56e8d893f 100644
--- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java
+++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java
@@ -44,7 +44,7 @@ import org.mockito.stubbing.Answer;
/**
* Test Case for {@link OrderParser}
- *
+ *
* @author Roberto E. Escobar
*/
public class OrderParserTest {
@@ -65,14 +65,14 @@ public class OrderParserTest {
private static final String ONE_ENTRY_PATTERN = String.format("<OrderList>%s</OrderList>", ENTRY_PATTERN);
private static final String ONE_ENTRY_NO_LIST_PATTERN = String.format("<OrderList>%s</OrderList>", ENTRY_NO_LIST_PATTERN);
private static final String TWO_ENTRY_PATTERN = String.format("<OrderList>%s%s</OrderList>", ENTRY_PATTERN, ENTRY_PATTERN);
-
+
private static final String DATA_1 = String.format(ONE_ENTRY_PATTERN, REL_TYPE_1_NAME, RelationSide.SIDE_B, RelationOrderBaseTypes.USER_DEFINED.getGuid(), Collections.toString(",", ORDER_LIST_1));
private static final String DATA_2 = String.format(ONE_ENTRY_PATTERN, REL_TYPE_1_NAME, RelationSide.SIDE_B, RelationOrderBaseTypes.USER_DEFINED.getGuid(), Collections.toString(",", ORDER_LIST_2));
private static final String DATA_3 = String.format(TWO_ENTRY_PATTERN,
REL_TYPE_1_NAME, RelationSide.SIDE_B, RelationOrderBaseTypes.USER_DEFINED.getGuid(), Collections.toString(",", ORDER_LIST_2),
REL_TYPE_2_NAME, RelationSide.SIDE_A, RelationOrderBaseTypes.LEXICOGRAPHICAL_ASC.getGuid(), Collections.toString(",", ORDER_LIST_3));
private static final String DATA_4 = String.format(ONE_ENTRY_NO_LIST_PATTERN, REL_TYPE_2_NAME, RelationSide.SIDE_A, RelationOrderBaseTypes.LEXICOGRAPHICAL_DESC.getGuid());
-
+
private static final String EMPTY_TYPE = "<OrderList><Order side=\"SIDE_B\" orderType=\"AAT0xogoMjMBhARkBZQA\"></Order></OrderList>";
private static final String EMPTY_SIDE = "<OrderList><Order relType=\"X\" orderType=\"AAT0xogoMjMBhARkBZQA\"></Order></OrderList>";
private static final String EMPTY_ORDER_TYPE = "<OrderList><Order relType=\"X\" side=\"SIDE_B\"></Order></OrderList>";
@@ -85,10 +85,10 @@ public class OrderParserTest {
// @formatter:off
@Mock private RelationTypes relationTypeCache;
@Mock private HasOrderData hasOrderData;
-
+
@Captor private ArgumentCaptor<IRelationTypeSide> typeSideCaptor;
@Captor private ArgumentCaptor<OrderData> orderDataCaptor;
-
+
@Mock private IRelationType relationType1;
@Mock private IRelationType relationType2;
// @formatter:on
@@ -102,10 +102,10 @@ public class OrderParserTest {
parser = new OrderParser(relationTypeCache);
when(relationType1.getName()).thenReturn(REL_TYPE_1_NAME);
- when(relationType1.getGuid()).thenReturn(REL_TYPE_1_ID);
+ when(relationType1.getId()).thenReturn(REL_TYPE_1_ID);
when(relationType2.getName()).thenReturn(REL_TYPE_2_NAME);
- when(relationType2.getGuid()).thenReturn(REL_TYPE_2_ID);
+ when(relationType2.getId()).thenReturn(REL_TYPE_2_ID);
final Collection<? extends IRelationType> types = Arrays.asList(relationType1, relationType2);
diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java
index f936bc96d24..825f51cb7f0 100644
--- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java
+++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java
@@ -755,8 +755,8 @@ public class OrcsTypesTest {
public void testGetRelationTypesByUuid() throws OseeCoreException {
RelationTypes relTypes = orcsTypes.getRelationTypes();
- assertEquals(REQUIREMENT_REL, relTypes.getByUuid(REQUIREMENT_REL.getGuid()));
- assertEquals(ANOTHER_REL, relTypes.getByUuid(ANOTHER_REL.getGuid()));
+ assertEquals(REQUIREMENT_REL, relTypes.getByUuid(REQUIREMENT_REL.getId()));
+ assertEquals(ANOTHER_REL, relTypes.getByUuid(ANOTHER_REL.getId()));
}
@Test
@@ -922,7 +922,7 @@ public class OrcsTypesTest {
IRelationType relation = relTypes.getByUuid(0x2000000000000159L);
assertEquals("Dynamic Relation", relation.getName());
- assertEquals(Long.valueOf(0x2000000000000159L), relation.getGuid());
+ assertEquals(Long.valueOf(0x2000000000000159L), relation.getId());
assertEquals(ARTIFACT, relTypes.getArtifactType(relation, SIDE_A));
assertEquals(OTHER_ARTIFACT, relTypes.getArtifactType(relation, SIDE_B));
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeRelationTypeCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeRelationTypeCommand.java
index bed3e2857b7..9d94e237778 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeRelationTypeCommand.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeRelationTypeCommand.java
@@ -85,7 +85,7 @@ public class PurgeRelationTypeCommand implements ConsoleCommand {
try {
Long typeId = HexUtil.toLong(uuid);
IRelationType type = relationTypes.getByUuid(typeId);
- console.writeln("Type [%s] found. Guid: [0x%X]", type.getName(), type.getGuid());
+ console.writeln("Type [%s] found. Id: [%s]", type.getName(), type.getId());
toReturn.add(type);
} catch (OseeArgumentException ex) {
console.writeln("Type [0x%X] NOT found.", uuid);
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationUtil.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationUtil.java
index 6b967e9d41a..8eb56873416 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationUtil.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationUtil.java
@@ -38,13 +38,13 @@ public final class RelationUtil {
}
public static IRelationTypeSide asTypeSide(IRelationType type, RelationSide side) {
- return TokenFactory.createRelationTypeSide(side, type.getGuid(), type.getName());
+ return TokenFactory.createRelationTypeSide(side, type.getId(), type.getName());
}
/**
* Orders artifacts into a and b relation nodes using relation side parameter as a specification of where art2 is in
* the set.
- *
+ *
* @param art1 The First artifact
* @param art2 The Second artifact
* @param side What side is artifact 2 on
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java
index 5c306898825..3d581c70088 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java
@@ -32,7 +32,6 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IRelationSorterId;
@@ -245,8 +244,8 @@ public class RelationManagerImpl implements RelationManager {
boolean updated = false;
if (relation == null) {
relation = relationFactory.createRelation(aNode, type, bNode);
- graph.<RelationNodeAdjacencies> getAdjacencies(aNode).add(type.getGuid(), relation);
- graph.<RelationNodeAdjacencies> getAdjacencies(bNode).add(type.getGuid(), relation);
+ graph.<RelationNodeAdjacencies> getAdjacencies(aNode).add(type.getId(), relation);
+ graph.<RelationNodeAdjacencies> getAdjacencies(bNode).add(type.getId(), relation);
updated = true;
}
if (relation.isDeleted()) {
@@ -392,11 +391,11 @@ public class RelationManagerImpl implements RelationManager {
Relation relation = aAdjacencies.getRelation(aNode, type, bNode, inludeDeleted);
if (relation != null) {
- bAdjacencies.add(type.getGuid(), relation);
+ bAdjacencies.add(type.getId(), relation);
} else {
relation = bAdjacencies.getRelation(aNode, type, bNode, inludeDeleted);
if (relation != null) {
- aAdjacencies.add(type.getGuid(), relation);
+ aAdjacencies.add(type.getId(), relation);
}
}
return ResultSets.singleton(relation);
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacencies.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacencies.java
index 66e4e27b036..0cbbb8ccf45 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacencies.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeAdjacencies.java
@@ -32,7 +32,7 @@ import org.eclipse.osee.orcs.core.internal.util.OrcsPredicates;
/**
* @author Roberto E. Escobar
*/
-public class RelationNodeAdjacencies extends AbstractTypeCollection<IRelationType, Relation, Long, Relation>implements GraphAdjacencies {
+public class RelationNodeAdjacencies extends AbstractTypeCollection<IRelationType, Relation, Long, Relation> implements GraphAdjacencies {
@Override
protected ResultSet<Relation> createResultSet(List<Relation> values) {
@@ -58,7 +58,7 @@ public class RelationNodeAdjacencies extends AbstractTypeCollection<IRelationTyp
@SuppressWarnings({"unchecked", "rawtypes"})
public List<Relation> getList(IRelationType type, DeletionFlag includeDeleted) throws OseeCoreException {
Predicate deletionFlagEquals = deletionFlagEquals(includeDeleted);
- return getListByFilter(type.getGuid(), deletionFlagEquals);
+ return getListByFilter(type.getId(), deletionFlagEquals);
}
@SuppressWarnings({"unchecked", "rawtypes"})
@@ -66,13 +66,13 @@ public class RelationNodeAdjacencies extends AbstractTypeCollection<IRelationTyp
Predicate deletionFlagEquals = deletionFlagEquals(includeDeleted);
Predicate relIdOnSide = nodeIdOnSideEquals(localId, side);
Predicate matcher = and(deletionFlagEquals, relIdOnSide);
- return getListByFilter(type.getGuid(), matcher);
+ return getListByFilter(type.getId(), matcher);
}
@SuppressWarnings({"unchecked", "rawtypes"})
public ResultSet<Relation> getResultSet(IRelationType type, DeletionFlag includeDeleted) throws OseeCoreException {
Predicate deletionFlagEquals = deletionFlagEquals(includeDeleted);
- return getSetByFilter(type.getGuid(), deletionFlagEquals);
+ return getSetByFilter(type.getId(), deletionFlagEquals);
}
@SuppressWarnings({"unchecked", "rawtypes"})
@@ -80,7 +80,7 @@ public class RelationNodeAdjacencies extends AbstractTypeCollection<IRelationTyp
Predicate deletionFlagEquals = deletionFlagEquals(includeDeleted);
Predicate relIdOnSide = nodeIdOnSideEquals(localId, side);
Predicate matcher = and(deletionFlagEquals, relIdOnSide);
- return getSetByFilter(type.getGuid(), matcher);
+ return getSetByFilter(type.getId(), matcher);
}
@SuppressWarnings({"rawtypes", "unchecked"})
@@ -88,7 +88,7 @@ public class RelationNodeAdjacencies extends AbstractTypeCollection<IRelationTyp
Predicate<Relation> nodeMatcher = OrcsPredicates.nodeIdsEquals(aNode, bNode);
Predicate deletionFlagEquals = deletionFlagEquals(excludeDeleted);
Predicate matcher = and(deletionFlagEquals, nodeMatcher);
- List<Relation> listByFilter = getListByFilter(type.getGuid(), matcher);
+ List<Relation> listByFilter = getListByFilter(type.getId(), matcher);
return listByFilter.isEmpty() ? null : listByFilter.get(0);
}
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParser.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParser.java
index 3bf2cf8dbba..a2e6697abcb 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParser.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParser.java
@@ -120,8 +120,7 @@ public class OrderParser {
});
RelationSide side = RelationSide.fromString(relationSide);
- IRelationTypeSide typeSide =
- TokenFactory.createRelationTypeSide(side, type.getGuid(), type.getName());
+ IRelationTypeSide typeSide = TokenFactory.createRelationTypeSide(side, type.getId(), type.getName());
IRelationSorterId sorterId = RelationOrderBaseTypes.getFromGuid(orderType);
OrderData orderData = new OrderData(sorterId, list);
hasOrderData.add(typeSide, orderData);
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java
index e7f2b4b4c6b..e42100ad5d7 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java
@@ -694,7 +694,7 @@ public class OrcsScriptInterpreterImpl implements OrcsScriptInterpreter {
if (clazz.isAssignableFrom(String.class)) {
String name = resolver.resolveSingle(String.class, expression);
IRelationType type = getRelationType(name);
- toReturn = TokenFactory.createRelationTypeSide(asSide(side), type.getGuid(), type.getName());
+ toReturn = TokenFactory.createRelationTypeSide(asSide(side), type.getId(), type.getName());
} else {
long typeId = resolver.resolveSingle(Long.class, expression);
toReturn = TokenFactory.createRelationTypeSide(asSide(side), typeId, "N/A");
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/RelationTypesImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/RelationTypesImpl.java
index 6388f438cb8..1f34786780f 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/RelationTypesImpl.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/RelationTypesImpl.java
@@ -149,6 +149,6 @@ public class RelationTypesImpl implements RelationTypes {
@Override
public boolean exists(IRelationType item) throws OseeCoreException {
- return provider.getRelationTypeIndex().existsByUuid(item.getGuid());
+ return provider.getRelationTypeIndex().existsByUuid(item.getId());
}
}
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataFactoryImplTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataFactoryImplTest.java
index 1c64529ce79..87ed66058ce 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataFactoryImplTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataFactoryImplTest.java
@@ -251,7 +251,7 @@ public class DataFactoryImplTest {
HasLocalId<Integer> localId1 = mock(HasLocalId.class);
HasLocalId<Integer> localId2 = mock(HasLocalId.class);
- when(relationType.getGuid()).thenReturn(2389L);
+ when(relationType.getId()).thenReturn(2389L);
when(localId1.getLocalId()).thenReturn(4562);
when(localId2.getLocalId()).thenReturn(9513);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeRelationTypeDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeRelationTypeDatabaseTxCallable.java
index fe5330df007..69bb39ba636 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeRelationTypeDatabaseTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeRelationTypeDatabaseTxCallable.java
@@ -30,7 +30,7 @@ import org.eclipse.osee.orcs.OrcsSession;
* <li>osee_relation_link</li>
* </p>
* <br/>
- *
+ *
* @author Karol M. Wilk
*/
public final class PurgeRelationTypeDatabaseTxCallable extends AbstractDatastoreTxCallable<Void> {
@@ -62,7 +62,7 @@ public final class PurgeRelationTypeDatabaseTxCallable extends AbstractDatastore
JdbcStatement chStmt = getJdbcClient().getStatement(connection);
try {
for (IRelationType type : types) {
- chStmt.runPreparedQuery(RETRIEVE_GAMMAS_OF_REL_LINK_TXS, type.getGuid());
+ chStmt.runPreparedQuery(RETRIEVE_GAMMAS_OF_REL_LINK_TXS, type);
while (chStmt.next()) {
gammas.add(new Integer[] {chStmt.getInt("gamma_id")});
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/OrcsObjectFactoryImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/OrcsObjectFactoryImpl.java
index 54447d60d30..005996ff559 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/OrcsObjectFactoryImpl.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/OrcsObjectFactoryImpl.java
@@ -138,7 +138,7 @@ public class OrcsObjectFactoryImpl implements OrcsObjectFactory {
@Override
public RelationData createRelationData(VersionData version, Integer localId, IRelationType type, ModificationType modType, int aArtId, int bArtId, String rationale, ApplicabilityId applicId) {
- long typeId = type.getGuid();
+ long typeId = type.getId();
return createRelationData(version, localId, typeId, modType, typeId, modType, aArtId, bArtId, rationale,
applicId);
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/RelationTypeExistsSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/RelationTypeExistsSqlHandler.java
index 20315c0b0c9..7a8ead93e31 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/RelationTypeExistsSqlHandler.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/RelationTypeExistsSqlHandler.java
@@ -39,7 +39,7 @@ public class RelationTypeExistsSqlHandler extends AbstractRelationSqlHandler<Cri
IRelationType type = criteria.getType();
writer.write(relAlias);
writer.write(".rel_link_type_id = ?");
- writer.addParameter(type.getGuid());
+ writer.addParameter(type.getId());
List<String> aliases = writer.getAliases(TableEnum.ARTIFACT_TABLE);
if (!aliases.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/RelationTypeNotExistsSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/RelationTypeNotExistsSqlHandler.java
index cf38c1cf25a..e46d7477083 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/RelationTypeNotExistsSqlHandler.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/RelationTypeNotExistsSqlHandler.java
@@ -33,7 +33,7 @@ public class RelationTypeNotExistsSqlHandler extends AbstractRelationSqlHandler<
writer.write(" rel, ");
writer.write(TableEnum.TXS_TABLE.getName());
writer.write(" txs WHERE rel.rel_link_type_id = ?");
- writer.addParameter(type.getGuid());
+ writer.addParameter(type.getId());
List<String> aliases = writer.getAliases(TableEnum.ARTIFACT_TABLE);
writer.writeAndLn();
diff --git a/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/predicate/ExistenceTypePredicateHandlerTest.java b/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/predicate/ExistenceTypePredicateHandlerTest.java
index 9e0ebc680df..6829e2140f1 100644
--- a/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/predicate/ExistenceTypePredicateHandlerTest.java
+++ b/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/predicate/ExistenceTypePredicateHandlerTest.java
@@ -67,7 +67,7 @@ public class ExistenceTypePredicateHandlerTest {
handler.handle(builder, testPredicate);
verify(builder).andExists(relationTypeCaptor.capture());
Assert.assertEquals(1, relationTypeCaptor.getAllValues().size());
- Assert.assertTrue(12345L == relationTypeCaptor.getValue().getGuid());
+ Assert.assertTrue(12345L == relationTypeCaptor.getValue().getId());
}
@Test
@@ -82,7 +82,7 @@ public class ExistenceTypePredicateHandlerTest {
verify(builder).andExists(relationTypeCaptor.capture());
Assert.assertEquals(1, relationTypeCaptor.getAllValues().size());
- Assert.assertTrue(12345L == relationTypeCaptor.getValue().getGuid());
+ Assert.assertTrue(12345L == relationTypeCaptor.getValue().getId());
}
@Test
@@ -100,10 +100,10 @@ public class ExistenceTypePredicateHandlerTest {
Assert.assertEquals(2, relationTypeCaptor.getAllValues().size());
IRelationType type = relationTypeCaptor.getAllValues().get(0);
- Assert.assertTrue(12345L == type.getGuid());
+ Assert.assertTrue(12345L == type.getId());
type = relationTypeCaptor.getAllValues().get(1);
- Assert.assertTrue(34567L == type.getGuid());
+ Assert.assertTrue(34567L == type.getId());
}
@Test
diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/ExistenceTypePredicateHandler.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/ExistenceTypePredicateHandler.java
index 0cec4fa81e4..05a452f4047 100644
--- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/ExistenceTypePredicateHandler.java
+++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/ExistenceTypePredicateHandler.java
@@ -66,7 +66,7 @@ public class ExistenceTypePredicateHandler implements PredicateHandler {
} else if ("relTypeSide".equals(existsType)) {
RelationSide side = typeParameters.get(1).equals("A") ? RelationSide.SIDE_A : RelationSide.SIDE_B;
for (IRelationType rt : PredicateHandlerUtil.getIRelationTypes(values)) {
- IRelationTypeSide rts = TokenFactory.createRelationTypeSide(side, rt.getGuid(), "SearchRelTypeSide");
+ IRelationTypeSide rts = TokenFactory.createRelationTypeSide(side, rt.getId(), "SearchRelTypeSide");
if (checkExists(predicate.getType())) {
builder.andExists(rts);
} else {
diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OwFactory.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OwFactory.java
index 5319f440ae7..e0c97c6d0da 100644
--- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OwFactory.java
+++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OwFactory.java
@@ -64,9 +64,9 @@ public class OwFactory {
public static OwRelationType createRelationType(IRelationType relType, String sideName, boolean sideA) {
String sideData =
- String.format("[%s]-[%s]-[Side %s]-[%d]", relType.getName(), sideName, sideA ? "A" : "B", relType.getGuid());
+ String.format("[%s]-[%s]-[Side %s]-[%s]", relType.getName(), sideName, sideA ? "A" : "B", relType.getId());
OwRelationType owType = new OwRelationType();
- owType.setUuid(relType.getGuid());
+ owType.setUuid(relType.getId());
owType.setName(relType.getName());
owType.setData(sideData);
owType.setSideA(sideA);

Back to the top