Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Minks2018-05-23 14:16:45 -0400
committerRyan D. Brooks2018-06-02 01:34:09 -0400
commit691bcdb144e8a7ac5b8c2faec2ed0b207133075a (patch)
tree080357fb7c7744a4a39b5b59af55e3bd83b51e3a
parent84b8de6bdc2e4fefec4311d8ab2e45a33abfa3c9 (diff)
downloadorg.eclipse.osee-691bcdb144e8a7ac5b8c2faec2ed0b207133075a.tar.gz
org.eclipse.osee-691bcdb144e8a7ac5b8c2faec2ed0b207133075a.tar.xz
org.eclipse.osee-691bcdb144e8a7ac5b8c2faec2ed0b207133075a.zip
refactor: Use OSEE primitive GammaId
Change-Id: I10e159771468cc8bdd688b72b065492956bf8394 Signed-off-by: Mark Minks <mark.minks@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java15
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsChangeSet.java2
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java5
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java18
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java24
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ConflictDeletionTest.java9
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/LoadDeletedRelationTest.java7
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationCacheTest.java5
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java4
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ArtifactRendererTest.java9
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/InterArtifactDropTest.java2
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java10
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicIdRelation.java11
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidRelation.java3
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/Id.java8
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAttributeChange1.java9
-rw-r--r--plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidRelation1.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidRelationTest.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilterTest.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java18
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java7
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTransactionData.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java16
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/RelationLoader.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeRow.java7
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTransactionData.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/RelationRow.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/DataStore.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/DefaultAttributeDataProvider.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/IAttributeDataProvider.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/MappedAttributeDataProvider.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/UriAttributeDataProvider.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/utils/AttributeResourceProcessor.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeBuilder.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeWorker.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeBuilder.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeWorker.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ChangeBuilder.java8
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeBuilder.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflict.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/Conflict.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/RelationConflict.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java9
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidRelation.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java15
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java7
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTransactionData.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java17
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/RelationChangeAcquirer.java6
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/BaseTransactionData.java11
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java5
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Address.java11
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java15
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteMultipleAttributesBlam.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/ItemsDeletedWithNoOtherModification.java11
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/LocalRelationLink.java5
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java13
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataProxy.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/IndexedResource.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java18
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java7
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InvalidTxCurrentsAndModTypesCallable.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeAttributeTypeDatabaseTxCallable.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeRelationTypeDatabaseTxCallable.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2ArtifactDataTransformer.java5
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2TxsConsolidateParser.java11
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/RelationLoadProcessor.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/AbstractDataProxy.java9
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallable.java13
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/data/GammaQueueIndexerDataSourceLoader.java11
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/data/IndexerDataSourceImpl.java11
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/AttributeDataMatcher.java5
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderImpl.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/Address.java11
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/IdentityManagerImpl.java1
85 files changed, 328 insertions, 262 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
index f0ae1d3c8a..135dabbd1d 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java
@@ -55,6 +55,7 @@ import org.eclipse.osee.ats.workflow.teamwf.TeamWorkFlowArtifact;
import org.eclipse.osee.ats.world.WorldXNavigateItemAction;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.exception.BranchDoesNotExist;
import org.eclipse.osee.framework.core.model.type.AttributeType;
import org.eclipse.osee.framework.core.util.result.XResultData;
@@ -456,12 +457,14 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
stateAttr.delete();
}
// else attempt to delete the oldest
- else if (storedStateAttr != null && stateAttr.getGammaId() < storedStateAttr.getGammaId()) {
+ else if (storedStateAttr != null && stateAttr.getGammaId().isLessThan(
+ storedStateAttr.getGammaId())) {
errorStr += String.format(
" - stateStr [%s] earlier than storedStateStr [%s] - deleted stateAttr - FIXED", stateStr,
storedStateStr, awa.getLastModified());
stateAttr.delete();
- } else if (storedStateAttr != null && storedStateAttr.getGammaId() < stateAttr.getGammaId()) {
+ } else if (storedStateAttr != null && storedStateAttr.getGammaId().isLessThan(
+ stateAttr.getGammaId())) {
errorStr += String.format(
" - stateStr [%s] later than storedStateStr [%s] - deleted storeStateAttr - FIXED", stateStr,
storedStateStr, awa.getLastModified());
@@ -866,10 +869,10 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
artifact.getArtifactTypeName(), attrType.getName(), attrType.getMaxOccurrences(), count,
artifact.getAttributesToString(attrType));
Map<String, Attribute<?>> valuesAttrMap = new HashMap<>();
- int latestGamma = 0;
+ GammaId latestGamma = GammaId.valueOf(0);
StringBuffer fixInfo = new StringBuffer(" - FIX AVAILABLE");
for (Attribute<?> attr : artifact.getAttributes(attrType)) {
- if (attr.getGammaId() > latestGamma) {
+ if (attr.getGammaId().isValid()) {
latestGamma = attr.getGammaId();
}
String info = String.format("[Gamma [%s] Value [%s]]", attr.getGammaId(), attr.getValue());
@@ -878,11 +881,11 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction {
}
fixInfo.append(" - KEEP Gamma");
fixInfo.append(latestGamma);
- if (latestGamma != 0) {
+ if (latestGamma.isValid()) {
result += fixInfo;
if (fixAttributeValues) {
for (Attribute<?> attr : artifact.getAttributes(attrType)) {
- if (attr.getGammaId() != latestGamma) {
+ if (attr.getGammaId().notEqual(latestGamma)) {
attr.delete();
}
}
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsChangeSet.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsChangeSet.java
index b23c5f5625..6cf2998edd 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsChangeSet.java
@@ -377,7 +377,7 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
@Override
public <T> void setAttribute(ArtifactId artifact, AttributeId attrId, T value) {
Conditions.checkExpressionFailOnTrue(attrId.isInvalid(),
- "Can not set attribute by id that has not been persisted. Atrribute Id [%s] ArtifactId [%s]", attrId,
+ "Can not set attribute by id that has not been persisted. Attribute Id [%s] ArtifactId [%s]", attrId,
artifact.toString());
boolean found = false;
for (Attribute<?> attribute : getArtifact(artifact).getAttributes()) {
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java
index e9efd611f2..3cb6736619 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.client.test.framework.OseeLogMonitorRule;
import org.eclipse.osee.client.test.framework.TestInfo;
import org.eclipse.osee.define.ide.traceability.operations.ImportTraceUnitsOperation;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
@@ -108,7 +109,7 @@ public final class ImportTraceUnitsOperationTest {
@Test
public void testImportTraceUnitsJob() throws Exception {
- ArrayList<Integer> gammas = new ArrayList<>(RUNS);
+ ArrayList<GammaId> gammas = new ArrayList<>(RUNS);
for (int i = 0; i < RUNS; i++) {
runOperation(Arrays.asList(testFile.toURI()));
@@ -118,7 +119,7 @@ public final class ImportTraceUnitsOperationTest {
ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.CodeUnit, fileNames[j], importToBranch);
Assert.assertNotNull(artifact);
- Integer gamma = artifact.getGammaId();
+ GammaId gamma = artifact.getGammaId();
if (!gammas.contains(gamma)) {
gammas.add(gamma);
}
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 9f5b569f16..13b87ba99f 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
@@ -20,6 +20,7 @@ import java.util.Set;
import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule;
import org.eclipse.osee.client.test.framework.OseeHousekeepingRule;
import org.eclipse.osee.client.test.framework.OseeLogMonitorRule;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.data.OseeData;
import org.eclipse.osee.framework.core.data.TransactionId;
@@ -84,11 +85,12 @@ public class ArtifactEventTest {
@Rule
public OseeHousekeepingRule oseeHousekeepingRule = new OseeHousekeepingRule();
- private static int incrementingGammaId = 2231;
+ private static GammaId incrementingGammaId = GammaId.valueOf(2231);
private ArtifactEventListener listener;
private RemoteNetworkSender1 networkSender;
private final TransactionId tx = TransactionId.valueOf(1000);
+ private final GammaId gammaId7 = GammaId.valueOf(7);
@Before
public void setup() {
@@ -365,7 +367,7 @@ public class ArtifactEventTest {
remGuidRel.setModTypeGuid(relationEventType.getGuid());
remGuidRel.setBranchGuid(COMMON);
- remGuidRel.setGammaId(incrementingGammaId++);
+ remGuidRel.setGammaId(incrementingGammaId.increment(1));
remGuidRel.setRelTypeGuid(relType.getId());
remGuidRel.setRelationId(relationId);
remGuidRel.setArtAId(artA.getArtId());
@@ -722,7 +724,7 @@ public class ArtifactEventTest {
// Create modify attribute record
int nameAttrId = injectArt.getAttributes().iterator().next().getId().intValue();
remAttrChg.setAttributeId(nameAttrId);
- remAttrChg.setGammaId(1000);
+ remAttrChg.setGammaId(gammaId7);
remAttrChg.setAttributeType(CoreAttributeTypes.Name);
remAttrChg.setModTypeGuid(AttributeEventModificationType.Modified.getGuid());
remAttrChg.getData().add(NEW_NAME);
@@ -751,7 +753,7 @@ public class ArtifactEventTest {
Assert.assertEquals(AttributeEventModificationType.Modified,
AttributeEventModificationType.getType(attrChg.getModTypeGuid()));
Assert.assertEquals(CoreAttributeTypes.Name, attrChg.getAttrTypeGuid());
- Assert.assertEquals(1000, attrChg.getGammaId());
+ Assert.assertEquals(gammaId7, attrChg.getGammaId());
Assert.assertEquals(Arrays.asList(NEW_NAME, ""), remAttrChg.getData());
@@ -773,7 +775,7 @@ public class ArtifactEventTest {
// Create add attribute record
RemoteAttributeChange1 remAttrChg = new RemoteAttributeChange1();
remAttrChg.setAttributeId(2343);
- remAttrChg.setGammaId(1000);
+ remAttrChg.setGammaId(gammaId7);
remAttrChg.setAttributeType(CoreAttributeTypes.GeneralStringData);
remAttrChg.setModTypeGuid(AttributeEventModificationType.New.getGuid());
remAttrChg.getData().add(GENERAL_DATA_STRING);
@@ -802,7 +804,7 @@ public class ArtifactEventTest {
Assert.assertEquals(AttributeEventModificationType.New,
AttributeEventModificationType.getType(attrChg.getModTypeGuid()));
Assert.assertEquals(CoreAttributeTypes.GeneralStringData, attrChg.getAttrTypeGuid());
- Assert.assertEquals(1000, attrChg.getGammaId());
+ Assert.assertEquals(gammaId7, attrChg.getGammaId());
Assert.assertEquals(Arrays.asList(GENERAL_DATA_STRING, ""), remAttrChg.getData());
@@ -826,7 +828,7 @@ public class ArtifactEventTest {
int genStrAttrId =
injectArt.getAttributes(CoreAttributeTypes.GeneralStringData).iterator().next().getId().intValue();
remAttrChg.setAttributeId(genStrAttrId);
- remAttrChg.setGammaId(1000);
+ remAttrChg.setGammaId(gammaId7);
remAttrChg.setAttributeType(CoreAttributeTypes.GeneralStringData);
remAttrChg.setModTypeGuid(AttributeEventModificationType.Deleted.getGuid());
remGuidArt.getAttributes().add(remAttrChg);
@@ -854,7 +856,7 @@ public class ArtifactEventTest {
Assert.assertEquals(AttributeEventModificationType.Deleted,
AttributeEventModificationType.getType(attrChg.getModTypeGuid()));
Assert.assertEquals(CoreAttributeTypes.GeneralStringData, attrChg.getAttrTypeGuid());
- Assert.assertEquals(1000, attrChg.getGammaId());
+ Assert.assertEquals(gammaId7, attrChg.getGammaId());
// Validate that artifact was updated
Assert.assertEquals(0, injectArt.getAttributes(CoreAttributeTypes.GeneralStringData).size());
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java
index ec57190a0e..eba53fa138 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java
@@ -73,13 +73,12 @@ public class ChangeDataTest {
ArtifactDelta artDelta = new ArtifactDelta(null, artifactEnd, artifactStart);
ModificationType modType = ModificationType.MODIFIED;
- Change change = new ArtifactChange(workingBranch, GammaId.valueOf(artifactStart.getGammaId()), artifactStart,
- null, modType, "", "", false, artifactStart, artDelta);
+ Change change = new ArtifactChange(workingBranch, artifactStart.getGammaId(), artifactStart, null, modType, "",
+ "", false, artifactStart, artDelta);
theChanges.add(change);
- change = new AttributeChange(workingBranch, GammaId.valueOf(artifactStart.getGammaId()), artifactStart, null,
- ModificationType.NEW, "1.2", "", AttributeId.SENTINEL, ParagraphNumber, modType, false, artifactStart,
- artDelta);
+ change = new AttributeChange(workingBranch, artifactStart.getGammaId(), artifactStart, null, ModificationType.NEW,
+ "1.2", "", AttributeId.SENTINEL, ParagraphNumber, modType, false, artifactStart, artDelta);
theChanges.add(change);
artifactStart = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, workingBranch);
@@ -91,18 +90,17 @@ public class ChangeDataTest {
artDelta = new ArtifactDelta(null, artifactEnd, artifactStart);
modType = ModificationType.MODIFIED;
- change = new ArtifactChange(workingBranch, GammaId.valueOf(artifactStart.getGammaId()), artifactStart, null,
- modType, "", "", false, artifactStart, artDelta);
+ change = new ArtifactChange(workingBranch, artifactStart.getGammaId(), artifactStart, null, modType, "", "",
+ false, artifactStart, artDelta);
theChanges.add(change);
- change = new AttributeChange(workingBranch, GammaId.valueOf(artifactStart.getGammaId()), artifactStart, null,
- ModificationType.NEW, "1.2", "", AttributeId.SENTINEL, ParagraphNumber, modType, false, artifactStart,
- artDelta);
+ change = new AttributeChange(workingBranch, artifactStart.getGammaId(), artifactStart, null, ModificationType.NEW,
+ "1.2", "", AttributeId.SENTINEL, ParagraphNumber, modType, false, artifactStart, artDelta);
theChanges.add(change);
AttributeType nameAttributeType = AttributeTypeManager.getType(CoreAttributeTypes.Name);
- change = new AttributeChange(workingBranch, GammaId.valueOf(artifactStart.getGammaId()), artifactStart, null,
- modType, "test artifact 2A", "test artifact 2", AttributeId.SENTINEL, nameAttributeType, modType, false,
- artifactStart, artDelta);
+ change = new AttributeChange(workingBranch, artifactStart.getGammaId(), artifactStart, null, modType,
+ "test artifact 2A", "test artifact 2", AttributeId.SENTINEL, nameAttributeType, modType, false, artifactStart,
+ artDelta);
theChanges.add(change);
artifactStart = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, workingBranch);
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ConflictDeletionTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ConflictDeletionTest.java
index c77c296887..a020f7d1d5 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ConflictDeletionTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ConflictDeletionTest.java
@@ -24,7 +24,6 @@ import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.enums.TxChange;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.logging.SevereLoggingMonitor;
@@ -379,7 +378,7 @@ public class ConflictDeletionTest {
System.out.println(String.format(
" Art Id = %d Branch Uuid = %d TX_Current = %d mod_type = %d Transaction_id = %d Gamma_id = %d",
chStmt.getInt("art_id"), chStmt.getLong("branch_id"), chStmt.getInt("tx_current"),
- chStmt.getInt("mod_type"), chStmt.getLong("transaction_id"), chStmt.getInt("gamma_id")));
+ chStmt.getInt("mod_type"), chStmt.getLong("transaction_id"), chStmt.getLong("gamma_id")));
}
}
} finally {
@@ -395,10 +394,10 @@ public class ConflictDeletionTest {
chStmt.runPreparedQuery(GET_ATTRIBUTE_DEBUG, attribute.getArtifact().getBranch(), attribute.getId());
while (chStmt.next()) {
System.out.println(String.format(
- " Attribute Id = %d Art_id = %d Branch Uuid = %d TX_Current = %d mod_type = %d Transaction_id = %d Gamma_id = %d",
+ " Attribute Id = %d Art_id = %d Branch Uuid = %d TX_Current = %d mod_type = %d Transaction_id = %d Gamma_id = %s",
chStmt.getInt("attr_id"), chStmt.getInt("art_id"), chStmt.getLong("branch_id"),
chStmt.getInt("tx_current"), chStmt.getInt("mod_type"), chStmt.getLong("transaction_id"),
- chStmt.getInt("gamma_id")));
+ chStmt.getLong("gamma_id")));
}
}
} finally {
@@ -417,7 +416,7 @@ public class ConflictDeletionTest {
" Relation Id = %d a_art_id = %d b_art_id = %d Branch Uuid = %d TX_Current = %d mod_type = %d Transaction_id = %d Gamma_id = %d",
chStmt.getInt("rel_link_id"), chStmt.getInt("a_art_id"), chStmt.getInt("b_art_id"),
chStmt.getLong("branch_id"), chStmt.getInt("tx_current"), chStmt.getInt("mod_type"),
- chStmt.getLong("transaction_id"), chStmt.getInt("gamma_id")));
+ chStmt.getLong("transaction_id"), chStmt.getLong("gamma_id")));
}
}
} finally {
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/LoadDeletedRelationTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/LoadDeletedRelationTest.java
index 79e3faddc4..f8fb6a5aa8 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/LoadDeletedRelationTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/LoadDeletedRelationTest.java
@@ -18,6 +18,7 @@ import java.util.List;
import org.eclipse.osee.client.integration.tests.integration.skynet.core.utils.TestUtil;
import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule;
import org.eclipse.osee.client.test.framework.OseeLogMonitorRule;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
@@ -62,7 +63,7 @@ public class LoadDeletedRelationTest {
RelationManager.addRelation(type, left, right, "");
left.persist(getClass().getSimpleName());
RelationLink loaded = RelationManager.getLoadedRelation(type, left, right, SAW_Bld_2);
- int oldGammaId = loaded.getGammaId();
+ GammaId oldGammaId = loaded.getGammaId();
RelationManager.deleteRelation(type, left, right);
left.persist(getClass().getSimpleName());
RelationManager.addRelation(type, left, right, "");
@@ -76,10 +77,10 @@ public class LoadDeletedRelationTest {
}
}
- int newGammaId = loaded.getGammaId();
+ GammaId newGammaId = loaded.getGammaId();
assertEquals("Deleted relation was not re-used by addRelation; see L3778", 1, linkCount);
assertFalse(loaded.isDeleted());
- assertEquals("Gamma ID was changed;", oldGammaId, newGammaId);
+ assertEquals("Gamma ID was changed;", oldGammaId.getId(), newGammaId.getId());
}
@After
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationCacheTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationCacheTest.java
index 7fa1b977da..eb675c10fc 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationCacheTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationCacheTest.java
@@ -20,6 +20,7 @@ import org.eclipse.osee.client.test.framework.OseeLogMonitor;
import org.eclipse.osee.client.test.framework.OseeLogMonitorRule;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
import org.eclipse.osee.framework.core.enums.ModificationType;
@@ -342,8 +343,8 @@ public class RelationCacheTest {
RelationType type = new RelationType(0x00L, "type name", artifactA.getName(), artifactB.getName(),
CoreArtifactTypes.Artifact, CoreArtifactTypes.Artifact, RelationTypeMultiplicity.MANY_TO_MANY, null);
- RelationLink link = new RelationLink(artifactA, artifactB, COMMON, type, 77, 88, "", ModificationType.MODIFIED,
- ApplicabilityId.BASE);
+ RelationLink link = new RelationLink(artifactA, artifactB, COMMON, type, 77, GammaId.valueOf(88), "",
+ ModificationType.MODIFIED, ApplicabilityId.BASE);
relCache.cache(artifactA, link);
relCache.cache(artifactB, link);
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java
index 2dce78972d..1641a5f40e 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java
@@ -21,6 +21,7 @@ import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
@@ -86,7 +87,8 @@ public final class TestUtil {
public static RelationLink createRelationLink(int relationId, int artA, int artB, BranchId branch, RelationType relationType) {
return new RelationLink(ArtifactToken.valueOf(artA, branch), ArtifactToken.valueOf(artB, branch), branch,
- relationType, relationId, 0, "relation: " + relationId, ModificationType.MODIFIED, ApplicabilityId.BASE);
+ relationType, relationId, GammaId.valueOf(0), "relation: " + relationId, ModificationType.MODIFIED,
+ ApplicabilityId.BASE);
}
public static List<RelationLink> createLinks(int total, BranchId branch) {
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ArtifactRendererTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ArtifactRendererTest.java
index bdb42822f0..2cb2cf7b75 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ArtifactRendererTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ArtifactRendererTest.java
@@ -16,7 +16,6 @@ import java.util.Arrays;
import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule;
import org.eclipse.osee.client.test.framework.OseeLogMonitorRule;
import org.eclipse.osee.client.test.framework.TestInfo;
-import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.core.enums.ModificationType;
@@ -78,8 +77,8 @@ public class ArtifactRendererTest {
TransactionDelta deltaTx = new TransactionDelta(startTx, endTx1);
ArtifactDelta delta = new ArtifactDelta(null, artifact2, artifact1);
- Change change = new ArtifactChange(COMMON, GammaId.valueOf(artifact1.getGammaId()), artifact1, deltaTx,
- ModificationType.MODIFIED, "", "", false, artifact1, delta);
+ Change change = new ArtifactChange(COMMON, artifact1.getGammaId(), artifact1, deltaTx, ModificationType.MODIFIED,
+ "", "", false, artifact1, delta);
String name = RenderingUtil.getAssociatedArtifactName(Arrays.asList(change));
Assert.assertEquals(EXPECTED_NAME, name);
@@ -89,8 +88,8 @@ public class ArtifactRendererTest {
public void testAssociatedArtifact_notAllowedSingleQuotes() throws Exception {
TransactionDelta deltaTx = new TransactionDelta(startTx, endTx2);
ArtifactDelta delta = new ArtifactDelta(null, artifact1, artifact2);
- Change change = new ArtifactChange(COMMON, GammaId.valueOf(artifact2.getGammaId()), artifact2, deltaTx,
- ModificationType.MODIFIED, "", "", false, artifact2, delta);
+ Change change = new ArtifactChange(COMMON, artifact2.getGammaId(), artifact2, deltaTx, ModificationType.MODIFIED,
+ "", "", false, artifact2, delta);
String name = RenderingUtil.getAssociatedArtifactName(Arrays.asList(change));
Assert.assertEquals(EXPECTED_NAME, name);
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/InterArtifactDropTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/InterArtifactDropTest.java
index 458e6f6d35..fc914e35b6 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/InterArtifactDropTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/InterArtifactDropTest.java
@@ -120,7 +120,7 @@ public class InterArtifactDropTest {
Artifact destArtifact = ArtifactQuery.getArtifactFromId(updateTestArtifact, sourceArtifact1.getBranch());
destArtifact.reloadAttributesAndRelations();
assertTrue(updateTestArtifact.getName().equals(destArtifact.getName()));
- assertTrue(updateTestArtifact.getGammaId() == destArtifact.getGammaId());
+ assertTrue(updateTestArtifact.getGammaId().equals(destArtifact.getGammaId()));
assertTrue(updateTestArtifact.getModType() == destArtifact.getModType());
}
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java
index 2d300b1cd3..abbaab4bf9 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java
@@ -17,11 +17,11 @@ import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule;
import org.eclipse.osee.client.test.framework.OseeLogMonitorRule;
import org.eclipse.osee.framework.access.AccessControlManager;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.DemoUsers;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.jdk.core.type.DoubleKeyHashMap;
import org.eclipse.osee.framework.skynet.core.UserManager;
@@ -130,7 +130,7 @@ public class RelationIntegrityCheckTest {
try {
chStmt.runPreparedQuery(sqlQuery);
while (chStmt.next()) {
- Long gammaId = chStmt.getLong("gamma_id");
+ GammaId gammaId = GammaId.valueOf(chStmt.getLong("gamma_id"));
Long transactionId = chStmt.getLong("transaction_id");
int relationId = chStmt.getInt("rel_link_id");
BranchId branch = BranchId.valueOf(chStmt.getLong("branch_id"));
@@ -142,10 +142,10 @@ public class RelationIntegrityCheckTest {
int commitTransId = chStmt.getInt("commit_trans_art_id");
int modType = chStmt.getInt("creating_trans_mod_type");
- if (!map.containsKey(gammaId, transactionId)) {
+ if (!map.containsKey(gammaId.getId(), transactionId)) {
if (commitTransId > 0 && modType == 1) {
- map.put(gammaId, transactionId, new LocalRelationLink(relationId, gammaId, transactionId, branch,
- a_sideArtifactId, b_sideArtifactId, deletedTransaction, commitTransId, modType));
+ map.put(gammaId.getId(), transactionId, new LocalRelationLink(relationId, gammaId, transactionId,
+ branch, a_sideArtifactId, b_sideArtifactId, deletedTransaction, commitTransId, modType));
}
}
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicIdRelation.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicIdRelation.java
index 15f03b6c59..5ee7edd580 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicIdRelation.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/DefaultBasicIdRelation.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.framework.core.model.event;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IRelationType;
/**
@@ -21,10 +22,10 @@ public class DefaultBasicIdRelation implements IBasicGuidRelation {
DefaultBasicGuidArtifact artA, artB;
BranchId branch;
Long relTypeUuid;
- int gammaId;
+ GammaId gammaId;
int relationId;
- public DefaultBasicIdRelation(BranchId branch, Long relTypeUuid, int relationId, int gammaId, DefaultBasicGuidArtifact artA, DefaultBasicGuidArtifact artB) {
+ public DefaultBasicIdRelation(BranchId branch, Long relTypeUuid, int relationId, GammaId gammaId, DefaultBasicGuidArtifact artA, DefaultBasicGuidArtifact artB) {
this.branch = branch;
this.relTypeUuid = relTypeUuid;
this.relationId = relationId;
@@ -49,7 +50,7 @@ public class DefaultBasicIdRelation implements IBasicGuidRelation {
}
@Override
- public int getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
@@ -74,7 +75,7 @@ public class DefaultBasicIdRelation implements IBasicGuidRelation {
this.relTypeUuid = relTypeGuid;
}
- public void setGammaId(int gammaId) {
+ public void setGammaId(GammaId gammaId) {
this.gammaId = gammaId;
}
@@ -85,7 +86,7 @@ public class DefaultBasicIdRelation implements IBasicGuidRelation {
result = prime * result + (artA == null ? 0 : artA.hashCode());
result = prime * result + (artB == null ? 0 : artB.hashCode());
result = prime * result + (branch == null ? 0 : branch.hashCode());
- result = prime * result + gammaId;
+ result = prime * result + gammaId.hashCode();
result = prime * result + (relTypeUuid == null ? 0 : relTypeUuid.hashCode());
return result;
}
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidRelation.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidRelation.java
index 059fd299b3..582be33150 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidRelation.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/event/IBasicGuidRelation.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.model.event;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.HasBranch;
/**
@@ -23,5 +24,5 @@ public interface IBasicGuidRelation extends HasBranch {
Long getRelTypeGuid();
- int getGammaId();
+ GammaId getGammaId();
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/Id.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/Id.java
index 9ee2f515d1..c31ed80d18 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/Id.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/Id.java
@@ -85,6 +85,14 @@ public interface Id {
return clone(getId() + id.getId());
}
+ default <T extends Id> T increment(long increment) {
+ return clone(getId() + increment);
+ }
+
+ default <T extends Id> T increment() {
+ return clone(getId() + 1);
+ }
+
default <T extends Id> T clone(Long id) {
throw new UnsupportedOperationException();
}
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAttributeChange1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAttributeChange1.java
index 08752869df..d5cd9c9684 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAttributeChange1.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAttributeChange1.java
@@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.messaging.event.res.RemoteEvent;
/**
@@ -46,7 +47,7 @@ public class RemoteAttributeChange1 extends RemoteEvent {
@XmlElement(required = true)
protected String modTypeGuid;
protected int attributeId;
- protected int gammaId;
+ protected GammaId gammaId;
@XmlElement(required = true)
protected List<String> data;
@@ -103,15 +104,15 @@ public class RemoteAttributeChange1 extends RemoteEvent {
/**
* Gets the value of the gammaId property.
*/
- public int getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
/**
* Sets the value of the gammaId property.
*/
- public void setGammaId(int value) {
- this.gammaId = value;
+ public void setGammaId(GammaId gammaId) {
+ this.gammaId = gammaId;
}
/**
diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidRelation1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidRelation1.java
index 618f919f21..f9056a62ee 100644
--- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidRelation1.java
+++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidRelation1.java
@@ -12,6 +12,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.messaging.event.res.RemoteEvent;
/**
@@ -61,7 +62,7 @@ public class RemoteBasicGuidRelation1 extends RemoteEvent {
protected String branchGuid;
protected long relTypeGuid;
protected int relationId;
- protected int gammaId;
+ protected GammaId gammaId;
protected int artAId;
@XmlElement(required = true)
protected RemoteBasicGuidArtifact1 artA;
@@ -142,15 +143,15 @@ public class RemoteBasicGuidRelation1 extends RemoteEvent {
/**
* Gets the value of the gammaId property.
*/
- public int getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
/**
* Sets the value of the gammaId property.
*/
- public void setGammaId(int value) {
- this.gammaId = value;
+ public void setGammaId(GammaId gammaId) {
+ this.gammaId = gammaId;
}
/**
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidRelationTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidRelationTest.java
index 462cc53eb4..f225337728 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidRelationTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidRelationTest.java
@@ -16,6 +16,7 @@ import static org.eclipse.osee.framework.core.enums.CoreBranches.COMMON;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.skynet.core.event.model.EventBasicGuidRelation;
import org.eclipse.osee.framework.skynet.core.relation.RelationEventType;
@@ -33,7 +34,7 @@ public class EventBasicGuidRelationTest {
DefaultBasicGuidArtifact eventArt2 = new DefaultBasicGuidArtifact(COMMON, Artifact, eventArt1.getGuid());
EventBasicGuidRelation eventRel1 = new EventBasicGuidRelation(RelationEventType.Added, eventArt1.getBranch(),
- 0x02L, 234, 333, 34, eventArt1, 33, eventArt2);
+ 0x02L, 234, GammaId.valueOf(333), 34, eventArt1, 33, eventArt2);
EventBasicGuidRelation eventRel2 = new EventBasicGuidRelation(RelationEventType.Added, eventRel1.getBranch(),
eventRel1.getRelTypeGuid(), eventRel1.getRelationId(), eventRel1.getGammaId(), eventRel1.getArtAId(),
eventRel1.getArtA(), eventRel1.getArtBId(), eventRel1.getArtB());
@@ -60,8 +61,8 @@ public class EventBasicGuidRelationTest {
Assert.assertNotSame(eventRel1, eventRel2);
eventRel2 = new EventBasicGuidRelation(RelationEventType.Added, eventRel1.getBranch(), eventRel1.getRelTypeGuid(),
- eventRel1.getRelationId(), 88, eventRel1.getArtAId(), eventRel1.getArtA(), eventRel1.getArtBId(),
- eventRel1.getArtB());
+ eventRel1.getRelationId(), GammaId.valueOf(88), eventRel1.getArtAId(), eventRel1.getArtA(),
+ eventRel1.getArtBId(), eventRel1.getArtB());
Assert.assertNotSame(eventRel1, eventRel2);
@@ -98,7 +99,7 @@ public class EventBasicGuidRelationTest {
DefaultBasicGuidArtifact eventArt2 = new DefaultBasicGuidArtifact(COMMON, GlobalPreferences, eventArt1.getGuid());
EventBasicGuidRelation eventRel1 = new EventBasicGuidRelation(RelationEventType.Added, eventArt1.getBranch(),
- 0x04L, 234, 333, 34, eventArt1, 33, eventArt2);
+ 0x04L, 234, GammaId.valueOf(333), 34, eventArt1, 33, eventArt2);
Assert.assertTrue(eventRel1.is(RelationEventType.Added));
Assert.assertTrue(eventRel1.is(RelationEventType.Added, RelationEventType.Purged));
Assert.assertFalse(eventRel1.is(RelationEventType.Purged));
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilterTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilterTest.java
index e345875886..f3d26a85ea 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilterTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilterTest.java
@@ -11,6 +11,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
@@ -81,7 +82,7 @@ public class ArtifactTypeEventFilterTest {
List<IBasicGuidRelation> relations = new ArrayList<>();
EventBasicGuidRelation relation = new EventBasicGuidRelation(RelationEventType.Added, BranchId.SENTINEL,
- CoreRelationTypes.SupportingInfo_SupportedBy.getGuid(), 234, 123, 55, guidArtA, 66, guidArtB);
+ CoreRelationTypes.SupportingInfo_SupportedBy.getGuid(), 234, GammaId.valueOf(123), 55, guidArtA, 66, guidArtB);
relations.add(relation);
// guidArt in relation matches
diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java
index 0dbe268019..e61392c642 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java
@@ -17,6 +17,7 @@ import static org.eclipse.osee.framework.core.enums.CoreBranches.SYSTEM_ROOT;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.IBasicGuidRelation;
@@ -72,7 +73,7 @@ public class BranchUuidEventFilterTest {
List<IBasicGuidRelation> relations = new ArrayList<>();
EventBasicGuidRelation relation = new EventBasicGuidRelation(RelationEventType.Added, BranchId.SENTINEL,
- CoreRelationTypes.SupportingInfo_SupportedBy.getGuid(), 234, 123, 55, guidArtA, 66, guidArtB);
+ CoreRelationTypes.SupportingInfo_SupportedBy.getGuid(), 234, GammaId.valueOf(123), 55, guidArtA, 66, guidArtB);
relations.add(relation);
// neither in relation matches common branch
@@ -83,7 +84,7 @@ public class BranchUuidEventFilterTest {
relations.clear();
relation = new EventBasicGuidRelation(RelationEventType.Added, COMMON,
- CoreRelationTypes.SupportingInfo_SupportedBy.getGuid(), 234, 123, 55, guidArtA, 66, guidArtB);
+ CoreRelationTypes.SupportingInfo_SupportedBy.getGuid(), 234, GammaId.valueOf(123), 55, guidArtA, 66, guidArtB);
relations.add(relation);
// branch match
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
index f92170eb79..0668068b4d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
@@ -36,6 +36,7 @@ import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.HasBranch;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.IRelationType;
@@ -55,7 +56,6 @@ import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
import org.eclipse.osee.framework.core.exception.AttributeDoesNotExist;
import org.eclipse.osee.framework.core.exception.MultipleArtifactsExist;
import org.eclipse.osee.framework.core.exception.MultipleAttributesExist;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.DefaultBasicUuidRelationReorder;
@@ -107,7 +107,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
new HashSet<DefaultBasicUuidRelationReorder>();
private final BranchId branch;
private TransactionToken transaction = TransactionToken.SENTINEL;
- private int gammaId;
+ private GammaId gammaId;
private boolean linksLoaded;
private boolean historical;
private ModificationType modType;
@@ -499,12 +499,12 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
return attribute;
}
- public final <T> Attribute<T> internalInitializeAttribute(AttributeTypeId attributeType, int attributeId, int gammaId, ModificationType modificationType, ApplicabilityId applicabilityId, boolean markDirty, Object... data) {
+ public final <T> Attribute<T> internalInitializeAttribute(AttributeTypeId attributeType, int attributeId, GammaId gammaId, ModificationType modificationType, ApplicabilityId applicabilityId, boolean markDirty, Object... data) {
return internalInitializeAttribute(attributeType, AttributeId.valueOf(attributeId), gammaId, modificationType,
applicabilityId, markDirty, data);
}
- public final <T> Attribute<T> internalInitializeAttribute(AttributeTypeId attributeType, AttributeId attributeId, int gammaId, ModificationType modificationType, ApplicabilityId applicabilityId, boolean markDirty, Object... data) {
+ public final <T> Attribute<T> internalInitializeAttribute(AttributeTypeId attributeType, AttributeId attributeId, GammaId gammaId, ModificationType modificationType, ApplicabilityId applicabilityId, boolean markDirty, Object... data) {
Attribute<T> attribute = createAttribute(attributeType);
attribute.internalInitialize(attributeType, this, modificationType, applicabilityId, attributeId, gammaId,
markDirty, false);
@@ -1093,16 +1093,16 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
* artifact.persist(); artifact.reloadAttributesAndRelations(); Will need to be called afterwards to see replaced
* data in memory
*/
- public void replaceWithVersion(int gammaId) {
+ public void replaceWithVersion(GammaId gammaId) {
replaceWithVersion(gammaId, ModificationType.REPLACED_WITH_VERSION);
}
- public void replaceWithVersion(int gammaId, ModificationType modType) {
+ public void replaceWithVersion(GammaId gammaId, ModificationType modType) {
internalSetGammaId(gammaId);
internalSetModType(modType, true);
}
- private final void internalSetGammaId(int gammaId) {
+ private final void internalSetGammaId(GammaId gammaId) {
this.gammaId = gammaId;
}
@@ -1549,7 +1549,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
return transaction;
}
- public final int getGammaId() {
+ public final GammaId getGammaId() {
return gammaId;
}
@@ -1685,7 +1685,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F
/**
* This method should never be called from outside the OSEE Application Framework
*/
- void internalSetPersistenceData(int gammaId, TransactionToken transactionId, ModificationType modType, ApplicabilityId applicabilityId, boolean historical, boolean useBackingData) {
+ void internalSetPersistenceData(GammaId gammaId, TransactionToken transactionId, ModificationType modType, ApplicabilityId applicabilityId, boolean historical, boolean useBackingData) {
this.gammaId = gammaId;
this.transaction = transactionId;
this.historical = historical;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java
index 20142145a6..ad680193d0 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java
@@ -18,6 +18,7 @@ import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.OseeData;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ModificationType;
@@ -71,7 +72,7 @@ public abstract class ArtifactFactory {
return uuid == null ? ConnectionHandler.getNextSequence(OseeData.ART_ID_SEQ, true) : uuid;
}
- public synchronized Artifact reflectExisitingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, int gammaId, BranchId branch, ModificationType modificationType, ApplicabilityId applicabilityId) {
+ public synchronized Artifact reflectExisitingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, GammaId gammaId, BranchId branch, ModificationType modificationType, ApplicabilityId applicabilityId) {
Artifact toReturn = internalExistingArtifact(artId, guid, artifactType, gammaId, branch, modificationType,
applicabilityId, false, TransactionToken.SENTINEL, true);
ArtifactCache.cache(toReturn);
@@ -81,7 +82,7 @@ public abstract class ArtifactFactory {
/**
* This method does not cache the artifact, ArtifactLoader will cache existing artifacts
*/
- private Artifact internalExistingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, int gammaId, BranchId branch, ModificationType modType, ApplicabilityId applicabilityId, boolean historical, TransactionToken transactionId, boolean useBackingData) {
+ private Artifact internalExistingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, GammaId gammaId, BranchId branch, ModificationType modType, ApplicabilityId applicabilityId, boolean historical, TransactionToken transactionId, boolean useBackingData) {
Artifact artifact = getArtifactInstance(artId.getId(), guid, branch, artifactType, true);
artifact.internalSetPersistenceData(gammaId, transactionId, modType, applicabilityId, historical, useBackingData);
@@ -92,7 +93,7 @@ public abstract class ArtifactFactory {
/**
* This method does not cache the artifact, ArtifactLoader will cache existing artifacts
*/
- public synchronized Artifact loadExisitingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, int gammaId, BranchId branch, TransactionToken transactionId, ModificationType modType, ApplicabilityId applicabilityId, boolean historical) {
+ public synchronized Artifact loadExisitingArtifact(ArtifactId artId, String guid, ArtifactTypeId artifactType, GammaId gammaId, BranchId branch, TransactionToken transactionId, ModificationType modType, ApplicabilityId applicabilityId, boolean historical) {
return internalExistingArtifact(artId, guid, artifactType, gammaId, branch, modType, applicabilityId, historical,
transactionId, false);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
index fbb7c1434b..4c7de2ace6 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java
@@ -27,6 +27,7 @@ import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
@@ -346,13 +347,13 @@ public final class ArtifactLoader {
ArtifactTypeId artifactType = ArtifactTypeId.valueOf(chStmt.getLong("art_type_id"));
ArtifactFactory factory = ArtifactTypeManager.getFactory(artifactType);
- artifact =
- factory.loadExisitingArtifact(artifactId, chStmt.getString("guid"), artifactType, chStmt.getInt("gamma_id"),
- branch, transactionId, ModificationType.valueOf(chStmt.getInt("mod_type")), appId, historical);
+ artifact = factory.loadExisitingArtifact(artifactId, chStmt.getString("guid"), artifactType,
+ GammaId.valueOf(chStmt.getLong("gamma_id")), branch, transactionId,
+ ModificationType.valueOf(chStmt.getInt("mod_type")), appId, historical);
}
if (reload == LoadType.RELOAD_CACHE) {
- artifact.internalSetPersistenceData(chStmt.getInt("gamma_id"), transactionId,
+ artifact.internalSetPersistenceData(GammaId.valueOf(chStmt.getLong("gamma_id")), transactionId,
ModificationType.valueOf(chStmt.getInt("mod_type")), appId, historical, false);
}
return artifact;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTransactionData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTransactionData.java
index aab1915e20..4bc165211e 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTransactionData.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTransactionData.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.framework.skynet.core.artifact;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.sql.OseeSql;
@@ -64,7 +65,7 @@ public class ArtifactTransactionData extends BaseTransactionData {
}
@Override
- protected int createGammaId() {
+ protected GammaId createGammaId() {
return artifact.isUseBackingdata() ? artifact.getGammaId() : getNextGammaIdFromSequence();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java
index ccc51a739b..c3e73b69de 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java
@@ -20,10 +20,10 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IAttribute;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.ModificationType;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.model.type.AttributeType;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
@@ -43,7 +43,7 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>>, IAttribu
private WeakReference<Artifact> artifactRef;
private IAttributeDataProvider attributeDataProvider;
private AttributeId attrId = AttributeId.SENTINEL;
- private int gammaId;
+ private GammaId gammaId = GammaId.SENTINEL;
private boolean dirty;
private ModificationType modificationType;
private boolean useBackingData;
@@ -100,7 +100,7 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>>, IAttribu
return attributeChange;
}
- public void internalInitialize(AttributeTypeId attributeType, Artifact artifact, ModificationType modificationType, ApplicabilityId applicabilityId, AttributeId attributeId, int gammaId, boolean markDirty, boolean setDefaultValue) {
+ public void internalInitialize(AttributeTypeId attributeType, Artifact artifact, ModificationType modificationType, ApplicabilityId applicabilityId, AttributeId attributeId, GammaId gammaId, boolean markDirty, boolean setDefaultValue) {
internalInitialize(attributeType, artifact, modificationType, applicabilityId, markDirty, setDefaultValue);
this.attrId = attributeId;
this.gammaId = gammaId;
@@ -302,7 +302,7 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>>, IAttribu
* @return true if in data store
*/
public boolean isInDb() {
- return getGammaId() > 0;
+ return getGammaId().isValid();
}
/**
@@ -313,7 +313,7 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>>, IAttribu
return attrId.getId();
}
- public int getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
@@ -321,7 +321,7 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>>, IAttribu
return applicabilityId;
}
- public void internalSetGammaId(int gammaId) {
+ public void internalSetGammaId(GammaId gammaId) {
this.gammaId = gammaId;
}
@@ -347,11 +347,11 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>>, IAttribu
* artifact.persist(); artifact.reloadAttributesAndRelations(); Will need to be called afterwards to see replaced
* data in memory
*/
- public void replaceWithVersion(int gammaId) {
+ public void replaceWithVersion(GammaId gammaId) {
internalSetPersistenceData(gammaId, ModificationType.REPLACED_WITH_VERSION);
}
- private void internalSetPersistenceData(int gammaId, ModificationType modType) {
+ private void internalSetPersistenceData(GammaId gammaId, ModificationType modType) {
internalSetModType(modType, true, true);
internalSetGammaId(gammaId);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java
index 8dafd0f2ad..aff052c188 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
@@ -84,7 +85,7 @@ public class AttributeLoader {
public ArtifactId artifactId = ArtifactId.SENTINEL;
public BranchId branch = BranchId.SENTINEL;
public AttributeId attrId = AttributeId.SENTINEL;
- public int gammaId = -1;
+ public GammaId gammaId = GammaId.SENTINEL;
public ModificationType modType;
public Long transactionId = -1L;
public AttributeTypeId attributeType = AttributeTypeId.SENTINEL;
@@ -101,7 +102,7 @@ public class AttributeLoader {
artifactId = ArtifactId.valueOf(chStmt.getLong("art_id"));
branch = BranchId.valueOf(chStmt.getLong("id1"));
attrId = AttributeId.valueOf(chStmt.getLong("attr_id"));
- gammaId = chStmt.getInt("gamma_id");
+ gammaId = GammaId.valueOf(chStmt.getLong("gamma_id"));
modType = ModificationType.valueOf(chStmt.getInt("mod_type"));
transactionId = chStmt.getLong("transaction_id");
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/RelationLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/RelationLoader.java
index cdb1fd32d1..23517b3afb 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/RelationLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/RelationLoader.java
@@ -16,6 +16,7 @@ import java.util.Collection;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.LoadLevel;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.type.RelationType;
@@ -51,7 +52,7 @@ class RelationLoader {
ArtifactToken bArtifactId = ArtifactToken.valueOf(chStmt.getLong("b_art_id"), branch);
RelationType relationType = RelationTypeManager.getTypeByGuid(chStmt.getLong("rel_link_type_id"));
- int gammaId = chStmt.getInt("gamma_id");
+ GammaId gammaId = GammaId.valueOf(chStmt.getLong("gamma_id"));
String rationale = chStmt.getString("rationale");
ModificationType modificationType = ModificationType.valueOf(chStmt.getInt("mod_type"));
ApplicabilityId applicabilityId = ApplicabilityId.valueOf(chStmt.getLong("app_id"));
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeRow.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeRow.java
index 0798438dc8..7cda385753 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeRow.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeRow.java
@@ -14,6 +14,7 @@ package org.eclipse.osee.framework.skynet.core.attribute;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
/**
@@ -22,14 +23,14 @@ import org.eclipse.osee.framework.core.enums.ModificationType;
public final class AttributeRow {
private final BranchId branch;
- private final Long gammaId;
+ private final GammaId gammaId;
private final Integer artId;
private final ModificationType modType;
private final String value;
private final AttributeId attrId;
private final AttributeTypeId attributeType;
- public AttributeRow(BranchId branch, Long gammaId, Integer artId, ModificationType modType, String value, AttributeId attrId, AttributeTypeId attributeType) {
+ public AttributeRow(BranchId branch, GammaId gammaId, Integer artId, ModificationType modType, String value, AttributeId attrId, AttributeTypeId attributeType) {
this.branch = branch;
this.gammaId = gammaId;
this.artId = artId;
@@ -43,7 +44,7 @@ public final class AttributeRow {
return branch;
}
- public Long getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTransactionData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTransactionData.java
index fb68d9e645..73046fc87a 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTransactionData.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTransactionData.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.framework.skynet.core.attribute;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.sql.OseeSql;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -92,7 +93,7 @@ public class AttributeTransactionData extends BaseTransactionData {
}
@Override
- protected int createGammaId() {
+ protected GammaId createGammaId() {
return attribute.isUseBackingData() ? attribute.getGammaId() : getNextGammaIdFromSequence();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/RelationRow.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/RelationRow.java
index f4350e72eb..030f711565 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/RelationRow.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/RelationRow.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.framework.skynet.core.attribute;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IRelationType;
/**
@@ -23,9 +24,9 @@ public final class RelationRow {
private IRelationType relationType;
private Long a_art_id, b_art_id;
private String rationale;
- private Long gamma_id;
+ private GammaId gamma_id;
- public RelationRow(BranchId branch, Long rel_id, IRelationType relationType, Long a_art_id, Long b_art_id, String rationale, Long gamma_id) {
+ public RelationRow(BranchId branch, Long rel_id, IRelationType relationType, Long a_art_id, Long b_art_id, String rationale, GammaId gamma_id) {
super();
this.branch = branch;
this.rel_id = rel_id;
@@ -60,11 +61,11 @@ public final class RelationRow {
this.rationale = rationale;
}
- public Long getGamma_id() {
+ public GammaId getGamma_id() {
return gamma_id;
}
- public void setGamma_id(Long gamma_id) {
+ public void setGamma_id(GammaId gamma_id) {
this.gamma_id = gamma_id;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/DataStore.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/DataStore.java
index ea72a54220..5d7baae342 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/DataStore.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/DataStore.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.skynet.core.attribute.providers;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.Arrays;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.skynet.core.attribute.utils.AttributeResourceProcessor;
@@ -77,7 +78,7 @@ public class DataStore {
other.encoding = Strings.intern(this.encoding);
}
- public void persist(int storageId) {
+ public void persist(GammaId storageId) {
if (this.rawContent != null && this.rawContent.length > 0) {
resourceProcessor.saveResource(storageId, resourceProcessor.createStorageName(), this);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/DefaultAttributeDataProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/DefaultAttributeDataProvider.java
index 7520c4ff95..f154efe550 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/DefaultAttributeDataProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/DefaultAttributeDataProvider.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.skynet.core.attribute.providers;
import java.io.ByteArrayInputStream;
import java.io.IOException;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Conditions;
import org.eclipse.osee.framework.jdk.core.util.Lib;
@@ -116,7 +117,7 @@ public class DefaultAttributeDataProvider<T> extends AbstractAttributeDataProvid
}
@Override
- public void persist(int storageId) {
+ public void persist(GammaId storageId) {
dataStore.persist(storageId);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/IAttributeDataProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/IAttributeDataProvider.java
index b23400cbdc..bbb5aa901f 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/IAttributeDataProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/IAttributeDataProvider.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.framework.skynet.core.attribute.providers;
+import org.eclipse.osee.framework.core.data.GammaId;
+
/**
* @author Roberto E. Escobar
*/
@@ -25,7 +27,7 @@ public interface IAttributeDataProvider {
public Object[] getData();
- public void persist(int storageId);
+ public void persist(GammaId storageId);
public void purge();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/MappedAttributeDataProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/MappedAttributeDataProvider.java
index 8a6b6c580b..49dc4d251e 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/MappedAttributeDataProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/MappedAttributeDataProvider.java
@@ -20,6 +20,7 @@ import java.util.zip.ZipInputStream;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.eclipse.core.resources.IFile;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.OseeData;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Lib;
@@ -87,7 +88,7 @@ public class MappedAttributeDataProvider extends AbstractAttributeDataProvider i
}
@Override
- public void persist(int storageId) {
+ public void persist(GammaId storageId) {
try {
if (isFromLocalWorkspace()) {
InputStream inputStream = null;
@@ -98,7 +99,7 @@ public class MappedAttributeDataProvider extends AbstractAttributeDataProvider i
inputStream = sourceUri.toURL().openStream();
byte[] compressed = Lib.compressStream(inputStream, getOutfileName());
- String resourceId = String.valueOf(storageId);
+ String resourceId = storageId.getIdString();
boolean overwriteAllowed = false;
boolean compressOnSave = false;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/UriAttributeDataProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/UriAttributeDataProvider.java
index e8eff6209e..72f8addf50 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/UriAttributeDataProvider.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/providers/UriAttributeDataProvider.java
@@ -15,6 +15,7 @@ import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.util.Arrays;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.skynet.core.artifact.Attribute;
@@ -128,7 +129,7 @@ public class UriAttributeDataProvider extends AbstractAttributeDataProvider impl
}
@Override
- public void persist(int storageId) {
+ public void persist(GammaId storageId) {
dataStore.persist(storageId);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/utils/AttributeResourceProcessor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/utils/AttributeResourceProcessor.java
index f98599a148..644142076d 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/utils/AttributeResourceProcessor.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/utils/AttributeResourceProcessor.java
@@ -15,6 +15,7 @@ import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.jdk.core.util.Lib;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.skynet.core.artifact.Attribute;
@@ -44,14 +45,14 @@ public class AttributeResourceProcessor {
return client.getResourcesEndpoint();
}
- public void saveResource(int gammaId, String name, DataStore dataStore) {
+ public void saveResource(GammaId gammaId, String name, DataStore dataStore) {
ResourcesEndpoint endpoint = getResourcesEndpoint();
InputStream inputStream = null;
try {
inputStream = dataStore.getInputStream();
- String resourceId = String.valueOf(gammaId);
+ String resourceId = gammaId.getIdString();
boolean overwriteAllowed = false;
boolean compressOnSave = false;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeBuilder.java
index 28e58fca5d..cd586758a4 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeBuilder.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.skynet.core.change;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionDelta;
@@ -20,7 +21,7 @@ import org.eclipse.osee.framework.core.model.TransactionDelta;
*/
public class ArtifactChangeBuilder extends ChangeBuilder {
- public ArtifactChangeBuilder(BranchId branch, ArtifactTypeId artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical) {
+ public ArtifactChangeBuilder(BranchId branch, ArtifactTypeId artifactType, GammaId sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical) {
super(branch, artifactType, sourceGamma, artId, txDelta, modType, isHistorical);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeWorker.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeWorker.java
index 53f38a7165..c284a3ced1 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeWorker.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ArtifactChangeWorker.java
@@ -29,7 +29,7 @@ public class ArtifactChangeWorker implements IChangeWorker {
@Override
public void revert() {
if (change.isBaseline()) {
- artifact.replaceWithVersion(change.getBaselineGamma().getId().intValue());
+ artifact.replaceWithVersion(change.getBaselineGamma());
} else {
artifact.delete();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeBuilder.java
index 48acde040a..d685aeeaaa 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeBuilder.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.skynet.core.change;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionDelta;
@@ -26,7 +27,7 @@ public final class AttributeChangeBuilder extends ChangeBuilder {
private final AttributeTypeToken attributeType;
private final ModificationType artModType;
- public AttributeChangeBuilder(BranchId branch, ArtifactTypeId artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical, String isValue, String wasValue, int attrId, AttributeTypeToken attributeType, ModificationType artModType) {
+ public AttributeChangeBuilder(BranchId branch, ArtifactTypeId artifactType, GammaId sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical, String isValue, String wasValue, int attrId, AttributeTypeToken attributeType, ModificationType artModType) {
super(branch, artifactType, sourceGamma, artId, txDelta, modType, isHistorical);
this.isValue = isValue;
this.wasValue = wasValue;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeWorker.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeWorker.java
index 01a78774e4..af5c7216b1 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeWorker.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/AttributeChangeWorker.java
@@ -29,8 +29,7 @@ public class AttributeChangeWorker implements IChangeWorker {
@Override
public void revert() {
if (change.isBaseline()) {
- artifact.getAttributeById(change.getItemId().getId(), true).replaceWithVersion(
- change.getBaselineGamma().getId().intValue());
+ artifact.getAttributeById(change.getItemId().getId(), true).replaceWithVersion(change.getBaselineGamma());
} else {
artifact.getAttributeById(change.getItemId().getId(), true).delete();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ChangeBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ChangeBuilder.java
index 0202079b05..9f782e4b42 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ChangeBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/ChangeBuilder.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.skynet.core.change;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionDelta;
@@ -20,7 +21,7 @@ import org.eclipse.osee.framework.core.model.TransactionDelta;
* @author Jeff C. Phillips
*/
public abstract class ChangeBuilder {
- private final int sourceGamma;
+ private final GammaId sourceGamma;
private final ArtifactId artId;
private final TransactionDelta txDelta;
private ModificationType modType;
@@ -28,8 +29,7 @@ public abstract class ChangeBuilder {
private final ArtifactTypeId artifactType;
private final boolean isHistorical;
- public ChangeBuilder(BranchId branch, ArtifactTypeId artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical) {
- super();
+ public ChangeBuilder(BranchId branch, ArtifactTypeId artifactType, GammaId sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical) {
this.sourceGamma = sourceGamma;
this.artId = ArtifactId.valueOf(artId);
this.txDelta = txDelta;
@@ -39,7 +39,7 @@ public abstract class ChangeBuilder {
this.isHistorical = isHistorical;
}
- public int getSourceGamma() {
+ public GammaId getSourceGamma() {
return sourceGamma;
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeBuilder.java
index 551c2adfa7..697b9568f3 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeBuilder.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeBuilder.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.skynet.core.change;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionDelta;
import org.eclipse.osee.framework.core.model.type.RelationType;
@@ -26,7 +27,7 @@ public class RelationChangeBuilder extends ChangeBuilder {
private final String rationale;
private final RelationType relationType;
- public RelationChangeBuilder(BranchId branch, ArtifactTypeId artifactType, int sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, ArtifactId bArtId, int relLinkId, String rationale, RelationType relationType, boolean isHistorical) {
+ public RelationChangeBuilder(BranchId branch, ArtifactTypeId artifactType, GammaId sourceGamma, int artId, TransactionDelta txDelta, ModificationType modType, ArtifactId bArtId, int relLinkId, String rationale, RelationType relationType, boolean isHistorical) {
super(branch, artifactType, sourceGamma, artId, txDelta, modType, isHistorical);
this.bArtId = bArtId;
this.relLinkId = relLinkId;
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflict.java
index 06bcc9881f..4274ba93fa 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflict.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ArtifactConflict.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.skynet.core.conflict;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ConflictStatus;
@@ -116,7 +117,7 @@ public class ArtifactConflict extends Conflict {
}
@Override
- public int getMergeGammaId() throws BranchMergeException {
+ public GammaId getMergeGammaId() throws BranchMergeException {
throw new BranchMergeException(
"Artifact Conflicts can not be handled they must be reverted on the Source Branch");
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java
index ef8db287e9..c9007cdccf 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java
@@ -21,6 +21,7 @@ import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ConflictStatus;
@@ -392,7 +393,7 @@ public class AttributeConflict extends Conflict {
}
@Override
- public int getMergeGammaId() {
+ public GammaId getMergeGammaId() {
return getAttribute().getGammaId();
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/Conflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/Conflict.java
index 6d91d05a39..e93f383fe2 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/Conflict.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/Conflict.java
@@ -16,6 +16,7 @@ import java.util.logging.Level;
import org.eclipse.osee.framework.core.data.Adaptable;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
@@ -226,7 +227,7 @@ public abstract class Conflict implements Adaptable {
public abstract ConflictType getConflictType();
- public abstract int getMergeGammaId();
+ public abstract GammaId getMergeGammaId();
public abstract Id getObjectId();
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/RelationConflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/RelationConflict.java
index df3a246066..cf5eb855f9 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/RelationConflict.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/RelationConflict.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.framework.skynet.core.conflict;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.RelationId;
import org.eclipse.osee.framework.core.enums.ConflictStatus;
@@ -100,7 +101,7 @@ public class RelationConflict extends Conflict {
}
@Override
- public int getMergeGammaId() throws BranchMergeException {
+ public GammaId getMergeGammaId() throws BranchMergeException {
throw new BranchMergeException("Relation Conflicts are not implemented yet");
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java
index 761d4e9ee6..ffd4a255fc 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java
@@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.messaging.event.res.AttributeEventModificationType;
import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager;
@@ -50,7 +51,7 @@ public class AttributeChange implements FrameworkEvent {
@XmlElement(required = true)
protected String modTypeGuid;
protected int attributeId;
- protected int gammaId;
+ protected GammaId gammaId;
@XmlElement(required = true)
protected List<Object> data;
@XmlElement(required = true)
@@ -80,7 +81,7 @@ public class AttributeChange implements FrameworkEvent {
this.attributeId = value;
}
- public int getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
@@ -92,8 +93,8 @@ public class AttributeChange implements FrameworkEvent {
return applicabilityId;
}
- public void setGammaId(int value) {
- this.gammaId = value;
+ public void setGammaId(GammaId gammaId) {
+ this.gammaId = gammaId;
}
/**
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidRelation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidRelation.java
index 0693207b86..dca545c383 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidRelation.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidRelation.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.skynet.core.event.model;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
import org.eclipse.osee.framework.core.model.event.DefaultBasicIdRelation;
import org.eclipse.osee.framework.skynet.core.relation.RelationEventType;
@@ -32,7 +33,7 @@ public class EventBasicGuidRelation extends DefaultBasicIdRelation {
guidRel.getArtB());
}
- public EventBasicGuidRelation(RelationEventType relationEventType, BranchId branchUuid, Long relTypeGuid, int relationId, int gammaId, int artAId, DefaultBasicGuidArtifact artA, int artBId, DefaultBasicGuidArtifact artB) {
+ public EventBasicGuidRelation(RelationEventType relationEventType, BranchId branchUuid, Long relTypeGuid, int relationId, GammaId gammaId, int artAId, DefaultBasicGuidArtifact artA, int artBId, DefaultBasicGuidArtifact artB) {
super(branchUuid, relTypeGuid, relationId, gammaId, artA, artB);
this.relationEventType = relationEventType;
this.artAId = artAId;
@@ -45,7 +46,7 @@ public class EventBasicGuidRelation extends DefaultBasicIdRelation {
@Override
public String toString() {
- return String.format("[%s - B:%s - TG:%s - GI:%d - RI:%d - A:%s - B:%s]", relationEventType,
+ return String.format("[%s - B:%s - TG:%s - GI:%s - RI:%s - A:%s - B:%s]", relationEventType,
getBranch().getIdString(), getBranch().getIdString(), getGammaId(), getRelationId(), getArtA(), getArtB());
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java
index 1d1a0eac25..66ac70b193 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java
@@ -136,8 +136,8 @@ public final class CommitBranchHttpRequestOperation extends AbstractOperation {
change.getModificationType().isDeleted() ? RelationEventType.Deleted : change.getModificationType().isUnDeleted() ? RelationEventType.Undeleted : RelationEventType.Added;
DefaultBasicIdRelation defaultBasicGuidRelation = new DefaultBasicIdRelation(relChange.getBranch(),
- relChange.getRelationType().getGuid(), relChange.getItemId().getId().intValue(),
- relChange.getGamma().getId().intValue(), relChange.getChangeArtifact().getBasicGuidArtifact(),
+ relChange.getRelationType().getGuid(), relChange.getItemId().getId().intValue(), relChange.getGamma(),
+ relChange.getChangeArtifact().getBasicGuidArtifact(),
relChange.getEndTxBArtifact().getBasicGuidArtifact());
EventBasicGuidRelation event = new EventBasicGuidRelation(relationEventType, relChange.getArtId(),
relChange.getBArtId(), defaultBasicGuidRelation);
@@ -167,7 +167,7 @@ public final class CommitBranchHttpRequestOperation extends AbstractOperation {
org.eclipse.osee.framework.skynet.core.event.model.AttributeChange attrChangeEvent =
new org.eclipse.osee.framework.skynet.core.event.model.AttributeChange();
attrChangeEvent.setAttrTypeGuid(attributeChange.getAttributeType().getId());
- attrChangeEvent.setGammaId(attributeChange.getGamma().getId().intValue());
+ attrChangeEvent.setGammaId(attributeChange.getGamma());
attrChangeEvent.setAttributeId(attributeChange.getAttrId().getId().intValue());
attrChangeEvent.setModTypeGuid(
AttributeEventModificationType.getType(attributeChange.getModificationType()).getGuid());
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java
index 0c892e9e7d..9b9c3e4af9 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationLink.java
@@ -18,6 +18,7 @@ import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.HasBranch;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.data.RelationTypeToken;
@@ -43,7 +44,7 @@ import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
*/
public class RelationLink implements HasBranch {
private int relationId;
- private int gammaId;
+ private GammaId gammaId;
private String rationale;
private final RelationTypeToken relationType;
private boolean dirty;
@@ -58,7 +59,7 @@ public class RelationLink implements HasBranch {
private boolean useBackingData;
- public RelationLink(ArtifactToken artifactA, ArtifactToken artifactB, BranchId branch, RelationTypeToken relationType, int relationId, int gammaId, String rationale, ModificationType modificationType, ApplicabilityId applicabilityId) {
+ public RelationLink(ArtifactToken artifactA, ArtifactToken artifactB, BranchId branch, RelationTypeToken relationType, int relationId, GammaId gammaId, String rationale, ModificationType modificationType, ApplicabilityId applicabilityId) {
this.relationType = relationType;
this.relationId = relationId;
this.gammaId = gammaId;
@@ -95,11 +96,11 @@ public class RelationLink implements HasBranch {
* artifact.persist(); artifact.reloadAttributesAndRelations(); Will need to be called afterwards to see replaced
* data in memory
*/
- public void replaceWithVersion(int gammaId) {
+ public void replaceWithVersion(GammaId gammaId) {
internalSetPersistenceData(gammaId, ModificationType.REPLACED_WITH_VERSION);
}
- private void internalSetPersistenceData(int gammaId, ModificationType modType) {
+ private void internalSetPersistenceData(GammaId gammaId, ModificationType modType) {
internalSetModType(modType, true, true);
internalSetGammaId(gammaId);
}
@@ -307,7 +308,7 @@ public class RelationLink implements HasBranch {
return relationId;
}
- public int getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
@@ -315,7 +316,7 @@ public class RelationLink implements HasBranch {
return getId() > 0;
}
- void internalSetGammaId(int gammaId) {
+ void internalSetGammaId(GammaId gammaId) {
this.gammaId = gammaId;
}
@@ -375,7 +376,7 @@ public class RelationLink implements HasBranch {
return rightSorter.equals(USER_DEFINED) && leftSorter.equals(USER_DEFINED);
}
- public void introduce(int sourceGamma, ModificationType sourceModificationType) {
+ public void introduce(GammaId sourceGamma, ModificationType sourceModificationType) {
internalSetPersistenceData(sourceGamma, sourceModificationType);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java
index a3bb3ad073..65247d93ef 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.data.RelationTypeToken;
@@ -513,8 +514,8 @@ public class RelationManager {
if (relation == null) {
ensureRelationCanBeAdded(relationType, artifactA, artifactB);
- relation = getOrCreate(artifactA, artifactB, RelationTypeManager.getType(relationType), 0, 0, rationale,
- ModificationType.NEW, ApplicabilityId.BASE);
+ relation = getOrCreate(artifactA, artifactB, RelationTypeManager.getType(relationType), 0, GammaId.valueOf(0),
+ rationale, ModificationType.NEW, ApplicabilityId.BASE);
relation.setDirty();
if (relation.isDeleted()) {
relation.undelete();
@@ -582,7 +583,7 @@ public class RelationManager {
*
* @param relationId 0 or relationId if already created
*/
- public static synchronized RelationLink getOrCreate(ArtifactToken aArtifactId, ArtifactToken bArtifactId, RelationTypeToken relationType, int relationId, int gammaId, String rationale, ModificationType modificationType, ApplicabilityId applicabilityId) {
+ public static synchronized RelationLink getOrCreate(ArtifactToken aArtifactId, ArtifactToken bArtifactId, RelationTypeToken relationType, int relationId, GammaId gammaId, String rationale, ModificationType modificationType, ApplicabilityId applicabilityId) {
BranchId branch = aArtifactId.getBranch();
RelationLink relation = null;
if (relationId != 0) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTransactionData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTransactionData.java
index a79d611dca..0927da0973 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTransactionData.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTransactionData.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.skynet.core.relation;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.ArtifactToken;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.core.model.event.DefaultBasicGuidArtifact;
@@ -70,8 +71,8 @@ public class RelationTransactionData extends BaseTransactionData {
}
@Override
- protected int createGammaId() {
- int newGammaId = 0;
+ protected GammaId createGammaId() {
+ GammaId newGammaId;
if (relation.isUseBackingData()) {
newGammaId = relation.getGammaId();
} else {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java
index b5d92dcca6..5336c99edc 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java
@@ -23,7 +23,6 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.RelationId;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
@@ -236,25 +235,25 @@ public final class RevisionChangeLoader {
if (changeArtifact != null) {
ArtifactDelta delta = new ArtifactDelta(builder.getTxDelta(), changeArtifact, null);
if (builder instanceof ArtifactChangeBuilder) {
- toReturn = new ArtifactChange(branch, GammaId.valueOf(builder.getSourceGamma()), builder.getArtId(),
- builder.getTxDelta(), builder.getModType(), "", "", isHistorical, changeArtifact, delta);
+ toReturn = new ArtifactChange(branch, builder.getSourceGamma(), builder.getArtId(), builder.getTxDelta(),
+ builder.getModType(), "", "", isHistorical, changeArtifact, delta);
} else if (builder instanceof AttributeChangeBuilder) {
AttributeChangeBuilder attrBuilder = (AttributeChangeBuilder) builder;
- toReturn = new AttributeChange(branch, GammaId.valueOf(attrBuilder.getSourceGamma()),
- attrBuilder.getArtId(), attrBuilder.getTxDelta(), attrBuilder.getModType(), attrBuilder.getIsValue(),
+ toReturn = new AttributeChange(branch, attrBuilder.getSourceGamma(), attrBuilder.getArtId(),
+ attrBuilder.getTxDelta(), attrBuilder.getModType(), attrBuilder.getIsValue(),
attrBuilder.getWasValue(), AttributeId.valueOf(attrBuilder.getAttrId()),
attrBuilder.getAttributeType(), attrBuilder.getArtModType(), isHistorical, changeArtifact, delta);
} else if (builder instanceof RelationChangeBuilder) {
RelationChangeBuilder relBuilder = (RelationChangeBuilder) builder;
Artifact bArtifact = loadedMap.get(builder.getTxDelta().getEndTx(), relBuilder.getbArtId());
- toReturn = new RelationChange(branch, GammaId.valueOf(builder.getSourceGamma()), builder.getArtId(),
- builder.getTxDelta(), builder.getModType(), relBuilder.getbArtId(),
+ toReturn = new RelationChange(branch, builder.getSourceGamma(), builder.getArtId(), builder.getTxDelta(),
+ builder.getModType(), relBuilder.getbArtId(),
RelationId.valueOf(Long.valueOf(relBuilder.getRelLinkId())), relBuilder.getRationale(), "",
relBuilder.getRelationType(), isHistorical, changeArtifact, delta, bArtifact);
}
} else {
- toReturn = new ArtifactChange(branch, GammaId.valueOf(builder.getSourceGamma()), builder.getArtId(),
- builder.getTxDelta(), builder.getModType(), "", "", isHistorical, null, null);
+ toReturn = new ArtifactChange(branch, builder.getSourceGamma(), builder.getArtId(), builder.getTxDelta(),
+ builder.getModType(), "", "", isHistorical, null, null);
}
changes.add(toReturn);
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java
index 6f3b653226..002ce53594 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java
@@ -16,6 +16,7 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionDelta;
@@ -78,8 +79,8 @@ public class ArtifactChangeAcquirer extends ChangeAcquirer {
ModificationType modificationType = ModificationType.valueOf(chStmt.getInt("mod_type"));
ArtifactChangeBuilder artifactChangeBuilder = new ArtifactChangeBuilder(getSourceBranch(),
- ArtifactTypeManager.getTypeByGuid(chStmt.getLong("art_type_id")), chStmt.getInt("gamma_id"), artId,
- txDelta, modificationType, !hasBranch);
+ ArtifactTypeManager.getTypeByGuid(chStmt.getLong("art_type_id")),
+ GammaId.valueOf(chStmt.getLong("gamma_id")), artId, txDelta, modificationType, !hasBranch);
getArtIds().add(artId);
getChangeBuilders().add(artifactChangeBuilder);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
index 4ea8c73aca..eaa607262a 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java
@@ -20,10 +20,10 @@ import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ModificationType;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.model.TransactionDelta;
import org.eclipse.osee.framework.core.sql.OseeSql;
import org.eclipse.osee.framework.jdk.core.type.Id;
@@ -110,7 +110,7 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
while (chStmt.next()) {
int attrId = chStmt.getInt("attr_id");
int artId = chStmt.getInt("art_id");
- int sourceGamma = chStmt.getInt("gamma_id");
+ GammaId sourceGamma = GammaId.valueOf(chStmt.getLong("gamma_id"));
AttributeTypeToken attributeType = AttributeTypeManager.getTypeById(chStmt.getLong("attr_type_id"));
ArtifactTypeId artifactType = ArtifactTypeId.valueOf(chStmt.getLong("art_type_id"));
String isValue = chStmt.getString("is_value");
@@ -129,7 +129,7 @@ public class AttributeChangeAcquirer extends ChangeAcquirer {
if (artModType == ModificationType.MODIFIED && !modifiedArtifacts.contains(artId)) {
ArtifactChangeBuilder artifactChangeBuilder = new ArtifactChangeBuilder(sourceBranch, artifactType,
- -1, artId, txDelta, ModificationType.MODIFIED, !hasBranch);
+ GammaId.SENTINEL, artId, txDelta, ModificationType.MODIFIED, !hasBranch);
changeBuilders.add(artifactChangeBuilder);
modifiedArtifacts.add(artId);
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/RelationChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/RelationChangeAcquirer.java
index 80b1456278..ea0d8e228b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/RelationChangeAcquirer.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/RelationChangeAcquirer.java
@@ -15,6 +15,7 @@ import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.TransactionToken;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.model.TransactionDelta;
@@ -82,8 +83,9 @@ public class RelationChangeAcquirer extends ChangeAcquirer {
getArtIds().add(bArtId);
getChangeBuilders().add(new RelationChangeBuilder(getSourceBranch(),
- ArtifactTypeManager.getTypeByGuid(chStmt.getLong("art_type_id")), chStmt.getInt("gamma_id"), aArtId,
- txDelta, modificationType, ArtifactId.valueOf(bArtId), relLinkId, rationale,
+ ArtifactTypeManager.getTypeByGuid(chStmt.getLong("art_type_id")),
+ GammaId.valueOf(chStmt.getLong("gamma_id")), aArtId, txDelta, modificationType,
+ ArtifactId.valueOf(bArtId), relLinkId, rationale,
RelationTypeManager.getTypeByGuid(chStmt.getLong("rel_link_type_id")), !hasBranch));
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/BaseTransactionData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/BaseTransactionData.java
index d623f88a86..78041bb16b 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/BaseTransactionData.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/BaseTransactionData.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.skynet.core.transaction;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.TransactionId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.enums.TxChange;
@@ -42,7 +43,7 @@ public abstract class BaseTransactionData {
private final Id itemId;
private ModificationType modificationType;
- private Integer gammaId;
+ private GammaId gammaId;
private ApplicabilityId applicabilityId;
public BaseTransactionData(Id itemId, ModificationType modificationType) {
@@ -95,7 +96,7 @@ public abstract class BaseTransactionData {
return applicabilityId;
}
- protected final int getGammaId() {
+ protected final GammaId getGammaId() {
if (gammaId == null) {
gammaId = createGammaId();
}
@@ -134,7 +135,7 @@ public abstract class BaseTransactionData {
/**
* Should not be called by application. This method will be called by the base class when required;
*/
- protected abstract int createGammaId();
+ protected abstract GammaId createGammaId();
/**
* Should not be called by application. This method will be called by the base class when required;
@@ -148,7 +149,7 @@ public abstract class BaseTransactionData {
*/
protected abstract void internalAddToEvents(ArtifactEvent artifactEvent);
- protected int getNextGammaIdFromSequence() {
- return (int) ConnectionHandler.getNextSequence(GAMMA_ID_SEQ, true);
+ protected GammaId getNextGammaIdFromSequence() {
+ return GammaId.valueOf(ConnectionHandler.getNextSequence(GAMMA_ID_SEQ, true));
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java
index 25a98b7a2a..dcc2d826ec 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java
@@ -128,7 +128,7 @@ public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation
if (!attrData.getAttribute().isUseBackingData()) {
Attribute<?> attr = ((AttributeTransactionData) transactionData).getAttribute();
if (attr.getAttributeType().isTaggable()) {
- gammasToTag.add((long) transactionData.getGammaId());
+ gammasToTag.add(transactionData.getGammaId().getId());
}
}
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java
index ace7069d23..96c0d9c620 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java
@@ -22,6 +22,7 @@ import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.data.OseeCodeVersion;
import org.eclipse.osee.framework.core.data.TransactionId;
@@ -375,7 +376,7 @@ public final class TransactionManager {
private static RelationRow loadRelationChange(JdbcStatement chStmt) {
IRelationType relationType = RelationTypeManager.getTypeByGuid(chStmt.getLong("rel_link_type_id"));
BranchId branch = BranchId.valueOf(chStmt.getLong("branch_id"));
- Long gammaId = Long.valueOf(chStmt.getLong("gamma_id"));
+ GammaId gammaId = GammaId.valueOf(chStmt.getLong("gamma_id"));
Long aArtId = Long.valueOf(chStmt.getInt("a_art_id"));
Long bArtId = Long.valueOf(chStmt.getInt("b_art_id"));
Long relId = Long.valueOf(chStmt.getInt("rel_link_id"));
@@ -386,7 +387,7 @@ public final class TransactionManager {
private static AttributeRow loadAttributeChange(JdbcStatement chStmt) {
AttributeTypeId attributeType = AttributeTypeManager.getTypeById(chStmt.getLong("attr_type_id"));
BranchId branch = BranchId.valueOf(chStmt.getLong("branch_id"));
- Long gammaId = Long.valueOf(chStmt.getLong("gamma_id"));
+ GammaId gammaId = GammaId.valueOf(chStmt.getLong("gamma_id"));
Integer artId = Integer.valueOf(chStmt.getInt("art_id"));
ModificationType modType = ModificationType.valueOf(chStmt.getInt("mod_type"));
AttributeId attrId = AttributeId.valueOf(chStmt.getLong("attr_id"));
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Address.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Address.java
index 2b6dcf7818..adfa688cdc 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Address.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Address.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.framework.skynet.core.utility;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.enums.TxChange;
@@ -22,7 +23,7 @@ public final class Address implements Comparable<Address> {
private final BranchId branch;
private final int itemId;
private final Long transactionId;
- private final long gammaId;
+ private final GammaId gammaId;
private ModificationType modType;
private ApplicabilityId appId;
private final TxChange txCurrent;
@@ -30,7 +31,7 @@ public final class Address implements Comparable<Address> {
private TxChange correctedTxCurrent;
private boolean purge;
- public Address(boolean isBaseline, BranchId branch, int itemId, Long transactionId, long gammaId, ModificationType modType, ApplicabilityId appId, TxChange txCurrent) {
+ public Address(boolean isBaseline, BranchId branch, int itemId, Long transactionId, GammaId gammaId, ModificationType modType, ApplicabilityId appId, TxChange txCurrent) {
this.branch = branch;
this.itemId = itemId;
this.transactionId = transactionId;
@@ -110,7 +111,7 @@ public final class Address implements Comparable<Address> {
return transactionId;
}
- public long getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
@@ -146,9 +147,9 @@ public final class Address implements Comparable<Address> {
@Override
public int compareTo(Address otherAddress) {
if (transactionId != otherAddress.transactionId) {
- return (int) (transactionId.longValue() - otherAddress.transactionId.longValue());
+ return Long.compare(transactionId, otherAddress.transactionId);
} else {
- return (int) (gammaId - otherAddress.gammaId);
+ return Long.compare(gammaId.getId(), otherAddress.gammaId.getId());
}
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java
index 6d473bb093..c7b9b8bd60 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java
@@ -16,10 +16,10 @@ import java.util.function.Consumer;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.enums.TransactionDetailsType;
import org.eclipse.osee.framework.core.enums.TxChange;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.core.operation.AbstractOperation;
import org.eclipse.osee.framework.core.operation.OperationLogger;
import org.eclipse.osee.framework.skynet.core.internal.Activator;
@@ -187,7 +187,7 @@ public class InvalidTxCurrentsAndModTypes extends AbstractOperation {
ApplicabilityId appId = ApplicabilityId.valueOf(stmt.getLong("app_id"));
Address address =
new Address(type.isBaseline(), BranchId.valueOf(stmt.getLong("branch_id")), stmt.getInt(columnName),
- stmt.getLong("transaction_id"), stmt.getLong("gamma_id"), modType, appId, txCurrent);
+ stmt.getLong("transaction_id"), GammaId.valueOf(stmt.getLong("gamma_id")), modType, appId, txCurrent);
if (!address.isSimilar(previousAddress[0])) {
if (!addresses.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java
index bdf9ba7f08..1a5dec9ccd 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java
@@ -30,6 +30,7 @@ import java.util.regex.Pattern;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.BranchViewData;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.jdk.core.text.change.ChangeSet;
import org.eclipse.osee.framework.jdk.core.type.Pair;
@@ -120,7 +121,7 @@ public class WordUtil {
chStmt.runPreparedQuery(SELECT_WORD_VALUES, artifact, CoreAttributeTypes.WordTemplateContent,
artifact.getBranch());
- List<Pair<String, Integer>> values = new LinkedList<>();
+ List<Pair<String, GammaId>> values = new LinkedList<>();
while (chStmt.next()) {
String content;
try {
@@ -130,18 +131,18 @@ public class WordUtil {
} else {
content = new String(Streams.getByteArray(stream), "UTF-8");
}
- values.add(new Pair<String, Integer>(content, chStmt.getInt("gamma_id")));
+ values.add(new Pair<String, GammaId>(content, GammaId.valueOf(chStmt.getLong("gamma_id"))));
} catch (UnsupportedEncodingException ex) {
// should never ever ever occur
throw new IllegalStateException("Must support UTF-8 format");
}
}
- Iterator<Pair<String, Integer>> iter = values.iterator();
+ Iterator<Pair<String, GammaId>> iter = values.iterator();
if (iter.hasNext()) {
- Pair<String, Integer> newest;
- Pair<String, Integer> nextNewest = iter.next();
- Collection<Integer> repeatGammas = new LinkedList<>();
+ Pair<String, GammaId> newest;
+ Pair<String, GammaId> nextNewest = iter.next();
+ Collection<GammaId> repeatGammas = new LinkedList<>();
while (iter.hasNext()) {
newest = nextNewest;
nextNewest = iter.next();
@@ -164,7 +165,7 @@ public class WordUtil {
// ConnectionHandler.runUpdate(DELETE_ADDRESSING_PREFIX +
// Collections.toString(repeatGammas, "(", ",", ")"));
- for (Integer gamma : repeatGammas) {
+ for (GammaId gamma : repeatGammas) {
ConnectionHandler.runPreparedUpdate("INSERT INTO " + table + " (gamma_id) values (?)", gamma);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteMultipleAttributesBlam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteMultipleAttributesBlam.java
index f78db1f4bf..9485e1326c 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteMultipleAttributesBlam.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DeleteMultipleAttributesBlam.java
@@ -97,11 +97,11 @@ public class DeleteMultipleAttributesBlam extends AbstractBlam {
Attribute<Object> toKeep = attributes.get(0);
for (Attribute<Object> attr : attributes) {
if (keepOldest) {
- if (attr.getGammaId() < toKeep.getGammaId()) {
+ if (attr.getGammaId().isLessThan(toKeep.getGammaId())) {
toKeep = attr;
}
} else {
- if (attr.getGammaId() > toKeep.getGammaId()) {
+ if (attr.getGammaId().isGreaterThan(toKeep.getGammaId())) {
toKeep = attr;
}
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/ItemsDeletedWithNoOtherModification.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/ItemsDeletedWithNoOtherModification.java
index 20a4167a79..8ecd8973df 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/ItemsDeletedWithNoOtherModification.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/ItemsDeletedWithNoOtherModification.java
@@ -16,6 +16,7 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.BranchType;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.enums.TxChange;
@@ -34,11 +35,11 @@ public class ItemsDeletedWithNoOtherModification extends DatabaseHealthOperation
public int relLinkId;
public int artId;
public int attributeId;
- public int gammaId;
+ public GammaId gammaId;
public long transactionId;
public long branchUuid;
- public LocalValues(int artId, int attributeId, long branchUuid, int gammaId, int relLinkId, long transactionId) {
+ public LocalValues(int artId, int attributeId, long branchUuid, GammaId gammaId, int relLinkId, long transactionId) {
super();
this.artId = artId;
this.attributeId = attributeId;
@@ -72,9 +73,9 @@ public class ItemsDeletedWithNoOtherModification extends DatabaseHealthOperation
try {
chStmt.runPreparedQuery(sql, txChange, modificationType, modificationType);
while (chStmt.next()) {
- addressing.add(
- new LocalValues(chStmt.getInt("art_id"), chStmt.getInt("attr_id"), chStmt.getLong("branch_id"),
- chStmt.getInt("gamma_id"), chStmt.getInt("rel_link_id"), chStmt.getLong("transaction_id")));
+ addressing.add(new LocalValues(chStmt.getInt("art_id"), chStmt.getInt("attr_id"),
+ chStmt.getLong("branch_id"), GammaId.valueOf(chStmt.getLong("gamma_id")), chStmt.getInt("rel_link_id"),
+ chStmt.getLong("transaction_id")));
}
} finally {
chStmt.close();
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/LocalRelationLink.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/LocalRelationLink.java
index e2ad18ce51..6c003d8ccc 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/LocalRelationLink.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/LocalRelationLink.java
@@ -11,14 +11,15 @@
package org.eclipse.osee.framework.ui.skynet.dbHealth;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
public class LocalRelationLink {
public int relLinkId, aArtId, bArtId, transIdForArtifactDeletion, commitTrans, modType;
public BranchId branch;
- public Long gammaId;
+ public GammaId gammaId;
public Long relTransId;
- public LocalRelationLink(int relLinkId, Long gammaId, Long transactionId, BranchId branch, int aArtId, int bArtId, int transIdForArtifactDeletion, int commitTrans, int modType) {
+ public LocalRelationLink(int relLinkId, GammaId gammaId, Long transactionId, BranchId branch, int aArtId, int bArtId, int transIdForArtifactDeletion, int commitTrans, int modType) {
this.aArtId = aArtId;
this.bArtId = bArtId;
this.branch = branch;
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java
index 7d8a7df651..45d608898c 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java
@@ -17,6 +17,7 @@ import java.util.LinkedList;
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.enums.TxChange;
import org.eclipse.osee.framework.core.util.result.Manipulations;
@@ -288,7 +289,7 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation {
count++;
sbFull.append(AHTML.addRowMultiColumnTable(new String[] {
Integer.toString(relLink.relLinkId),
- Long.toString(relLink.gammaId),
+ Long.toString(relLink.gammaId.getId()),
Long.toString(relLink.relTransId),
relLink.branch.getIdString(),
Integer.toString(relLink.aArtId),
@@ -309,7 +310,7 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation {
try {
chStmt.runPreparedQuery(sql);
while (chStmt.next()) {
- Long gamma_id = chStmt.getLong("gamma_id");
+ GammaId gamma_id = GammaId.valueOf(chStmt.getLong("gamma_id"));
Long transactionId = chStmt.getLong("transaction_id");
int relationId = chStmt.getInt("rel_link_id");
BranchId branch = BranchId.valueOf(chStmt.getLong("branch_id"));
@@ -320,10 +321,10 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation {
int commitTransId = forDelete ? 0 : chStmt.getInt("commit_trans_art_id");
int modType = forDelete ? -1 : chStmt.getInt("creating_trans_mod_type");
- if (!map.containsKey(gamma_id,
- transactionId) && (forDelete || !deleteMap.containsKey(gamma_id, transactionId))) {
- map.put(gamma_id, transactionId, new LocalRelationLink(relationId, gamma_id, transactionId, branch,
- a_sideArtifactId, b_sideArtifactId, deletedTransaction, commitTransId, modType));
+ if (!map.containsKey(gamma_id.getId(),
+ transactionId) && (forDelete || !deleteMap.containsKey(gamma_id.getId(), transactionId))) {
+ map.put(gamma_id.getId(), transactionId, new LocalRelationLink(relationId, gamma_id, transactionId,
+ branch, a_sideArtifactId, b_sideArtifactId, deletedTransaction, commitTransId, modType));
}
}
} finally {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java
index 0735bb5db0..4b973cd40b 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java
@@ -262,7 +262,7 @@ public class HistoryView extends GenericViewPart implements IBranchEventListener
for (Attribute<?> attribute : artifact.getAttributes(attributeChange.getAttributeType())) {
if (attribute.getId() == attributeChange.getAttrId().getId().intValue()) {
- attribute.replaceWithVersion(attributeChange.getGamma().getId().intValue());
+ attribute.replaceWithVersion(attributeChange.getGamma());
break;
}
}
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataProxy.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataProxy.java
index 4ceac001f0..cd793d4967 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataProxy.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataProxy.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.orcs.core.ds;
+import org.eclipse.osee.framework.core.data.GammaId;
+
/**
* @author Roberto E. Escobar
*/
@@ -33,9 +35,9 @@ public interface DataProxy<T> {
boolean isInMemory();
- void setGamma(long gammaId, boolean isNewGammaId);
+ void setGamma(GammaId gammaId, boolean isNewGammaId);
- long getGammaId();
+ GammaId getGammaId();
void rollBack();
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/IndexedResource.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/IndexedResource.java
index d5ae044200..1c844d413d 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/IndexedResource.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/IndexedResource.java
@@ -12,13 +12,14 @@ package org.eclipse.osee.orcs.core.ds;
import com.google.common.io.InputSupplier;
import java.io.InputStream;
+import org.eclipse.osee.framework.core.data.GammaId;
/**
* @author Roberto E. Escobar
*/
public interface IndexedResource extends InputSupplier<InputStream> {
- long getGammaId();
+ GammaId getGammaId();
long getTypeUuid();
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java
index a717de452b..220472b441 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java
@@ -189,8 +189,8 @@ public class MissingChangeItemFactoryTest {
List<ChangeItem> changes = new LinkedList<>();
final int ci1AttrId = 1;
ArtifactId artId = ArtifactId.valueOf(3);
- final long missingGamma = 9L;
- long artGamma = 7L;
+ final GammaId missingGamma = GammaId.valueOf(9L);
+ GammaId artGamma = GammaId.valueOf(7L);
ChangeItem ci1 = ChangeItemUtil.newAttributeChange(AttributeId.valueOf(ci1AttrId), AttributeTypeId.valueOf(2L),
artId, GammaId.valueOf(4L), ModificationType.MODIFIED, Strings.EMPTY_STRING, ApplicabilityToken.BASE);
@@ -198,13 +198,12 @@ public class MissingChangeItemFactoryTest {
List<AttributeData> attrDatas = new LinkedList<>();
AttributeData attrData1 = createAttributeData(artId, ci1AttrId, GammaId.valueOf(1L), ModificationType.MODIFIED);
- AttributeData attrData2 =
- createAttributeData(artId, ci1AttrId + 1, GammaId.valueOf(missingGamma), ModificationType.INTRODUCED);
+ AttributeData attrData2 = createAttributeData(artId, ci1AttrId + 1, missingGamma, ModificationType.INTRODUCED);
attrDatas.add(attrData1);
attrDatas.add(attrData2);
List<ArtifactData> artData = new LinkedList<>();
- ArtifactData artData1 = createArtifactData(artId, GammaId.valueOf(artGamma), ModificationType.NEW);
+ ArtifactData artData1 = createArtifactData(artId, artGamma, ModificationType.NEW);
artData.add(artData1);
List<ChangeItem> expected = new LinkedList<>();
@@ -220,8 +219,8 @@ public class MissingChangeItemFactoryTest {
private static Object[] testCase_missingRelation() {
List<ChangeItem> changes = new LinkedList<>();
final int ci1AttrId = 22;
- final long missingGamma = 9L;
- long artGamma = 7L;
+ final GammaId missingGamma = GammaId.valueOf(9L);
+ GammaId artGamma = GammaId.valueOf(7L);
RelationId relId = RelationId.valueOf(6L);
ArtifactId artA = ArtifactId.valueOf(65);
@@ -234,13 +233,12 @@ public class MissingChangeItemFactoryTest {
List<AttributeData> attrDatas = new LinkedList<>();
AttributeData attrData1 = createAttributeData(artA, ci1AttrId, GammaId.valueOf(1L), ModificationType.MODIFIED);
- AttributeData attrData2 =
- createAttributeData(artA, ci1AttrId + 1, GammaId.valueOf(missingGamma), ModificationType.INTRODUCED);
+ AttributeData attrData2 = createAttributeData(artA, ci1AttrId + 1, missingGamma, ModificationType.INTRODUCED);
attrDatas.add(attrData1);
attrDatas.add(attrData2);
List<ArtifactData> artData = new LinkedList<>();
- ArtifactData artData1 = createArtifactData(artA, GammaId.valueOf(artGamma), ModificationType.NEW);
+ ArtifactData artData1 = createArtifactData(artA, artGamma, ModificationType.NEW);
artData.add(artData1);
List<RelationData> relDatas = new LinkedList<>();
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java
index 0f9cbc5204..078904a9e3 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java
@@ -18,6 +18,7 @@ import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
import java.sql.DatabaseMetaData;
import java.util.ArrayList;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.jdbc.JdbcClient;
import org.eclipse.osee.jdbc.JdbcConnection;
import org.eclipse.osee.logger.Log;
@@ -78,8 +79,8 @@ public class IndexingTaskDatabaseTxCallableTest {
sources.add(resource2);
when(resource1.getTypeUuid()).thenReturn(Name.getId());
when(resource2.getTypeUuid()).thenReturn(QualificationMethod.getId());
- when(resource1.getGammaId()).thenReturn(1L);
- when(resource2.getGammaId()).thenReturn(2L);
+ when(resource1.getGammaId()).thenReturn(GammaId.valueOf(1L));
+ when(resource2.getGammaId()).thenReturn(GammaId.valueOf(2L));
when(engine.hasTagger("")).thenReturn(false);
when(engine.hasTagger("Tag")).thenReturn(true);
when(engine.getTagger("Tag")).thenReturn(tagger);
@@ -93,7 +94,7 @@ public class IndexingTaskDatabaseTxCallableTest {
txCallable.handleTxWork(connection);
verify(logger, times(1)).error("Field has invalid tagger[%s] provider and cannot be tagged - [Gamma: %s]", null,
- 2L);
+ GammaId.valueOf(2L));
verify(tagger, times(1)).tagIt(Matchers.eq(resource1), Matchers.any(TagCollector.class));
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InvalidTxCurrentsAndModTypesCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InvalidTxCurrentsAndModTypesCallable.java
index 5868cbefdf..d19ee827c2 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InvalidTxCurrentsAndModTypesCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InvalidTxCurrentsAndModTypesCallable.java
@@ -14,6 +14,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.enums.TransactionDetailsType;
import org.eclipse.osee.framework.core.enums.TxChange;
@@ -169,7 +170,7 @@ public class InvalidTxCurrentsAndModTypesCallable extends AbstractDatastoreTxCal
TransactionDetailsType type = TransactionDetailsType.valueOf(stmt.getInt("tx_type"));
ApplicabilityId appId = ApplicabilityId.valueOf(stmt.getLong("app_id"));
Address address = new Address(type.isBaseline(), stmt.getLong("branch_id"), stmt.getInt(columnName),
- stmt.getLong("transaction_id"), stmt.getLong("gamma_id"), modType, appId, txCurrent);
+ stmt.getLong("transaction_id"), GammaId.valueOf(stmt.getLong("gamma_id")), modType, appId, txCurrent);
if (!address.isSimilar(previousAddress[0])) {
if (!addresses.isEmpty()) {
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeAttributeTypeDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeAttributeTypeDatabaseTxCallable.java
index a83a8ce250..4f9cba53a1 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeAttributeTypeDatabaseTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeAttributeTypeDatabaseTxCallable.java
@@ -76,7 +76,7 @@ public final class PurgeAttributeTypeDatabaseTxCallable extends AbstractDatastor
sql = RETRIEVE_GAMMAS_OF_ATTR_MULT_TYPES;
param = joinQuery.getQueryId();
}
- getJdbcClient().runQuery(stmt -> gammas.add(new Integer[] {stmt.getInt("gamma_id")}), sql, param);
+ getJdbcClient().runQuery(stmt -> gammas.add(new Long[] {stmt.getLong("gamma_id")}), sql, param);
}
return gammas;
}
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 a9bf2b0713..6135ed1673 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
@@ -63,7 +63,7 @@ public final class PurgeRelationTypeDatabaseTxCallable extends AbstractDatastore
for (IRelationType type : types) {
chStmt.runPreparedQuery(RETRIEVE_GAMMAS_OF_REL_LINK_TXS, type);
while (chStmt.next()) {
- gammas.add(new Integer[] {chStmt.getInt("gamma_id")});
+ gammas.add(new Long[] {chStmt.getLong("gamma_id")});
}
}
} finally {
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2ArtifactDataTransformer.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2ArtifactDataTransformer.java
index 6b0337588f..ffdf19a845 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2ArtifactDataTransformer.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2ArtifactDataTransformer.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.orcs.db.internal.exchange.transform;
import java.util.Map;
import javax.xml.stream.XMLStreamException;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.jdk.core.util.io.xml.SaxTransformer;
import org.xml.sax.Attributes;
@@ -30,8 +31,8 @@ public class V0_9_2ArtifactDataTransformer extends SaxTransformer {
super.startElementFound(uri, localName, qName, attributes);
if (localName.equals("entry")) {
int artifactId = Integer.parseInt(attributes.getValue("art_id"));
- Long gammaId = artIdToNetGammaId.get(artifactId);
- writer.writeAttribute("gamma_id", String.valueOf(gammaId));
+ GammaId gammaId = GammaId.valueOf(artIdToNetGammaId.get(artifactId));
+ writer.writeAttribute("gamma_id", gammaId.getIdString());
}
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2TxsConsolidateParser.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2TxsConsolidateParser.java
index b70eda2555..870de6ac70 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2TxsConsolidateParser.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2TxsConsolidateParser.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.orcs.db.internal.exchange.transform;
import java.util.Map;
import javax.xml.stream.XMLStreamException;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.enums.TxChange;
import org.eclipse.osee.framework.jdk.core.type.HashCollectionSet;
@@ -47,10 +48,10 @@ public class V0_9_2TxsConsolidateParser extends SaxTransformer {
public void startElementFound(String uri, String localName, String qName, Attributes attributes) throws XMLStreamException {
skipWrite = false;
- Long gammaId = null;
+ GammaId gammaId = null;
if (isWriteAllowed) {
if (localName.equals("entry")) {
- gammaId = artifactGammaToNetGammaId.get(Long.valueOf(attributes.getValue("gamma_id")));
+ gammaId = GammaId.valueOf(artifactGammaToNetGammaId.get(Long.valueOf(attributes.getValue("gamma_id"))));
}
if (gammaId == null) {
super.startElementFound(uri, localName, qName, attributes);
@@ -59,9 +60,9 @@ public class V0_9_2TxsConsolidateParser extends SaxTransformer {
}
} else if (localName.equals("entry")) {
if (targetBranchIdStr.equals(attributes.getValue("branch_id"))) {
- gammaId = artifactGammaToNetGammaId.get(Long.valueOf(attributes.getValue("gamma_id")));
+ gammaId = GammaId.valueOf(artifactGammaToNetGammaId.get(Long.valueOf(attributes.getValue("gamma_id"))));
if (gammaId != null) {
- addressMap.put(gammaId, createAddress(attributes, gammaId));
+ addressMap.put(gammaId.getId(), createAddress(attributes, gammaId));
}
}
}
@@ -74,7 +75,7 @@ public class V0_9_2TxsConsolidateParser extends SaxTransformer {
}
}
- private Address createAddress(Attributes attributes, long gammaId) throws XMLStreamException {
+ private Address createAddress(Attributes attributes, GammaId gammaId) throws XMLStreamException {
try {
int modType = Integer.parseInt(attributes.getValue("mod_type"));
ModificationType modificationType = ModificationType.valueOf(modType);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/RelationLoadProcessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/RelationLoadProcessor.java
index 0078de3e07..904fba8592 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/RelationLoadProcessor.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/RelationLoadProcessor.java
@@ -45,7 +45,7 @@ public class RelationLoadProcessor extends LoadProcessor<RelationData, RelationO
ArtifactId aArtId = ArtifactId.valueOf(chStmt.getLong("a_art_id"));
ArtifactId bArtId = ArtifactId.valueOf(chStmt.getLong("b_art_id"));
RelationTypeId relationType = RelationTypeId.valueOf(chStmt.getLong("rel_link_type_id"));
- GammaId gammaId = GammaId.valueOf(chStmt.getInt("gamma_id"));
+ GammaId gammaId = GammaId.valueOf(chStmt.getLong("gamma_id"));
ApplicabilityId applicId = ApplicabilityId.valueOf(chStmt.getLong("app_id"));
boolean historical = OptionsUtil.isHistorical(options);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/AbstractDataProxy.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/AbstractDataProxy.java
index fb7253e2b8..f0abe6cd7a 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/AbstractDataProxy.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/proxy/AbstractDataProxy.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.orcs.db.internal.proxy;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.logger.Log;
import org.eclipse.osee.orcs.core.ds.Attribute;
import org.eclipse.osee.orcs.core.ds.DataProxy;
@@ -21,7 +22,7 @@ import org.eclipse.osee.orcs.core.ds.ResourceNameResolver;
public abstract class AbstractDataProxy<T> implements DataProxy<T> {
private Storage storage;
private Log logger;
- private long gammaId;
+ private GammaId gammaId;
private boolean isNewGammaId;
private ResourceNameResolver resolver;
private Attribute<T> attribute;
@@ -41,20 +42,20 @@ public abstract class AbstractDataProxy<T> implements DataProxy<T> {
}
@Override
- public void setGamma(long gammaId, boolean isNewGammaId) {
+ public void setGamma(GammaId gammaId, boolean isNewGammaId) {
this.gammaId = gammaId;
this.isNewGammaId = isNewGammaId;
}
@Override
- public long getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
@Override
public void persist() {
if (isNewGammaId) {
- storage.persist(gammaId);
+ storage.persist(gammaId.getId());
}
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallable.java
index d8a857fd52..52dac9a734 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallable.java
@@ -20,6 +20,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.JoinItem;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.jdbc.JdbcClient;
@@ -124,11 +125,11 @@ public final class IndexingTaskDatabaseTxCallable extends AbstractDatastoreTxCal
Map<Long, Collection<Long>> toStore = new HashMap<>();
for (IndexedResource source : sources) {
long startItemTime = System.currentTimeMillis();
- Long gamma = source.getGammaId();
- if (processed.add(gamma)) {
+ GammaId gamma = source.getGammaId();
+ if (processed.add(gamma.getId())) {
Set<Long> tags = new HashSet<>();
- toStore.put(gamma, tags);
- tagCollector.setCurrentTag(gamma, tags);
+ toStore.put(gamma.getId(), tags);
+ tagCollector.setCurrentTag(gamma.getId(), tags);
try {
long typeUuid = source.getTypeUuid();
String taggerId = getTaggerIdByTypeUuid(typeUuid);
@@ -231,9 +232,9 @@ public final class IndexingTaskDatabaseTxCallable extends AbstractDatastoreTxCal
return updated;
}
- private void notifyOnIndexItemComplete(long gammaId, int totalTags, long processingTime) {
+ private void notifyOnIndexItemComplete(GammaId gammaId, int totalTags, long processingTime) {
if (collector != null) {
- collector.onIndexItemComplete(getTagQueueQueryId(), gammaId, totalTags, processingTime);
+ collector.onIndexItemComplete(getTagQueueQueryId(), gammaId.getId(), totalTags, processingTime);
}
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/data/GammaQueueIndexerDataSourceLoader.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/data/GammaQueueIndexerDataSourceLoader.java
index 2c2bbb5648..501a32b2d7 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/data/GammaQueueIndexerDataSourceLoader.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/data/GammaQueueIndexerDataSourceLoader.java
@@ -13,6 +13,7 @@ package org.eclipse.osee.orcs.db.internal.search.indexer.data;
import java.util.Collection;
import java.util.HashSet;
import java.util.function.Consumer;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.resource.management.IResourceManager;
import org.eclipse.osee.jdbc.JdbcClient;
import org.eclipse.osee.jdbc.JdbcStatement;
@@ -46,7 +47,7 @@ public class GammaQueueIndexerDataSourceLoader implements IndexedResourceLoader
Consumer<JdbcStatement> consumer = stmt -> {
int itemId = stmt.getInt("attr_id");
long typeUuid = stmt.getLong("attr_type_id");
- long gammaId = stmt.getLong("gamma_id");
+ GammaId gammaId = GammaId.valueOf(stmt.getLong("gamma_id"));
String uri = stmt.getString("uri");
String value = stmt.getString("value");
attrData.add(new AttributeData(itemId, typeUuid, gammaId, uri, value));
@@ -83,7 +84,7 @@ public class GammaQueueIndexerDataSourceLoader implements IndexedResourceLoader
}
}
- private IndexedResource createData(int id, long typeUuid, long gammaId, String value, String uri) {
+ private IndexedResource createData(int id, long typeUuid, GammaId gammaId, String value, String uri) {
return new IndexerDataSourceImpl(resourceManager, id, typeUuid, gammaId, value, uri);
}
@@ -91,11 +92,11 @@ public class GammaQueueIndexerDataSourceLoader implements IndexedResourceLoader
private final int itemId;
private final long typeUuid;
- private final long gammaId;
+ private final GammaId gammaId;
private final String uri;
private final String value;
- public AttributeData(int itemId, long typeUuid, long gammaId, String uri, String value) {
+ public AttributeData(int itemId, long typeUuid, GammaId gammaId, String uri, String value) {
this.itemId = itemId;
this.typeUuid = typeUuid;
this.gammaId = gammaId;
@@ -111,7 +112,7 @@ public class GammaQueueIndexerDataSourceLoader implements IndexedResourceLoader
return typeUuid;
}
- public long getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/data/IndexerDataSourceImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/data/IndexerDataSourceImpl.java
index f6c50fac31..d727c1eeba 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/data/IndexerDataSourceImpl.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/data/IndexerDataSourceImpl.java
@@ -14,6 +14,7 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -33,12 +34,12 @@ public class IndexerDataSourceImpl implements IndexedResource {
private final int id;
private final long typeUuid;
- private final long gammaId;
+ private final GammaId gammaId;
private final String value;
private final String uri;
- public IndexerDataSourceImpl(IResourceManager resourceManager, int id, long typeUuid, long gammaId, String value, String uri) {
+ public IndexerDataSourceImpl(IResourceManager resourceManager, int id, long typeUuid, GammaId gammaId, String value, String uri) {
super();
this.resourceManager = resourceManager;
this.id = id;
@@ -49,7 +50,7 @@ public class IndexerDataSourceImpl implements IndexedResource {
}
@Override
- public long getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
@@ -105,7 +106,7 @@ public class IndexerDataSourceImpl implements IndexedResource {
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + (int) (gammaId ^ gammaId >>> 32);
+ result = prime * result + gammaId.hashCode();
return result;
}
@@ -119,7 +120,7 @@ public class IndexerDataSourceImpl implements IndexedResource {
}
if (obj instanceof IndexedResource) {
IndexedResource other = (IndexedResource) obj;
- if (getGammaId() != other.getGammaId()) {
+ if (getGammaId().notEqual(other.getGammaId())) {
return false;
} else {
return true;
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/AttributeDataMatcher.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/AttributeDataMatcher.java
index 8a609ace52..8f90aa294b 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/AttributeDataMatcher.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/AttributeDataMatcher.java
@@ -18,6 +18,7 @@ import java.nio.ByteBuffer;
import java.util.Collection;
import java.util.List;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.QueryOption;
import org.eclipse.osee.framework.core.executor.HasCancellation;
import org.eclipse.osee.framework.jdk.core.type.MatchLocation;
@@ -138,8 +139,8 @@ public class AttributeDataMatcher {
}
@Override
- public long getGammaId() {
- return attrData.getVersion().getGammaId().getId();
+ public GammaId getGammaId() {
+ return attrData.getVersion().getGammaId();
}
@Override
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderImpl.java
index 33350f6c28..f5f7903574 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderImpl.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderImpl.java
@@ -126,7 +126,7 @@ public class TxSqlBuilderImpl implements OrcsVisitor, TxSqlBuilder {
updateGamma(data);
DataProxy<?> dataProxy = data.getDataProxy();
- dataProxy.setGamma(data.getVersion().getGammaId().getId(), createNewGamma);
+ dataProxy.setGamma(data.getVersion().getGammaId(), createNewGamma);
binaryStores.add(dataProxy);
if (RelationalConstants.DEFAULT_ITEM_ID == data.getLocalId()) {
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/Address.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/Address.java
index 36d10df1b0..7fe5303d97 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/Address.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/Address.java
@@ -12,6 +12,7 @@ package org.eclipse.osee.orcs.db.internal.util;
import org.eclipse.osee.framework.core.data.ApplicabilityId;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.enums.TxChange;
@@ -22,7 +23,7 @@ public final class Address implements Comparable<Address> {
private final BranchId branch;
private final int itemId;
private final long transactionId;
- private final long gammaId;
+ private final GammaId gammaId;
private ModificationType modType;
private ApplicabilityId appId;
private final TxChange txCurrent;
@@ -30,7 +31,7 @@ public final class Address implements Comparable<Address> {
private TxChange correctedTxCurrent;
private boolean purge;
- public Address(boolean isBaseline, Long branchId, int itemId, long transactionId, long gammaId, ModificationType modType, ApplicabilityId appId, TxChange txCurrent) {
+ public Address(boolean isBaseline, Long branchId, int itemId, long transactionId, GammaId gammaId, ModificationType modType, ApplicabilityId appId, TxChange txCurrent) {
super();
this.branch = BranchId.valueOf(branchId);
this.itemId = itemId;
@@ -111,7 +112,7 @@ public final class Address implements Comparable<Address> {
return transactionId;
}
- public long getGammaId() {
+ public GammaId getGammaId() {
return gammaId;
}
@@ -147,9 +148,9 @@ public final class Address implements Comparable<Address> {
@Override
public int compareTo(Address otherAddress) {
if (transactionId != otherAddress.transactionId) {
- return (int) (transactionId - otherAddress.transactionId);
+ return Long.compare(transactionId, otherAddress.transactionId);
} else {
- return (int) (gammaId - otherAddress.gammaId);
+ return Long.compare(gammaId.getId(), otherAddress.gammaId.getId());
}
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/IdentityManagerImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/IdentityManagerImpl.java
index c8e18b61d8..6eba8dacb5 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/IdentityManagerImpl.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/IdentityManagerImpl.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.orcs.db.internal.util;
import org.eclipse.osee.framework.core.data.GammaId;
import org.eclipse.osee.framework.core.data.OseeData;
import org.eclipse.osee.framework.core.data.TransactionId;
-import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.jdk.core.util.GUID;
import org.eclipse.osee.jdbc.JdbcClient;
import org.eclipse.osee.orcs.db.internal.IdentityManager;

Back to the top