diff options
93 files changed, 329 insertions, 381 deletions
diff --git a/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/validator/LocalIdValidatorTest.java b/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/validator/LocalIdValidatorTest.java index ae619221c01..52092452e27 100644 --- a/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/validator/LocalIdValidatorTest.java +++ b/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/validator/LocalIdValidatorTest.java @@ -26,7 +26,7 @@ public class LocalIdValidatorTest extends AbstractValidatorTest<LocalIdValidator private static final String INVALID_LOCALID = "12 31 asd"; public LocalIdValidatorTest() { - super(AccountField.LOCAL_ID, VALID_LOCALID, INVALID_LOCALID); + super(AccountField.ID, VALID_LOCALID, INVALID_LOCALID); } @Override diff --git a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/AccountField.java b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/AccountField.java index ae5ebdcb2f5..7a05f5e2cf9 100644 --- a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/AccountField.java +++ b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/AccountField.java @@ -19,7 +19,7 @@ package org.eclipse.osee.account.admin; * @author Roberto E. Escobar */ public enum AccountField { - LOCAL_ID, + ID, GUID, EMAIL, DISPLAY_NAME, diff --git a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/LocalIdValidator.java b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/LocalIdValidator.java index 296a265d927..8aa9bfdc9cb 100644 --- a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/LocalIdValidator.java +++ b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/LocalIdValidator.java @@ -27,7 +27,7 @@ public class LocalIdValidator extends AbstractValidator { @Override public AccountField getFieldType() { - return AccountField.LOCAL_ID; + return AccountField.ID; } @Override diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java index d6f6e67f5ee..af61a982845 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java @@ -383,7 +383,7 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery { // team def, ai, version are all covered by team search // Start with known task ids - addIdCriteria(taskReviewIds); + queryAndLocalIds(taskReviewIds); addEvConfigCriteria(); @@ -824,7 +824,7 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery { private void addVersionCriteria() { if (versionId != null && versionId > 0) { - queryAndRelatedToLocalIds(AtsRelationTypes.TeamWorkflowTargetedForVersion_Version, + queryAndRelatedToLocalIds(AtsRelationTypes.TeamWorkflowTargetedForVersion_Version, Long.valueOf(versionUuid)); ArtifactId.valueOf(versionId)); } } @@ -895,17 +895,7 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery { } } - private void addIdCriteria(Collection<Long> ids) { - if (ids != null) { - List<Integer> artIds = new LinkedList<>(); - for (Long id : ids) { - artIds.add(id.intValue()); - } - - } - } - - public abstract void queryAndIds(Collection<? extends ArtifactId> artIds); + public abstract void queryAndLocalIds(List<Long> artIds); public void addProgramCriteria() { if (!isInsertionSpecified()) { diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java index 7c0fe79bca9..604ffab32ba 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java @@ -61,7 +61,7 @@ public class ReportResource { Set<Long> modArts = new HashSet<>(); Set<Long> deletedArts = new HashSet<>(); - Map<Integer, Pair<ChangeItem, Set<ChangeItem>>> artToChanges = new HashMap<>(); + Map<Long, Pair<ChangeItem, Set<ChangeItem>>> artToChanges = new HashMap<>(); buildArtIdToChangeMap(changes, artToChanges); buildLists(artToChanges, newArts, modArts, deletedArts); @@ -82,7 +82,7 @@ public class ReportResource { "application/xml").build(); } - private void buildArtIdToChangeMap(List<ChangeItem> changes, Map<Integer, Pair<ChangeItem, Set<ChangeItem>>> artToChanges) { + private void buildArtIdToChangeMap(List<ChangeItem> changes, Map<Long, Pair<ChangeItem, Set<ChangeItem>>> artToChanges) { for (ChangeItem change : changes) { int artId = change.getArtId().getId().intValue(); ChangeType changeType = change.getChangeType(); @@ -109,9 +109,9 @@ public class ReportResource { } } - private void buildLists(Map<Integer, Pair<ChangeItem, Set<ChangeItem>>> artToChanges, Set<Long> newArts, Set<Long> modArts, Set<Long> deletedArts) { + private void buildLists(Map<Long, Pair<ChangeItem, Set<ChangeItem>>> artToChanges, Set<Long> newArts, Set<Long> modArts, Set<Long> deletedArts) { - for (Integer artId : artToChanges.keySet()) { + for (Long artId : artToChanges.keySet()) { Pair<ChangeItem, Set<ChangeItem>> pair = artToChanges.get(artId); ChangeItem artChange = pair.getFirst(); ModificationType modType = artChange.getNetChange().getModType(); 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 e858f6e7e47..7284dd62ba7 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 @@ -725,8 +725,8 @@ public class ArtifactEventTest { RemoteAttributeChange1 remAttrChg = new RemoteAttributeChange1(); // Create modify attribute record - int nameAttrId = injectArt.getAttributes().iterator().next().getId().intValue(); - remAttrChg.setAttributeId(nameAttrId); + long nameAttrId = injectArt.getAttributes().iterator().next().getId(); + remAttrChg.setAttributeId((int) nameAttrId); remAttrChg.setGammaId(gammaId7); remAttrChg.setAttributeType(CoreAttributeTypes.Name); remAttrChg.setModTypeGuid(AttributeEventModificationType.Modified.getGuid()); @@ -828,9 +828,8 @@ public class ArtifactEventTest { // Create delete attribute record RemoteAttributeChange1 remAttrChg = new RemoteAttributeChange1(); - int genStrAttrId = - injectArt.getAttributes(CoreAttributeTypes.GeneralStringData).iterator().next().getId().intValue(); - remAttrChg.setAttributeId(genStrAttrId); + long genStrAttrId = injectArt.getAttributes(CoreAttributeTypes.GeneralStringData).iterator().next().getId(); + remAttrChg.setAttributeId((int) genStrAttrId); remAttrChg.setGammaId(gammaId7); remAttrChg.setAttributeType(CoreAttributeTypes.GeneralStringData); remAttrChg.setModTypeGuid(AttributeEventModificationType.Deleted.getGuid()); @@ -869,8 +868,8 @@ public class ArtifactEventTest { /** * Need to always get a new relationId that hasn't been used in this DB yet */ - private int getIncrementingRelationId() { - return (int) ConnectionHandler.getNextSequence(OseeData.REL_LINK_ID_SEQ, true); + private Long getIncrementingRelationId() { + return ConnectionHandler.getNextSequence(OseeData.REL_LINK_ID_SEQ, true); } private static final class ArtifactEventListener implements IArtifactEventListener { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactTypeEventFilterTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactTypeEventFilterTest.java index c902485b050..452fef06c1d 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactTypeEventFilterTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactTypeEventFilterTest.java @@ -77,6 +77,9 @@ public class ArtifactTypeEventFilterTest { // guidArt in relation matches Assert.assertTrue(typeFilter.isMatchRelationArtifacts(relations)); + when(typeProvider.getTypeByGuid(CoreArtifactTypes.AccessControlModel.getGuid())).thenReturn( + CoreArtifactTypes.AccessControlModel); + when(typeProvider.getTypeByGuid(CoreArtifactTypes.Folder.getGuid())).thenReturn(CoreArtifactTypes.Folder); // no art in relation matches guidArtA.setArtTypeGuid(CoreArtifactTypes.AccessControlModel); guidArtB.setArtTypeGuid(CoreArtifactTypes.Folder); 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 32e08c1afde..7c56f840e49 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,6 +24,7 @@ import org.eclipse.osee.client.integration.tests.integration.skynet.core.utils.C import org.eclipse.osee.client.test.framework.OseeClientIntegrationRule; import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TransactionId; +import org.eclipse.osee.framework.core.data.RelationalConstants; import org.eclipse.osee.framework.core.enums.CoreRelationTypes; import org.eclipse.osee.framework.core.enums.DeletionFlag; import org.eclipse.osee.framework.core.enums.TxCurrent; @@ -374,7 +375,7 @@ public class ConflictDeletionTest { while (chStmt.next()) { 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.getLong("art_id"), chStmt.getLong("branch_id"), chStmt.getInt("tx_current"), chStmt.getInt("mod_type"), chStmt.getLong("transaction_id"), chStmt.getLong("gamma_id"))); } } @@ -392,7 +393,7 @@ public class ConflictDeletionTest { 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 = %s", - chStmt.getInt("attr_id"), chStmt.getInt("art_id"), chStmt.getLong("branch_id"), + chStmt.getInt("attr_id"), chStmt.getLong("art_id"), chStmt.getLong("branch_id"), chStmt.getInt("tx_current"), chStmt.getInt("mod_type"), chStmt.getLong("transaction_id"), chStmt.getLong("gamma_id"))); } @@ -411,7 +412,7 @@ public class ConflictDeletionTest { while (chStmt.next()) { System.out.println(String.format( " 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("rel_link_id"), chStmt.getLong("a_art_id"), chStmt.getLong("b_art_id"), chStmt.getLong("branch_id"), chStmt.getInt("tx_current"), chStmt.getInt("mod_type"), chStmt.getLong("transaction_id"), chStmt.getLong("gamma_id"))); } diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java index f16625f09e8..bfa330f3f97 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java @@ -373,7 +373,7 @@ public class ConflictTestManager { } public static void resolveAttributeConflict(AttributeConflict conflict) throws Exception { - int sourceArtifactId = conflict.getSourceArtifact().getArtId(); + long sourceArtifactId = conflict.getSourceArtifact().getArtId(); AttributeTypeId attributeType = conflict.getSourceAttribute(true).getAttributeType(); AttributeValue aValue = null; int artNumber = -1; 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 1c459243de9..cb8a6adc491 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 @@ -140,14 +140,14 @@ public class RelationIntegrityCheckTest { while (chStmt.next()) { GammaId gammaId = GammaId.valueOf(chStmt.getLong("gamma_id")); Long transactionId = chStmt.getLong("transaction_id"); - int relationId = chStmt.getInt("rel_link_id"); + Long relationId = chStmt.getLong("rel_link_id"); BranchId branch = BranchId.valueOf(chStmt.getLong("branch_id")); - int a_sideArtifactId = chStmt.getInt("a_art_id"); - int b_sideArtifactId = chStmt.getInt("b_art_id"); - int deletedTransaction = chStmt.getInt("deleted_tran"); + Long a_sideArtifactId = chStmt.getLong("a_art_id"); + Long b_sideArtifactId = chStmt.getLong("b_art_id"); + Long deletedTransaction = chStmt.getLong("deleted_tran"); //note: aliased column only present in RelationIntegrityCheck.DELETED_ARTIFACTS_QUERY - int commitTransId = chStmt.getInt("commit_trans_art_id"); + Long commitTransId = chStmt.getLong("commit_trans_art_id"); int modType = chStmt.getInt("creating_trans_mod_type"); if (!map.containsKey(gammaId.getId(), transactionId)) { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java index 9eafe101220..216b52fa422 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java @@ -481,11 +481,11 @@ public final class ReplaceWithBaselineTest { private ArtifactId artifactId; private RelationTypeSide relationType; - private int bArtifactId; + private Long bArtifactId; private AttributeId attrId; - private int cArtId; + private Long cArtId; public TestData(Item item, ChangeItem changeItem, boolean isBaseline) { this.item = item; @@ -493,11 +493,11 @@ public final class ReplaceWithBaselineTest { this.isBaseline = isBaseline; } - public int getcArtId() { + public Long getcArtId() { return cArtId; } - public void setcArtId(int cArtId) { + public void setcArtId(Long cArtId) { this.cArtId = cArtId; } @@ -517,11 +517,11 @@ public final class ReplaceWithBaselineTest { this.relationType = relationType; } - public int getbArtifactId() { + public Long getbArtifactId() { return bArtifactId; } - public void setbArtifactId(int bArtifactId) { + public void setbArtifactId(Long bArtifactId) { this.bArtifactId = bArtifactId; } diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessObject.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessObject.java index 0c3532fc45f..b1ea7490c5f 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessObject.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/AccessObject.java @@ -25,7 +25,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; public abstract class AccessObject implements HasBranch { public abstract void removeFromCache(); - public abstract void removeFromDatabase(int subjectId); + public abstract void removeFromDatabase(long subjectId); public static AccessObject getAccessObject(Object object) { if (object instanceof Artifact) { diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java index 926425043bd..a6eba48743a 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java @@ -48,7 +48,7 @@ public class BranchAccessObject extends AccessObject { } @Override - public void removeFromDatabase(int subjectId) { + public void removeFromDatabase(long subjectId) { final String DELETE_BRANCH_ACL = "DELETE FROM OSEE_BRANCH_ACL WHERE privilege_entity_id = ? AND branch_id =?"; ConnectionHandler.runPreparedUpdate(DELETE_BRANCH_ACL, subjectId, branch); } diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/AssociatedArtifactFieldTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/AssociatedArtifactFieldTest.java index 6325a8ed711..984709fa38e 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/AssociatedArtifactFieldTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/AssociatedArtifactFieldTest.java @@ -20,20 +20,20 @@ import org.junit.Test; /** * Test Case For {@link AssociatedArtifactField} - * + * * @author Roberto E. Escobar */ public class AssociatedArtifactFieldTest { - private static Integer art1; - private static Integer art2; + private static Long art1; + private static Long art2; // private static IBasicArtifact<?> art3; @BeforeClass public static void prepareTest() { - art1 = 123432; - art2 = 345421; + art1 = 123432L; + art2 = 345421L; // art3 = MockDataFactory.createArtifact(3); } diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java index 3b192729cc9..3aecb3c155b 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java @@ -110,11 +110,11 @@ public class TransactionRecordTest { @Test public void testGetSetCommit() { - Assert.assertEquals(commitArtId, transaction.getCommit()); + Assert.assertEquals(commitArtId, transaction.getCommitArtId()); Long otherId = commitArtId * 333; transaction.setCommit(otherId); - Assert.assertEquals(otherId, transaction.getCommit()); + Assert.assertEquals(otherId, transaction.getCommitArtId()); transaction.setCommit(commitArtId); } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java index b1b05465b97..27e8dfbbfb1 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/TransactionRecord.java @@ -36,12 +36,13 @@ public class TransactionRecord extends BaseId implements TransactionToken, Adapt private Long buildId; public TransactionRecord(Long id, BranchId branch, String comment, Date time, UserId authorArtId, Long commitArtId, TransactionDetailsType txType, Long buildId) { + public TransactionRecord(Long id, BranchId branch, String comment, Date time, UserId author, Long commitArtId, TransactionDetailsType txType, , Long buildId) { super(id); this.branch = branch; this.buildId = buildId; this.comment = Strings.intern(comment); this.time = time; - this.authorArtId = authorArtId; + this.author = author; this.commitArtId = commitArtId; this.txType = txType; } @@ -60,10 +61,10 @@ public class TransactionRecord extends BaseId implements TransactionToken, Adapt } public UserId getAuthor() { - return authorArtId; + return author; } - public Long getCommit() { + public Long getCommitArtId() { return commitArtId; } @@ -79,8 +80,8 @@ public class TransactionRecord extends BaseId implements TransactionToken, Adapt this.time = time; } - public void setAuthor(UserId authorArtId) { - this.authorArtId = authorArtId; + public void setAuthor(UserId author) { + this.author = author; } public void setCommit(Long commitArtId) { diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/change/ChangeItem.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/change/ChangeItem.java index 766f1dfdc17..a5e5f6589df 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/change/ChangeItem.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/change/ChangeItem.java @@ -188,28 +188,16 @@ public class ChangeItem implements Comparable<ChangeItem> { if (this == obj) { return true; } - if (!(obj instanceof ChangeItem)) { + if (obj == null) { return false; } - - ChangeItem other = (ChangeItem) obj; - + if (getClass() != obj.getClass()) { if (itemId.notEqual(other.itemId)) { - return false; - } if (artId.notEqual(other.artId)) { return false; } - if (currentVersion == null) { - if (other.currentVersion != null) { - return false; - } - } else { - if (!currentVersion.equals(other.currentVersion)) { - return false; - } - } if (itemTypeId.notEqual(other.itemTypeId)) { + if (itemId != other.itemId) { return false; } return true; @@ -280,7 +268,7 @@ public class ChangeItem implements Comparable<ChangeItem> { @Override public int hashCode() { - return itemId.getId().hashCode(); + return itemId.hashCode(); } public boolean isDeleted() { diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/AssociatedArtifactField.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/AssociatedArtifactField.java index f4c7177c659..98ac229f4fd 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/AssociatedArtifactField.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/AssociatedArtifactField.java @@ -18,22 +18,22 @@ import org.eclipse.osee.framework.core.model.AbstractOseeField; /** * @author Roberto E. Escobar */ -public class AssociatedArtifactField extends AbstractOseeField<Integer> { +public class AssociatedArtifactField extends AbstractOseeField<Long> { - private Integer artId; + private Long artId; - public AssociatedArtifactField(Integer artId) { + public AssociatedArtifactField(Long artId) { super(); this.artId = artId; } @Override - public Integer get() { + public Long get() { return artId; } @Override - public void set(Integer artId) { + public void set(Long artId) { boolean wasDifferent = isDifferent(get(), artId); if (wasDifferent) { this.artId = artId; @@ -41,7 +41,7 @@ public class AssociatedArtifactField extends AbstractOseeField<Integer> { isDirty |= wasDifferent; } - private boolean isDifferent(Integer artId1, Integer artId2) { + private boolean isDifferent(Long artId1, Long artId2) { if (artId1 == null) { if (artId2 == null) { return false; diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/RelationalConstants.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/RelationalConstants.java index 66583021d80..017c108de28 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/RelationalConstants.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/RelationalConstants.java @@ -26,12 +26,12 @@ public final class RelationalConstants { public static final int JOIN_QUERY_ID_SENTINEL = -1; public static final boolean IS_HISTORICAL_DEFAULT = false; - public static final int ART_ID_SENTINEL = -1; + public static final Long ART_ID_SENTINEL = Long.valueOf(-1); public static final String DEFAULT_RATIONALE = ""; public static final String DEFAULT_NAME = ""; public static final String DEFAULT_COMMENT = ""; - public static final Integer DEFAULT_ITEM_ID = -1; + public static final Long DEFAULT_ITEM_ID = -1L; public static final long DEFAULT_TYPE_UUID = -1L; public static final ModificationType DEFAULT_MODIFICATION_TYPE = ModificationType.NEW; 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 c94707d7a79..d1f948646f2 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 @@ -89,7 +89,7 @@ public class RemoteAttributeChange1 extends RemoteEvent { /** * Gets the value of the attributeId property. */ - public int getAttributeId() { + public long getAttributeId() { return attributeId; } 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 de55f6c2c2d..841091ca597 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 @@ -59,13 +59,13 @@ public class RemoteBasicGuidRelation1 extends RemoteEvent { protected String modTypeGuid; @XmlElement(required = true) protected String branchGuid; - protected long relTypeGuid; - protected int relationId; + protected Long relTypeGuid; + protected Long relationId; protected int gammaId; - protected int artAId; + protected Long artAId; @XmlElement(required = true) protected RemoteBasicGuidArtifact1 artA; - protected int artBId; + protected long artBId; @XmlElement(required = true) protected RemoteBasicGuidArtifact1 artB; @XmlElement(required = true) @@ -128,14 +128,14 @@ public class RemoteBasicGuidRelation1 extends RemoteEvent { /** * Gets the value of the relationId property. */ - public int getRelationId() { + public long getRelationId() { return relationId; } /** * Sets the value of the relationId property. */ - public void setRelationId(int value) { + public void setRelationId(Long value) { this.relationId = value; } @@ -156,14 +156,14 @@ public class RemoteBasicGuidRelation1 extends RemoteEvent { /** * Gets the value of the artAId property. */ - public int getArtAId() { + public long getArtAId() { return artAId; } /** * Sets the value of the artAId property. */ - public void setArtAId(int value) { + public void setArtAId(long value) { this.artAId = value; } @@ -188,14 +188,14 @@ public class RemoteBasicGuidRelation1 extends RemoteEvent { /** * Gets the value of the artBId property. */ - public int getArtBId() { + public long getArtBId() { return artBId; } /** * Sets the value of the artBId property. */ - public void setArtBId(int value) { + public void setArtBId(long value) { this.artBId = value; } 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 34da6b0f9b8..148f4414115 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 @@ -263,7 +263,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F return objs; } - public final int getArtId() { + public final Long getArtId() { return getId().intValue(); } @@ -344,11 +344,11 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F return null; } - public final List<Integer> getAttributeIds(AttributeTypeId attributeType) { - List<Integer> items = new ArrayList<>(); + public final List<Long> getAttributeIds(AttributeTypeId attributeType) { + List<Long> items = new ArrayList<>(); List<Attribute<Object>> data = getAttributes(attributeType); for (Attribute<Object> attribute : data) { - items.add(attribute.getId().intValue()); + Long value = new Long(attribute.getId()); } return items; } @@ -508,7 +508,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F return attribute; } - public final <T> Attribute<T> internalInitializeAttribute(AttributeTypeToken attributeType, int attributeId, GammaId gammaId, ModificationType modificationType, ApplicabilityId applicabilityId, boolean markDirty, Object... data) { + public final <T> Attribute<T> internalInitializeAttribute(AttributeTypeToken attributeType, long attributeId, GammaId gammaId, ModificationType modificationType, ApplicabilityId applicabilityId, boolean markDirty, Object... data) { return internalInitializeAttribute(attributeType, AttributeId.valueOf(attributeId), gammaId, modificationType, applicabilityId, markDirty, data); } @@ -1266,6 +1266,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F * <b>transaction.execute();</b> * ... * </pre> + * * </p> */ public final void persist(SkynetTransaction managedTransaction) { @@ -1508,8 +1509,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F private void copyAttributes(Artifact artifact, Collection<AttributeTypeId> excludeAttributeTypes) { for (Attribute<?> attribute : getAttributes()) { - if (!excludeAttributeTypes.contains(attribute.getAttributeType()) && isCopyAllowed( - attribute) && artifact.isAttributeTypeValid(attribute.getAttributeType())) { + if (!excludeAttributeTypes.contains(attribute.getAttributeType()) && isCopyAllowed(attribute) && artifact.isAttributeTypeValid(attribute.getAttributeType())) { artifact.addAttribute(attribute.getAttributeType(), attribute.getValue()); } } @@ -1589,8 +1589,17 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F } private static final Pattern safeNamePattern = Pattern.compile("[^A-Za-z0-9 ]"); - private static final String[] NUMBER = - new String[] {"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"}; + private static final String[] NUMBER = new String[] { + "Zero", + "One", + "Two", + "Three", + "Four", + "Five", + "Six", + "Seven", + "Eight", + "Nine"}; /** * Since artifact names are free text it is important to reformat the name to ensure it is suitable as an element diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java index 4c82476bc66..0b6838d1575 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java @@ -172,8 +172,4 @@ public final class ArtifactCache { public static Artifact getActive(String artGuid, BranchId branch) { return ID_CACHE.getByGuid(artGuid, branch); } - - public static Artifact getActive(Long artId, BranchId branch) { - return getActive(ArtifactToken.valueOf(artId, branch)); - } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java index 58ef9eb8a09..2c77e121ecc 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java @@ -112,7 +112,7 @@ public class ArtifactTypeManager { DeletionFlag.INCLUDE_DELETED)); } if (artifacts.size() > 0) { - HashMap<Integer, Artifact> artifactMap = new HashMap<>(); + HashMap<Long, Artifact> artifactMap = new HashMap<>(); for (Artifact artifact : artifacts) { artifactMap.put(artifact.getArtId(), artifact); } 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 354531564d7..9666572801b 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 @@ -49,7 +49,7 @@ class RelationLoader { String sqlQuery = ServiceUtil.getSql(OseeSql.LOAD_RELATIONS); chStmt.runPreparedQuery(artifacts.size() * 8, sqlQuery, joinQueryId); while (chStmt.next()) { - int relationId = chStmt.getInt("rel_link_id"); + Long relationId = chStmt.getLong("rel_link_id"); BranchId branch = BranchId.valueOf(chStmt.getLong("branch_id")); ArtifactToken aArtifactId = ArtifactToken.valueOf(chStmt.getLong("a_art_id"), branch); ArtifactToken bArtifactId = ArtifactToken.valueOf(chStmt.getLong("b_art_id"), branch); 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 501ad22fe6b..b888044dc88 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 @@ -27,13 +27,13 @@ import org.eclipse.osee.framework.core.model.TransactionDelta; public final class AttributeChangeBuilder extends ChangeBuilder { private final String isValue; private String wasValue; - private final int attrId; + private final long attrId; private final AttributeTypeToken attributeType; private final ModificationType artModType; private final String isUri; private String wasUri; - public AttributeChangeBuilder(BranchId branch, ArtifactTypeId artifactType, GammaId sourceGamma, ArtifactId artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical, String isValue, String wasValue, int attrId, AttributeTypeToken attributeType, ModificationType artModType, String isUri, String wasUri) { + public AttributeChangeBuilder(BranchId branch, ArtifactTypeId artifactType, GammaId sourceGamma, ArtifactId artId, TransactionDelta txDelta, ModificationType modType, boolean isHistorical, String isValue, String wasValue, long attrId, AttributeTypeToken attributeType, ModificationType artModType, String isUri, String wasUri) { super(branch, artifactType, sourceGamma, artId, txDelta, modType, isHistorical); this.isValue = isValue; this.wasValue = wasValue; @@ -60,7 +60,7 @@ public final class AttributeChangeBuilder extends ChangeBuilder { return wasValue; } - public int getAttrId() { + public long getAttrId() { return attrId; } 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 942c4e5010c..492ded011fc 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 @@ -26,11 +26,11 @@ import org.eclipse.osee.framework.core.model.TransactionDelta; */ public class RelationChangeBuilder extends ChangeBuilder { private final ArtifactId bArtId; - private final int relLinkId; + private final long relLinkId; private final String rationale; private final RelationTypeToken relationType; - public RelationChangeBuilder(BranchId branch, ArtifactTypeId artifactType, GammaId sourceGamma, ArtifactId artId, TransactionDelta txDelta, ModificationType modType, ArtifactId bArtId, int relLinkId, String rationale, RelationTypeToken relationType, boolean isHistorical) { + public RelationChangeBuilder(BranchId branch, ArtifactTypeId artifactType, GammaId sourceGamma, ArtifactId artId, TransactionDelta txDelta, ModificationType modType, ArtifactId bArtId, long relLinkId, String rationale, RelationTypeToken relationType, boolean isHistorical) { super(branch, artifactType, sourceGamma, artId, txDelta, modType, isHistorical); this.bArtId = bArtId; this.relLinkId = relLinkId; @@ -42,7 +42,7 @@ public class RelationChangeBuilder extends ChangeBuilder { return bArtId; } - public int getRelLinkId() { + public long getRelLinkId() { return relLinkId; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java index 09d87cbb837..41bda0db533 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java @@ -286,7 +286,7 @@ public final class FrameworkEventUtil { public static RemoteAttributeChange1 getRemoteAttributeChange(AttributeChange attrChg) { RemoteAttributeChange1 remAttrChg = new RemoteAttributeChange1(); - remAttrChg.setAttributeId(attrChg.getAttributeId()); + remAttrChg.setAttributeId((int) attrChg.getAttributeId()); remAttrChg.setGammaId(attrChg.getGammaId().getIdIntValue()); remAttrChg.setAttrTypeGuid(attrChg.getAttrTypeGuid()); remAttrChg.setModTypeGuid(attrChg.getModTypeGuid()); 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 f942a23cc19..7994a3acf47 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 @@ -59,7 +59,7 @@ public class AttributeChange implements FrameworkEvent { protected Long attrTypeGuid; @XmlElement(required = true) protected String modTypeGuid; - protected int attributeId; + protected long attributeId; protected GammaId gammaId; @XmlElement(required = true) protected List<Object> data; @@ -82,11 +82,11 @@ public class AttributeChange implements FrameworkEvent { this.modTypeGuid = value; } - public int getAttributeId() { + public long getAttributeId() { return attributeId; } - public void setAttributeId(int value) { + public void setAttributeId(long value) { this.attributeId = value; } 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 7f0a1c191b7..403e4338bd5 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 @@ -26,8 +26,8 @@ import org.eclipse.osee.framework.skynet.core.relation.RelationEventType; public class EventBasicGuidRelation extends DefaultBasicIdRelation { private final RelationEventType relationEventType; - private final int artAId; - private final int artBId; + private final long artAId; + private final long artBId; private String rationale; public EventBasicGuidRelation(RelationEventType relationEventType, ArtifactId artAId, ArtifactId artBId, DefaultBasicIdRelation guidRel) { @@ -36,7 +36,7 @@ public class EventBasicGuidRelation extends DefaultBasicIdRelation { guidRel.getArtB()); } - public EventBasicGuidRelation(RelationEventType relationEventType, BranchId branchUuid, Long relTypeGuid, Long relationId, GammaId gammaId, int artAId, DefaultBasicGuidArtifact artA, int artBId, DefaultBasicGuidArtifact artB) { + public EventBasicGuidRelation(RelationEventType relationEventType, BranchId branchUuid, Long relTypeGuid, Long relationId, GammaId gammaId, long artAId, DefaultBasicGuidArtifact artA, long artBId, DefaultBasicGuidArtifact artB) { super(branchUuid, relTypeGuid, relationId, gammaId, artA, artB); this.relationEventType = relationEventType; this.artAId = artAId; @@ -53,15 +53,17 @@ public class EventBasicGuidRelation extends DefaultBasicIdRelation { getBranch().getIdString(), getBranch().getIdString(), getGammaId(), getRelationId(), getArtA(), getArtB()); } + public long getArtAId() { + return artAId; + } + @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); - result = prime * result + (relationEventType == null ? 0 : relationEventType.hashCode()); - result = prime * result + artAId; - result = prime * result + (getArtA() == null ? 0 : getArtA().hashCode()); - result = prime * result + artBId; - result = prime * result + (getArtB() == null ? 0 : getArtB().hashCode()); + result = prime * result + (int) (artAId ^ (artAId >>> 32)); + result = prime * result + (int) (artBId ^ (artBId >>> 32)); + result = prime * result + ((relationEventType == null) ? 0 : relationEventType.hashCode()); return result; } @@ -77,41 +79,19 @@ public class EventBasicGuidRelation extends DefaultBasicIdRelation { return false; } EventBasicGuidRelation other = (EventBasicGuidRelation) obj; - if (relationEventType == null) { - if (other.relationEventType != null) { - return false; - } - } else if (!relationEventType.equals(other.relationEventType)) { - return false; - } if (artAId != other.artAId) { return false; } - if (getArtA() == null) { - if (other.getArtA() != null) { - return false; - } - } else if (!getArtA().equals(other.getArtA())) { - return false; - } if (artBId != other.artBId) { return false; } - if (getArtB() == null) { - if (other.getArtB() != null) { - return false; - } - } else if (!getArtB().equals(other.getArtB())) { + if (relationEventType != other.relationEventType) { return false; } return true; } - public int getArtAId() { - return artAId; - } - - public int getArtBId() { + public long getArtBId() { return artBId; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java index 1884eae4218..cc2fef034d9 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java @@ -168,12 +168,12 @@ public class DoorsArtifactExtractor extends AbstractArtifactExtractor { * need to modify the HTML so the image references the data stored in the artifact. **************************************/ try { - List<Integer> Ids = theArtifact.getAttributeIds(CoreAttributeTypes.ImageContent); + List<Long> ids = theArtifact.getAttributeIds(CoreAttributeTypes.ImageContent); List<String> HTML = theArtifact.getAttributeValues(CoreAttributeTypes.HtmlContent); theArtifact.deleteAttributes(CoreAttributeTypes.HtmlContent); for (String htmlVal : HTML) { int iCount = 0; - for (Integer imageNumber : Ids) { + for (Long imageNumber : ids) { htmlVal = htmlVal.replaceAll(IMAGE_BASE_NAME + Integer.toString(iCount), imageNumber.toString()); iCount++; toReturn = true; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java index 27f0e10bd0c..ea6d19e591a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java @@ -104,7 +104,7 @@ public class RelationCache { /** * Find RelationById Related On ArtA or ArtB */ - public RelationLink getByRelIdOnArtifact(int relLinkId, ArtifactToken artifactA, ArtifactToken artifactB) { + public RelationLink getByRelIdOnArtifact(long relLinkId, ArtifactToken artifactA, ArtifactToken artifactB) { RelationMatcher relIdMatcher = RelationFilterUtil.createFindFirstRelationLinkIdMatcher(relLinkId); List<RelationLink> links = new ArrayList<>(); findRelations(links, artifactA, relIdMatcher); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java index b9db3f82a06..5671063b371 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java @@ -38,7 +38,7 @@ public class RelationFilterUtil { return new FirstSideRelatedArtIdMatcher(artifactId, side.isSideA()); } - public static RelationMatcher createFindFirstRelationLinkIdMatcher(int relLinkId) { + public static RelationMatcher createFindFirstRelationLinkIdMatcher(long relLinkId) { return new FirstRelationLinkIdMatcher(relLinkId); } @@ -78,9 +78,9 @@ public class RelationFilterUtil { } private static final class FirstRelationLinkIdMatcher implements RelationMatcher { - private final int relLinkId; + private final long relLinkId; - public FirstRelationLinkIdMatcher(int relLinkId) { + public FirstRelationLinkIdMatcher(long relLinkId) { this.relLinkId = relLinkId; } 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 7f4a702a7b9..32474e1733d 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 @@ -62,7 +62,7 @@ public class RelationLink implements HasBranch, IRelationLink { private boolean useBackingData; - public RelationLink(ArtifactToken artifactA, ArtifactToken artifactB, BranchId branch, RelationTypeToken relationType, int relationId, GammaId gammaId, String rationale, ModificationType modificationType, ApplicabilityId applicabilityId) { + public RelationLink(ArtifactToken artifactA, ArtifactToken artifactB, BranchId branch, RelationTypeToken relationType, Long relationId, GammaId gammaId, String rationale, ModificationType modificationType, ApplicabilityId applicabilityId) { this.relationType = relationType; this.relationId = relationId; this.gammaId = gammaId; @@ -306,7 +306,7 @@ public class RelationLink implements HasBranch, IRelationLink { ArtifactCache.updateCachedArtifact(artifactB); } - public void internalSetRelationId(int relationId) { + public void internalSetRelationId(Long relationId) { this.relationId = relationId; } 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 da2cc901018..30d03d61bbc 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 @@ -605,7 +605,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, GammaId gammaId, String rationale, ModificationType modificationType, ApplicabilityId applicabilityId) { + public static synchronized RelationLink getOrCreate(ArtifactToken aArtifactId, ArtifactToken bArtifactId, RelationTypeToken relationType, Long relationId, GammaId gammaId, String rationale, ModificationType modificationType, ApplicabilityId applicabilityId) { BranchId branch = aArtifactId.getBranch(); RelationLink relation = null; if (relationId != 0) { @@ -627,7 +627,7 @@ public class RelationManager { return relationCache.getLoadedRelation(relationType, aArtifactId, bArtifactId); } - public static RelationLink getLoadedRelationById(int relLinkId, ArtifactToken aArtifactId, ArtifactToken bArtifactId, BranchId branch) { + public static RelationLink getLoadedRelationById(long relLinkId, ArtifactToken aArtifactId, ArtifactToken bArtifactId, BranchId branch) { return relationCache.getByRelIdOnArtifact(relLinkId, aArtifactId, bArtifactId); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java index 89531d7ef6b..0e34970daa2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java @@ -137,7 +137,7 @@ public class ChangeData { Set<Artifact> artifacts = new HashSet<>(); if (kindType == KindType.Artifact || kindType == KindType.ArtifactOrRelation || kindType == KindType.Relation) { if (!isEmpty()) { - HashMap<Integer, Boolean> excludeArtifact = new HashMap<>(); + HashMap<Long, Boolean> excludeArtifact = new HashMap<>(); for (Change change : changes) { Artifact artifact = change.getChangeArtifact(); @@ -145,7 +145,7 @@ public class ChangeData { if (artifactTypesToIgnore != null && !artifactTypesToIgnore.isEmpty()) { try { if (change instanceof AttributeChange) { - Integer id = artifact.getArtId(); + Long id = artifact.getArtId(); long typeId = change.getItemTypeId().getId(); AttributeTypeToken attributeType = AttributeTypeManager.getAttributeType(typeId); if (excludeArtifact.containsKey(id)) { @@ -190,7 +190,7 @@ public class ChangeData { if (artifactTypesToIgnore != null && !artifactTypesToIgnore.isEmpty()) { Set<Artifact> excludeList = new HashSet<>(); for (Artifact artifactToCheck : artifacts) { - Integer id = artifactToCheck.getArtId(); + Long id = artifactToCheck.getArtId(); Boolean remove = excludeArtifact.get(id); if (remove != null) { if (remove) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java index 1bff8a889f6..1ea9ad5ec6a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java @@ -113,7 +113,7 @@ public final class ChangeManager { public static HashCollection<Artifact, TransactionId> getModifingTransactions(Collection<Artifact> artifacts) { HashCollection<Artifact, TransactionId> transactionMap = new HashCollection<>(); try (Id4JoinQuery joinQuery = JoinUtility.createId4JoinQuery()) { - CompositeKeyHashMap<Integer, BranchId, Artifact> artifactMap = new CompositeKeyHashMap<>(); + CompositeKeyHashMap<Long, BranchId, Artifact> artifactMap = new CompositeKeyHashMap<>(); for (Artifact artifact : artifacts) { BranchId branch = artifact.getBranch(); artifactMap.put(artifact.getArtId(), branch, artifact); @@ -135,7 +135,7 @@ public final class ChangeManager { joinQuery.getQueryId()); while (chStmt.next()) { BranchId branch = BranchId.valueOf(chStmt.getLong("branch_id")); - Artifact artifact = artifactMap.get(chStmt.getInt("art_id"), branch); + Artifact artifact = artifactMap.get(chStmt.getLong("art_id"), branch); transactionMap.put(artifact, TransactionId.valueOf(chStmt.getLong("transaction_id"))); } } finally { @@ -154,7 +154,7 @@ public final class ChangeManager { public static HashCollection<Artifact, BranchId> getModifingBranches(Collection<Artifact> artifacts) { HashCollection<Artifact, BranchId> branchMap = new HashCollection<>(); try (Id4JoinQuery joinQuery = JoinUtility.createId4JoinQuery()) { - CompositeKeyHashMap<Integer, BranchId, Artifact> artifactMap = + CompositeKeyHashMap<Long, BranchId, Artifact> artifactMap = new CompositeKeyHashMap<>(); for (Artifact artifact : artifacts) { artifactMap.put(artifact.getArtId(), artifact.getBranch(), artifact); @@ -176,7 +176,7 @@ public final class ChangeManager { while (chStmt.next()) { if (chStmt.getInt("tx_count") > 0) { BranchId branch = BranchId.valueOf(chStmt.getLong("branch_id")); - Artifact artifact = artifactMap.get(chStmt.getInt("art_id"), BranchManager.getParentBranch(branch)); + Artifact artifact = artifactMap.get(chStmt.getLong("art_id"), BranchManager.getParentBranch(branch)); branchMap.put(artifact, branch); } } 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 2e3cd6b65d0..d25a8323114 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 @@ -46,7 +46,7 @@ import org.eclipse.osee.jdbc.JdbcStatement; * @author Jeff C. Phillips */ public class AttributeChangeAcquirer extends ChangeAcquirer { - private final Map<Integer, ChangeBuilder> attributesWasValueCache = new HashMap<>(); + private final Map<Long, ChangeBuilder> attributesWasValueCache = new HashMap<>(); private int previousAttrId = -1; public AttributeChangeAcquirer(BranchId sourceBranch, TransactionToken transactionId, IProgressMonitor monitor, Artifact specificArtifact, Set<ArtifactId> artIds, ArrayList<ChangeBuilder> changeBuilders, Set<ArtifactId> newAndDeletedArtifactIds) { @@ -111,7 +111,7 @@ public class AttributeChangeAcquirer extends ChangeAcquirer { TransactionDelta txDelta = new TransactionDelta(fromTransactionId, toTransactionId); while (chStmt.next()) { - int attrId = chStmt.getInt("attr_id"); + long attrId = chStmt.getLong("attr_id"); ArtifactId artId = ArtifactId.valueOf(chStmt.getLong("art_id")); GammaId sourceGamma = GammaId.valueOf(chStmt.getLong("gamma_id")); AttributeTypeToken attributeType = AttributeTypeManager.getAttributeType(chStmt.getLong("attr_type_id")); 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 d869229e523..3ce93d75054 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 @@ -79,7 +79,7 @@ public class RelationChangeAcquirer extends ChangeAcquirer { while (chStmt.next()) { ArtifactId aArtId = ArtifactId.valueOf(chStmt.getLong("a_art_id")); ArtifactId bArtId = ArtifactId.valueOf(chStmt.getLong("b_art_id")); - int relLinkId = chStmt.getInt("rel_link_id"); + Long relLinkId = chStmt.getLong("rel_link_id"); if (!getNewAndDeletedArtifactIds().contains(aArtId) && !getNewAndDeletedArtifactIds().contains(bArtId)) { ModificationType modificationType = ModificationType.valueOf(chStmt.getInt("mod_type")); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java index b1b2694e3c3..bf83205480a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java @@ -104,8 +104,8 @@ public final class SkynetTransaction extends TransactionOperation<BranchId> { return AttributeId.valueOf(ConnectionHandler.getNextSequence(ATTR_ID_SEQ, true)); } - private int getNewRelationId() { - return (int) ConnectionHandler.getNextSequence(REL_LINK_ID_SEQ, true); + private Long getNewRelationId() { + return ConnectionHandler.getNextSequence(REL_LINK_ID_SEQ, true); } private User getAuthor() { 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 67a804d0e97..450021878fe 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 @@ -134,7 +134,7 @@ public final class TransactionManager { } public static Long getCommitArtId(TransactionId tx) { - return (long) getTransaction(tx).getCommit(); + return getTransaction(tx).getCommitArtId(); } public synchronized static Collection<TransactionRecord> getCommittedArtifactTransactionIds(ArtifactId artifact) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ConnectionHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ConnectionHandler.java index d383c49158e..9fe625df7ab 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ConnectionHandler.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ConnectionHandler.java @@ -94,7 +94,7 @@ public final class ConnectionHandler { return getJdbcClient().runPreparedUpdate(connection, query, data); } - public static long getNextSequence(String sequenceName, boolean aggressiveFetch) { + public static Long getNextSequence(String sequenceName, boolean aggressiveFetch) { return getJdbcClient().getNextSequence(sequenceName, aggressiveFetch); } }
\ No newline at end of file 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 136da0f8036..31eacc38323 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 @@ -62,8 +62,17 @@ public class WordUtil { public static final String BODY_START = "<w:body>"; public static final String BODY_END = "</w:body>"; - private static final String[] NUMBER = - new String[] {"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"}; + private static final String[] NUMBER = new String[] { + "Zero", + "One", + "Two", + "Three", + "Four", + "Five", + "Six", + "Seven", + "Eight", + "Nine"}; private static final String SELECT_WORD_VALUES = "SELECT attr.content, attr.gamma_id FROM osee_attribute attr, osee_txs txs WHERE attr.art_id=? AND attr.attr_type_id=? AND attr.gamma_id = txs.gamma_id AND txs.branch_id=? ORDER BY attr.gamma_id DESC"; diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/TxData.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/TxData.java index f2c7d968b4f..b41ba9f45f1 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/TxData.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/TxData.java @@ -36,7 +36,7 @@ public class TxData { private final Long txId; public TxData(BranchId branch, UserId authorId, Date timeStamp, String comment, TransactionDetailsType txType, Long commitArtId, long txId) { - this.authorId = authorId; + this.author = author; this.timeStamp = timeStamp; this.comment = comment; this.txType = txType; @@ -51,7 +51,7 @@ public class TxData { public String getAuthor() { String authorName = null; try { - User user = UserManager.getUserByArtId(authorId); + User user = UserManager.getUserByArtId(author); if (user != null) { authorName = user.getName(); } @@ -124,7 +124,7 @@ public class TxData { } protected static TxData createTxData(TransactionRecord txId) { - return new TxData(txId.getBranch(), txId.getAuthor(), txId.getTimeStamp(), txId.getComment(), txId.getTxType(), - txId.getCommit(), txId.getId()); + return new TxData(txId.getBranch(), txId.getAuthor(), txId.getTimeStamp(), txId.getComment(), + txId.getTxType(), txId.getCommitArtId(), txId.getId()); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/GraphitiRenderer.java b/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/GraphitiRenderer.java index b59a16da935..fba0841dc9c 100644 --- a/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/GraphitiRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/GraphitiRenderer.java @@ -92,7 +92,7 @@ public class GraphitiRenderer extends DefaultArtifactRenderer { IWorkbenchPage activePage = AWorkbench.getActivePage(); for (Artifact artifact : artifacts) { - Integer attributeId = artifact.getAttributeIds(GraphitiDiagram).get(0); + Long attributeId = artifact.getAttributeIds(GraphitiDiagram).get(0); URI diagramUri = URI.createURI(String.format("osee://branch/%s/artifact/%s/attribute/%d", artifact.getBranch().getIdString(), artifact.getIdString(), attributeId)); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactTransfer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactTransfer.java index 11595be1c19..1daba37fea8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactTransfer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactTransfer.java @@ -165,7 +165,7 @@ public class ArtifactTransfer extends ByteArrayTransfer { * Writes the given resource to the given stream. */ private void writeArtifact(DataOutputStream dataOut, Artifact artifact) throws IOException { - dataOut.writeInt(artifact.getArtId()); + dataOut.writeLong(artifact.getArtId()); dataOut.writeLong(artifact.getBranch().getId()); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AuthorIdCheck.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AuthorIdCheck.java index fffdf50d04e..c23add103a8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AuthorIdCheck.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AuthorIdCheck.java @@ -56,13 +56,13 @@ public class AuthorIdCheck extends DatabaseHealthOperation { rd.addRaw(AHTML.beginMultiColumnTable(100, 1)); rd.addRaw(AHTML.addHeaderRowMultiColumnTable(columnHeaders)); - Set<Integer> authors = new HashSet<>(); + Set<Long> authors = new HashSet<>(); JdbcStatement chStmt1 = ConnectionHandler.getStatement(); try { chStmt1.runPreparedQuery(GET_AUTHOR_IDS); while (chStmt1.next()) { checkForCancelledStatus(monitor); - int author = chStmt1.getInt("author"); + Long author = chStmt1.getLong("author"); authors.add(author); } } finally { @@ -70,9 +70,9 @@ public class AuthorIdCheck extends DatabaseHealthOperation { } int num = 0; StringBuffer infoSb = new StringBuffer(500); - for (Integer author : authors) { + for (Long author : authors) { System.out.println(String.format("Processing [%d] %d/%d...", author, num++, authors.size())); - if (author == 0) { + if (author.equals(Long.valueOf(0))) { rd.addRaw(AHTML.addRowMultiColumnTable("TX_DETAILS", String.valueOf(author), "Warning: Skipping author == 0; this is ok, but may want to change in future")); continue; @@ -113,7 +113,7 @@ public class AuthorIdCheck extends DatabaseHealthOperation { } } - private static void updateTxAuthor(int author) throws Exception { + private static void updateTxAuthor(Long author) throws Exception { ConnectionHandler.runPreparedUpdate(UPDATE_AUTHOR_IDS, SystemUser.OseeSystem, author); } 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 0f1e45f5b82..b3f8009731b 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 @@ -35,14 +35,14 @@ import org.eclipse.osee.jdbc.JdbcStatement; */ public class ItemsDeletedWithNoOtherModification extends DatabaseHealthOperation { private class LocalValues { - public int relLinkId; - public int artId; + public Long relLinkId; + public Long artId; public int attributeId; public GammaId gammaId; public long transactionId; public long branchUuid; - public LocalValues(int artId, int attributeId, long branchUuid, GammaId gammaId, int relLinkId, long transactionId) { + public LocalValues(Long artId, int attributeId, long branchUuid, GammaId gammaId, Long relLinkId, long transactionId) { super(); this.artId = artId; this.attributeId = attributeId; @@ -76,8 +76,8 @@ 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"), GammaId.valueOf(chStmt.getLong("gamma_id")), chStmt.getInt("rel_link_id"), + addressing.add(new LocalValues(chStmt.getLong("art_id"), chStmt.getLong("attr_id"), + chStmt.getLong("branch_id"), GammaId.valueOf(chStmt.getLong("gamma_id")), chStmt.getLong("rel_link_id"), chStmt.getLong("transaction_id"))); } } finally { 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 18a09944911..50b9bcf7341 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 @@ -17,12 +17,17 @@ 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 int modType; public BranchId branch; + public Long transIdForArtifactDeletion; public GammaId gammaId; public Long relTransId; + public Long relLinkId; + public Long aArtId; + public Long bArtId; + public Long commitTrans; - public LocalRelationLink(int relLinkId, GammaId gammaId, Long transactionId, BranchId branch, int aArtId, int bArtId, int transIdForArtifactDeletion, int commitTrans, int modType) { + public LocalRelationLink(Long relLinkId, GammaId gammaId, Long transactionId, BranchId branch, Long aArtId, Long bArtId, Long transIdForArtifactDeletion, Long commitTrans, Integer modType) { this.aArtId = aArtId; this.bArtId = bArtId; this.branch = branch; @@ -36,7 +41,7 @@ public class LocalRelationLink { @Override public String toString() { - return String.format("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s", gammaId, relTransId, relLinkId, branch, aArtId, bArtId, - transIdForArtifactDeletion, commitTrans, modType); + return String.format("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s", gammaId, relTransId, relLinkId, branch, aArtId, + bArtId, transIdForArtifactDeletion, commitTrans, modType); } }
\ No newline at end of file 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 c15dc3be6fd..b2f913e9a76 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 @@ -315,14 +315,14 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation { while (chStmt.next()) { GammaId gamma_id = GammaId.valueOf(chStmt.getLong("gamma_id")); Long transactionId = chStmt.getLong("transaction_id"); - int relationId = chStmt.getInt("rel_link_id"); + Long relationId = chStmt.getLong("rel_link_id"); BranchId branch = BranchId.valueOf(chStmt.getLong("branch_id")); - int a_sideArtifactId = chStmt.getInt("a_art_id"); - int b_sideArtifactId = chStmt.getInt("b_art_id"); - int deletedTransaction = chStmt.getInt("deleted_tran"); + Long a_sideArtifactId = chStmt.getLong("a_art_id"); + Long b_sideArtifactId = chStmt.getLong("b_art_id"); + Long deletedTransaction = chStmt.getLong("deleted_tran"); - int commitTransId = forDelete ? 0 : chStmt.getInt("commit_trans_art_id"); - int modType = forDelete ? -1 : chStmt.getInt("creating_trans_mod_type"); + Long commitTransId = forDelete ? 0 : chStmt.getLong("commit_trans_art_id"); + Integer modType = forDelete ? -1 : chStmt.getInt("creating_trans_mod_type"); if (!map.containsKey(gamma_id.getId(), transactionId) && (forDelete || !deleteMap.containsKey(gamma_id.getId(), transactionId))) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java index 2f4f46977d1..2400a7977a2 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java @@ -47,6 +47,25 @@ public class ArtifactExplorerLinkNode { return parentIsOnSideA; } + public List<Artifact> getOppositeArtifacts() { + List<Artifact> oppositeArtifacts = new ArrayList<Artifact>(); + for (RelationLink link : artifact.getRelationsAll(DeletionFlag.EXCLUDE_DELETED)) { + if (link.getRelationType().getName().equals(relationTypeName)) { + if (link.getAArtifactId() == artifactId) { + oppositeArtifacts.add(link.getArtifactB()); + } else { + oppositeArtifacts.add(link.getArtifactA()); + + } + } + } + return oppositeArtifacts; + } + + public long getArtifactId() { + return artifactId; + } + @Override public int hashCode() { final int prime = 31; @@ -75,11 +94,5 @@ public class ArtifactExplorerLinkNode { return true; } - public List<Artifact> getOppositeArtifacts() { - List<Artifact> oppositeArtifacts = new ArrayList<>(); - RelationTypeSide relationSide = - new RelationTypeSide(relationType, parentIsOnSideA ? RelationSide.SIDE_B : RelationSide.SIDE_A); - oppositeArtifacts.addAll(artifact.getRelatedArtifacts(relationSide, DeletionFlag.EXCLUDE_DELETED)); - return oppositeArtifacts; } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java index 545671dc4d9..0ff1fe3332a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java @@ -125,15 +125,15 @@ public final class WordTemplateFileDiffer { private void diff(List<Change> changes, Collection<Artifact> endArtifacts, String diffPrefix, TransactionDelta txDelta) { Collection<ArtifactDelta> artifactDeltas = new ArrayList<>(); - Set<Integer> addedIds = new HashSet<>(); - Set<Integer> changeIds = new HashSet<>(changes.size()); + Set<Long> addedIds = new HashSet<>(); + Set<Long> changeIds = new HashSet<>(changes.size()); for (Change change : changes) { changeIds.add(change.getArtId().getId().intValue()); } BranchId endBranch = txDelta.getEndTx().getBranch(); // loop through all artifacts that are on the IS branch for (Artifact art : endArtifacts) { - Integer artId = art.getArtId(); + Long artId = art.getArtId(); if (changeIds.contains(artId)) { // If there is a change on the IS branch Change newChange = findChange(artId, changes); @@ -161,7 +161,7 @@ public final class WordTemplateFileDiffer { } } - private Change findChange(Integer artId, List<Change> changes) { + private Change findChange(Long artId, List<Change> changes) { Change toReturn = null; for (Change change : changes) { if (change.getArtId().getId().intValue() == artId.intValue()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/AttributeLineElement.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/AttributeLineElement.java index 209bf0ad92f..22c38b06692 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/AttributeLineElement.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/AttributeLineElement.java @@ -105,4 +105,4 @@ public class AttributeLineElement implements IAdaptable { T object = (T) obj; return object; } -}
\ No newline at end of file +} diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java index 4bcf538cf50..de57264a480 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchLabelProvider.java @@ -199,10 +199,10 @@ public class XBranchLabelProvider extends XViewerLabelProvider { columnText = transaction.getComment(); } else if (cCol.equals(BranchXViewerFactory.associatedArtifact)) { try { - if (transaction.getCommit() == 0) { + if (transaction.getCommitArtId() == 0) { return ""; } - Artifact art = ArtifactQuery.getArtifactFromId(transaction.getCommit(), COMMON); + Artifact art = ArtifactQuery.getArtifactFromId(transaction.getCommitArtId(), COMMON); if (art != null) { columnText = art.getName(); } @@ -246,10 +246,10 @@ public class XBranchLabelProvider extends XViewerLabelProvider { } } else if (element instanceof TransactionRecord) { try { - if (((TransactionRecord) element).getCommit() == 0) { + if (((TransactionRecord) element).getCommitArtId() == 0) { return null; } - Artifact artifact = ArtifactQuery.getArtifactFromId(((TransactionRecord) element).getCommit(), COMMON); + Artifact artifact = ArtifactQuery.getArtifactFromId(((TransactionRecord) element).getCommitArtId(), COMMON); if (artifact != null) { return ArtifactImageManager.getImage(artifact); } diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java index a74e2610601..82fd448703c 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java @@ -93,7 +93,7 @@ public class ArtifactFactoryTest { types.add(CoreAttributeTypes.City); types.add(CoreAttributeTypes.Annotation); - when(artifactData.getLocalId()).thenReturn(45); + when(artifactData.getLocalId()).thenReturn(45L); when(artifactData.getGuid()).thenReturn(guid); when(artifactData.getType()).thenReturn(Artifact); when(artifactData.getVersion()).thenReturn(artifactVersion); @@ -102,7 +102,7 @@ public class ArtifactFactoryTest { when(attributeFactory.copyAttribute(any(), any(), any())).thenReturn(attribute); - when(otherArtifactData.getLocalId()).thenReturn(45); + when(otherArtifactData.getLocalId()).thenReturn(45L); when(otherArtifactData.getGuid()).thenReturn(guid); when(otherArtifactData.getType()).thenReturn(Artifact); when(otherArtifactData.getVersion()).thenReturn(artifactVersion); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/ArtifactTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/ArtifactTest.java index d7d63ef070f..46de8263d06 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/ArtifactTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/ArtifactTest.java @@ -103,7 +103,7 @@ public class ArtifactTest { when(artifactData.getGuid()).thenReturn(guid); when(artifactData.getVersion()).thenReturn(version); when(artifactData.getType()).thenReturn(artifactType); - when(artifactData.getLocalId()).thenReturn(0); + when(artifactData.getLocalId()).thenReturn(0L); when(deleted.getModificationType()).thenReturn(ModificationType.ARTIFACT_DELETED); when(deleted.isDeleted()).thenReturn(true); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactoryTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactoryTest.java index 8b17042c2eb..c66acd8b889 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactoryTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactoryTest.java @@ -116,7 +116,7 @@ public class AttributeFactoryTest { when(attributeData.getVersion()).thenReturn(attrVersionData); when(attrVersionData.isInStorage()).thenReturn(true); - when(attributeData.getLocalId()).thenReturn(12345); + when(attributeData.getLocalId()).thenReturn(12345L); when(dataFactory.introduce(COMMON, attributeData)).thenReturn(introducedAttributeData); when(introducedAttributeData.getType()).thenReturn(attributeType); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImplTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImplTest.java index 3be5b13200c..8da99a39810 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImplTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImplTest.java @@ -58,7 +58,7 @@ public class RelationNodeLoaderImplTest { private static final BranchId BRANCH = CoreBranches.COMMON; private static final TransactionId TRANSACTION_ID = TransactionId.valueOf(231214214); - private static final Collection<Integer> ids = Arrays.asList(4, 5, 6, 7); + private static final Collection<Long> ids = Arrays.asList(4L, 5L, 6L, 7L); private RelationNodeLoaderImpl Artifact; diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverTest.java index 4a12e4f02f5..f99681de895 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverTest.java @@ -72,7 +72,7 @@ public class RelationResolverTest { @Mock private Artifact node6; @Mock private ResultSet<Artifact> resultSet; - @Captor private ArgumentCaptor<Collection<Integer>> captor; + @Captor private ArgumentCaptor<Collection<Long>> captor; // @formatter:on private RelationResolver resolver; @@ -89,12 +89,12 @@ public class RelationResolverTest { String sessionId = GUID.create(); when(session.getGuid()).thenReturn(sessionId); - when(node1.getLocalId()).thenReturn(11); - when(node2.getLocalId()).thenReturn(22); - when(node3.getLocalId()).thenReturn(33); - when(node4.getLocalId()).thenReturn(44); - when(node5.getLocalId()).thenReturn(55); - when(node6.getLocalId()).thenReturn(66); + when(node1.getLocalId()).thenReturn(11L); + when(node2.getLocalId()).thenReturn(22L); + when(node3.getLocalId()).thenReturn(33L); + when(node4.getLocalId()).thenReturn(44L); + when(node5.getLocalId()).thenReturn(55L); + when(node6.getLocalId()).thenReturn(66L); when(relation1.getIdForSide(RelationSide.SIDE_A)).thenReturn(artifactId11); when(relation1.getIdForSide(RelationSide.SIDE_B)).thenReturn(artifactId22); @@ -108,7 +108,7 @@ public class RelationResolverTest { when(relation4.getIdForSide(RelationSide.SIDE_A)).thenReturn(artifactId11); when(relation4.getIdForSide(RelationSide.SIDE_B)).thenReturn(artifactId66); - when(loader.loadNodes(eq(session), eq(graphData), anyCollectionOf(Integer.class), eq(LoadLevel.ALL))).thenReturn( + when(loader.loadNodes(eq(session), eq(graphData), anyCollectionOf(Long.class), eq(LoadLevel.ALL))).thenReturn( resultSet); } @@ -121,7 +121,7 @@ public class RelationResolverTest { List<Artifact> arts = resolver.resolve(session, graphData, links, RelationSide.SIDE_A, RelationSide.SIDE_B); verify(loader).loadNodes(eq(session), eq(graphData), captor.capture(), eq(LoadLevel.ALL)); - assertCollection(captor.getValue(), 11, 22, 33, 44, 55, 66); + assertCollection(captor.getValue(), 11L, 22L, 33L, 44L, 55L, 66L); assertCollection(arts, node1, node2, node3, node4, node5, node6); } @@ -135,7 +135,7 @@ public class RelationResolverTest { verify(loader).loadNodes(eq(session), eq(graphData), captor.capture(), eq(LoadLevel.ALL)); - assertCollection(captor.getValue(), 11, 33, 55); + assertCollection(captor.getValue(), 11L, 33L, 55L); assertCollection(arts, node1, node3, node5); } @@ -149,7 +149,7 @@ public class RelationResolverTest { verify(loader).loadNodes(eq(session), eq(graphData), captor.capture(), eq(LoadLevel.ALL)); - assertCollection(captor.getValue(), 22, 44, 66); + assertCollection(captor.getValue(), 22L, 44L, 66L); assertCollection(arts, node2, node4, node6); } @@ -169,7 +169,7 @@ public class RelationResolverTest { verify(loader).loadNodes(eq(session), eq(graphData), captor.capture(), eq(LoadLevel.ALL)); - assertCollection(captor.getValue(), 22, 44, 66); + assertCollection(captor.getValue(), 22L, 44L, 66L); assertCollection(arts, node1, node2, node3, node4, node5, node6); } diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManagerTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManagerTest.java index ac83ff9eb3a..afd4c0e2d40 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManagerTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManagerTest.java @@ -410,9 +410,9 @@ public class TxDataManagerTest { when(proxyManager.asExternalArtifact(session, artifact2)).thenReturn(readable2); ArtifactData data = Mockito.mock(ArtifactData.class); - when(artifact1.getOrcsData()).thenReturn(data); when(artifact2.getOrcsData()).thenReturn(data); when(data.isExistingVersionUsed()).thenReturn(false); + when(artifact2.getUuid()).thenReturn(9837834587623L); ArtifactReadable actual = txDataManager.copyArtifact(txDataReal, COMMON, readable1); @@ -442,6 +442,7 @@ public class TxDataManagerTest { } //org.eclipse.osee.orcs.api.OrcsTransactionTest.testCopyArtifact() already provides a higher fidelity test of copy artifact + when(sourceArtifact.getLocalId()).thenReturn(234579082L); @Test public void testCopyArtifactId() { @@ -451,10 +452,10 @@ public class TxDataManagerTest { when(proxyManager.asExternalArtifact(session, artifact2)).thenReturn(readable2); ArtifactData data = Mockito.mock(ArtifactData.class); - when(data.getLocalId()).thenReturn(-1); - when(artifact1.getOrcsData()).thenReturn(data); + when(data.getLocalId()).thenReturn(-1L); when(artifact2.getOrcsData()).thenReturn(data); when(data.isExistingVersionUsed()).thenReturn(false); + when(artifact2.getUuid()).thenReturn(9837834587623L); ArtifactReadable actual = txDataManager.copyArtifact(txDataReal, COMMON, artifactId1); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataLoader.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataLoader.java index f640db4b03f..47a8cf544c2 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataLoader.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataLoader.java @@ -62,13 +62,13 @@ public interface DataLoader extends Loader { //////////// IDS - DataLoader withAttributeIds(int... attributeIds); + DataLoader withAttributeIds(long... attributeIds); - DataLoader withAttributeIds(Collection<Integer> attributeIds); + DataLoader withAttributeIds(Collection<Long> attributeIds); - DataLoader withRelationIds(int... relationIds); + DataLoader withRelationIds(long... relationIds); - DataLoader withRelationIds(Collection<Integer> relationIds); + DataLoader withRelationIds(Collection<Long> relationIds); ///////// TYPES diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataLoaderFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataLoaderFactory.java index 01cc8111b2b..39b2e0a7050 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataLoaderFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DataLoaderFactory.java @@ -14,7 +14,6 @@ package org.eclipse.osee.orcs.core.ds; import java.util.Collection; -import org.eclipse.osee.framework.core.data.ArtifactId; import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.executor.HasCancellation; import org.eclipse.osee.orcs.OrcsSession; @@ -30,10 +29,5 @@ public interface DataLoaderFactory { DataLoader newDataLoader(OrcsSession session, BranchId branch, Collection<ArtifactId> artifactIds); - DataLoader newDataLoaderFromIds(OrcsSession session, BranchId branch, Collection<Integer> artifactIds); - - DataLoader newDataLoaderFromGuids(OrcsSession session, BranchId branch, String... artifactGuids); - - DataLoader newDataLoaderFromGuids(OrcsSession session, BranchId branch, Collection<String> artifactGuids); }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/OrcsData.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/OrcsData.java index 56fc1bb96c9..d2297d85d7b 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/OrcsData.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/OrcsData.java @@ -20,7 +20,7 @@ import org.eclipse.osee.framework.jdk.core.type.Id; public interface OrcsData<T extends Id> extends HasVersion { - void setLocalId(Integer localId); + void setLocalId(Long localId); Integer getLocalId(); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/RelationData.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/RelationData.java index 6974ebbad96..b978612589c 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/RelationData.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/RelationData.java @@ -27,11 +27,11 @@ public interface RelationData extends OrcsData<RelationTypeToken>, RelationId { ArtifactId getArtifactIdB(); - int getArtIdA(); + Long getArtIdA(); void setArtIdA(ArtifactId artIdA); - int getArtIdB(); + Long getArtIdB(); void setArtIdB(ArtifactId artIdB); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/AttributeImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/AttributeImpl.java index 70d988fffae..3a7bf8dbfc0 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/AttributeImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/AttributeImpl.java @@ -263,7 +263,7 @@ public abstract class AttributeImpl<T> extends BaseId implements Comparable<Attr getOrcsData().getVersion().setGammaId(gammaId); } - public void internalSetAttributeId(int attrId) { + public void internalSetAttributeId(long attrId) { getOrcsData().setLocalId(attrId); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationNodeLoader.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationNodeLoader.java index 9b347e6b8f5..5100bba4335 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationNodeLoader.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationNodeLoader.java @@ -24,6 +24,6 @@ import org.eclipse.osee.orcs.core.internal.graph.GraphData; */ public interface RelationNodeLoader { - <T extends Artifact> Iterable<T> loadNodes(OrcsSession session, GraphData graph, Collection<Integer> ids, LoadLevel level); + <T extends Artifact> Iterable<T> loadNodes(OrcsSession session, GraphData graph, Collection<Long> ids, LoadLevel level); }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java index 02487cf002a..ddbec0f117a 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java @@ -525,7 +525,7 @@ public class RelationManagerImpl implements RelationManager { relation.setApplicabilityId(applicId); } - private Relation findRelationByLocalId(RelationNodeAdjacencies adjacencies, Integer id) { + private Relation findRelationByLocalId(RelationNodeAdjacencies adjacencies, Long id) { for (Relation rel : adjacencies.getAll()) { if (id.equals(rel.getOrcsData().getLocalId())) { return rel; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImpl.java index bb0f1c91e79..21d5b177006 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationNodeLoaderImpl.java @@ -39,7 +39,7 @@ public class RelationNodeLoaderImpl implements RelationNodeLoader { } @Override - public <T extends Artifact> Iterable<T> loadNodes(OrcsSession session, final GraphData graph, Collection<Integer> ids, LoadLevel level) { + public <T extends Artifact> Iterable<T> loadNodes(OrcsSession session, final GraphData graph, Collection<Long> ids, LoadLevel level) { GraphBuilder builder = graphBuilderFactory.createBuilderForGraph(graph); DataLoader loader = dataLoaderFactory.newDataLoaderFromIds(session, graph.getBranch(), ids); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverImpl.java index 2d1cbf3eb39..fb8fb1378ce 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverImpl.java @@ -49,12 +49,12 @@ public class RelationResolverImpl implements RelationResolver { public <T extends Artifact> List<T> resolve(OrcsSession session, GraphData graph, List<Relation> links, RelationSide... sides) { List<T> toReturn = Collections.emptyList(); if (!links.isEmpty()) { - Set<Integer> toLoad = null; - LinkedHashMap<Integer, T> items = new LinkedHashMap<>(); + Set<Long> toLoad = null; + LinkedHashMap<Long, T> items = new LinkedHashMap<>(); for (Relation relation : links) { for (RelationSide side : sides) { ArtifactId artifactId = relation.getIdForSide(side); - int id = artifactId.getIdIntValue(); + Long id = artifactId.getId(); Artifact node = graph.getNode(artifactId); if (node == null) { if (toLoad == null) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataLoaderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataLoaderImpl.java index 41d3c854417..cecd12557c7 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataLoaderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataLoaderImpl.java @@ -59,9 +59,9 @@ public class TxDataLoaderImpl implements TxDataLoader { } private DataLoader createLoader(OrcsSession session, BranchId branch, Collection<ArtifactId> artifactIds) { - Set<Integer> ids = new LinkedHashSet<>(); + Set<Long> ids = new LinkedHashSet<>(); for (ArtifactId artifactId : artifactIds) { - ids.add(artifactId.getUuid().intValue()); + ids.add(artifactId.getUuid()); } DataLoader loader = dataLoaderFactory.newDataLoaderFromIds(session, branch, ids); loader.withLoadLevel(LoadLevel.ALL); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/IdentityManager.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/IdentityManager.java index 14c784dbc24..a95717cf33a 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/IdentityManager.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/IdentityManager.java @@ -23,11 +23,11 @@ public interface IdentityManager { TransactionId getNextTransactionId(); - int getNextArtifactId(); + long getNextArtifactId(); - int getNextAttributeId(); + long getNextAttributeId(); - int getNextRelationId(); + long getNextRelationId(); GammaId getNextGammaId(); 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 4160b5de551..9f673254cdb 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 @@ -174,7 +174,7 @@ public class InvalidTxCurrentsAndModTypesCallable extends AbstractDatastoreTxCal TxCurrent txCurrent = TxCurrent.valueOf(stmt.getInt("tx_current")); 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), + Address address = new Address(type.isBaseline(), stmt.getLong("branch_id"), stmt.getLong(columnName), stmt.getLong("transaction_id"), GammaId.valueOf(stmt.getLong("gamma_id")), modType, appId, txCurrent); if (!address.isSimilar(previousAddress[0])) { 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 421b59d83f2..84953c070bc 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 @@ -85,7 +85,7 @@ public class V0_9_2TxsConsolidateParser extends SaxTransformer { int transactionId = Integer.parseInt(attributes.getValue("transaction_id")); TxCurrent txCurrent = TxCurrent.valueOf(Integer.parseInt(attributes.getValue("tx_current"))); - return new Address(false, targetBranchId, -1, transactionId, gammaId, modificationType, + return new Address(false, targetBranchId, -1L, transactionId, gammaId, modificationType, ApplicabilityId.valueOf(1L), txCurrent); } catch (OseeCoreException ex) { throw new XMLStreamException(ex); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImpl.java index 277f5a381f0..70b15577361 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImpl.java @@ -13,14 +13,11 @@ package org.eclipse.osee.orcs.db.internal.loader; -import java.util.ArrayList; -import java.util.Arrays; import java.util.Collection; import org.eclipse.osee.framework.core.data.ArtifactId; import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.executor.HasCancellation; 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; import org.eclipse.osee.jdbc.JdbcClient; import org.eclipse.osee.logger.Log; @@ -108,32 +105,10 @@ public class DataLoaderFactoryImpl implements DataLoaderFactory { @Override public DataLoader newDataLoader(OrcsSession session, BranchId branch, Collection<ArtifactId> ids) { - ArrayList<Integer> intIds = new ArrayList<>(); - for (ArtifactId id : ids) { - intIds.add(id.getId().intValue()); - } - return newDataLoaderFromIds(session, branch, intIds); - } - - @Override - public DataLoader newDataLoaderFromIds(OrcsSession session, BranchId branch, Collection<Integer> ids) { - Conditions.checkNotNull(branch, "branch"); Options options = OptionsUtil.createOptions(); return new DataLoaderImpl(logger, ids, options, session, branch, loader, joinFactory); } - @Override - public DataLoader newDataLoaderFromGuids(OrcsSession session, BranchId branch, String... guids) { - return newDataLoaderFromGuids(session, branch, Arrays.asList(guids)); - } - - @Override - public DataLoader newDataLoaderFromGuids(OrcsSession session, BranchId branch, Collection<String> guids) { - Conditions.checkNotNull(branch, "branch"); - Options options = OptionsUtil.createOptions(); - return new DataLoaderImpl(logger, options, session, branch, loader, guids, joinFactory); - } - @SuppressWarnings("unchecked") private <T> T adapt(Class<T> clazz, QueryContext queryContext) { T toReturn = null; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderImpl.java index e61be5632a8..3773f0f17ed 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderImpl.java @@ -39,15 +39,14 @@ import org.eclipse.osee.orcs.db.internal.loader.criteria.CriteriaOrcsLoad; import org.eclipse.osee.orcs.db.internal.loader.criteria.CriteriaRelation; import org.eclipse.osee.orcs.db.internal.loader.executors.AbstractLoadExecutor; import org.eclipse.osee.orcs.db.internal.loader.executors.LoadExecutor; -import org.eclipse.osee.orcs.db.internal.loader.executors.UuidsLoadExecutor; import org.eclipse.osee.orcs.db.internal.sql.join.SqlJoinFactory; public class DataLoaderImpl implements DataLoader { - private final Collection<Integer> attributeIds = new HashSet<>(); + private final Collection<Long> attributeIds = new HashSet<>(); private final Collection<AttributeTypeId> attributeTypes = new HashSet<>(); - private final Collection<Integer> relationIds = new HashSet<>(); + private final Collection<Long> relationIds = new HashSet<>(); private final Collection<RelationTypeToken> relationTypes = new HashSet<>(); private final Log logger; @@ -64,16 +63,11 @@ public class DataLoaderImpl implements DataLoader { this.loadExecutor = loadExecutor; } - public DataLoaderImpl(Log logger, Collection<Integer> artifactIds, Options options, OrcsSession session, BranchId branch, SqlObjectLoader sqlLoader, SqlJoinFactory joinFactory) { + public DataLoaderImpl(Log logger, Collection<ArtifactId> artifactIds, Options options, OrcsSession session, BranchId branch, SqlObjectLoader sqlLoader, SqlJoinFactory joinFactory) { this(logger, options, session, branch, sqlLoader, joinFactory); withArtifactIds(artifactIds); } - public DataLoaderImpl(Log logger, Options options, OrcsSession session, BranchId branch, SqlObjectLoader sqlLoader, Collection<String> artifactIds, SqlJoinFactory joinFactory) { - this(logger, options, session, branch, sqlLoader, joinFactory); - withArtifactGuids(artifactIds); - } - private DataLoaderImpl(Log logger, Options options, OrcsSession session, BranchId branch, SqlObjectLoader sqlLoader, SqlJoinFactory joinFactory) { this.logger = logger; this.options = options; @@ -187,18 +181,12 @@ public class DataLoaderImpl implements DataLoader { return this; } - private DataLoader withArtifactIds(Collection<Integer> artifactIds) { + private DataLoader withArtifactIds(Collection<ArtifactId> artifactIds) { loadExecutor = new LoadExecutor(sqlLoader, sqlLoader.getJdbcClient(), joinFactory, session, branchId, artifactIds); return this; } - private DataLoader withArtifactGuids(Collection<String> artifactGuids) { - loadExecutor = - new UuidsLoadExecutor(sqlLoader, sqlLoader.getJdbcClient(), joinFactory, session, branchId, artifactGuids); - return this; - } - @Override public DataLoader withAttributeTypes(AttributeTypeId... attributeType) { return withAttributeTypes(Arrays.asList(attributeType)); @@ -222,30 +210,30 @@ public class DataLoaderImpl implements DataLoader { } @Override - public DataLoader withAttributeIds(int... attributeIds) { + public DataLoader withAttributeIds(long... attributeIds) { return withAttributeIds(toCollection(attributeIds)); } @Override - public DataLoader withAttributeIds(Collection<Integer> attributeIds) { + public DataLoader withAttributeIds(Collection<Long> attributeIds) { this.attributeIds.addAll(attributeIds); return this; } @Override - public DataLoader withRelationIds(int... relationIds) { + public DataLoader withRelationIds(long... relationIds) { return withRelationIds(toCollection(relationIds)); } @Override - public DataLoader withRelationIds(Collection<Integer> relationIds) { + public DataLoader withRelationIds(Collection<Long> relationIds) { this.relationIds.addAll(relationIds); return this; } - private Collection<Integer> toCollection(int... ids) { - Set<Integer> toReturn = new HashSet<>(); - for (Integer id : ids) { + private Collection<Long> toCollection(long... ids) { + Set<Long> toReturn = new HashSet<>(); + for (Long id : ids) { toReturn.add(id); } return toReturn; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/criteria/CriteriaAttribute.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/criteria/CriteriaAttribute.java index b36c44e5831..b77dfc04af9 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/criteria/CriteriaAttribute.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/criteria/CriteriaAttribute.java @@ -22,17 +22,17 @@ import org.eclipse.osee.framework.core.data.AttributeTypeId; */ public class CriteriaAttribute extends CriteriaArtifact { - private final Collection<Integer> ids; + private final Collection<Long> ids; private final Collection<? extends AttributeTypeId> types; - public CriteriaAttribute(Collection<Integer> ids, Collection<? extends AttributeTypeId> types) { + public CriteriaAttribute(Collection<Long> ids, Collection<? extends AttributeTypeId> types) { super(); this.ids = ids; this.types = types; } - public Collection<Integer> getIds() { - return ids != null ? ids : Collections.<Integer> emptyList(); + public Collection<Long> getIds() { + return ids != null ? ids : Collections.<Long> emptyList(); } public Collection<? extends AttributeTypeId> getTypes() { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/criteria/CriteriaRelation.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/criteria/CriteriaRelation.java index 617ece010e2..c75ace0468a 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/criteria/CriteriaRelation.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/criteria/CriteriaRelation.java @@ -22,16 +22,16 @@ import org.eclipse.osee.framework.core.data.RelationTypeToken; */ public final class CriteriaRelation extends CriteriaArtifact { - private final Collection<Integer> ids; + private final Collection<Long> ids; private final Collection<? extends RelationTypeToken> types; - public CriteriaRelation(Collection<Integer> ids, Collection<? extends RelationTypeToken> types) { + public CriteriaRelation(Collection<Long> ids, Collection<RelationTypeToken> types) { this.ids = ids; this.types = types; } - public Collection<Integer> getIds() { - return ids != null ? ids : Collections.<Integer> emptyList(); + public Collection<Long> getIds() { + return ids != null ? ids : Collections.<Long> emptyList(); } public Collection<? extends RelationTypeToken> getTypes() { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/AttributeObjectFactory.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/AttributeObjectFactory.java index 43aff379a07..d74c7b6a798 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/AttributeObjectFactory.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/AttributeObjectFactory.java @@ -25,9 +25,9 @@ import org.eclipse.osee.orcs.core.ds.VersionData; */ public interface AttributeObjectFactory extends VersionObjectFactory { - <T> AttributeData<T> createAttributeData(VersionData version, Integer id, AttributeTypeGeneric<?> attributeType, ModificationType modType, ArtifactId artId, T value, String uri, ApplicabilityId applicId); + <T> AttributeData<T> createAttributeData(VersionData version, Long id, AttributeTypeGeneric<?> attributeType, ModificationType modType, ArtifactId artId, T value, String uri, ApplicabilityId applicId); - <T> AttributeData<T> createAttributeData(VersionData version, Integer id, AttributeTypeGeneric<?> attributeType, ModificationType modType, ArtifactId artId, ApplicabilityId applicId); + <T> AttributeData<T> createAttributeData(VersionData version, Long id, AttributeTypeGeneric<?> attributeType, ModificationType modType, ArtifactId artId, ApplicabilityId applicId); <T> AttributeData<T> createCopy(AttributeData<T> source); }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/RelationDataImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/RelationDataImpl.java index c1520512565..ebbcec139ef 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/RelationDataImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/data/RelationDataImpl.java @@ -54,17 +54,17 @@ public class RelationDataImpl extends OrcsVersionedObjectImpl<RelationTypeToken> this.rationale = rationale; } - public int getRelationId() { + public long getRelationId() { return getLocalId(); } @Override - public int getArtIdA() { + public Long getArtIdA() { return artIdA.getId().intValue(); } @Override - public int getArtIdB() { + public Long getArtIdB() { return artIdB.getId().intValue(); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/executors/LoadExecutor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/executors/LoadExecutor.java index d7d8dbf0faf..aba95b7dbea 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/executors/LoadExecutor.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/executors/LoadExecutor.java @@ -38,9 +38,9 @@ public class LoadExecutor extends AbstractLoadExecutor { private final SqlJoinFactory joinFactory; private final OrcsSession session; private final BranchId branch; - private final Collection<Integer> artifactIds; + private final Collection<ArtifactId> artifactIds; - public LoadExecutor(SqlObjectLoader loader, JdbcClient jdbcClient, SqlJoinFactory joinFactory, OrcsSession session, BranchId branch, Collection<Integer> artifactIds) { + public LoadExecutor(SqlObjectLoader loader, JdbcClient jdbcClient, SqlJoinFactory joinFactory, OrcsSession session, BranchId branch, Collection<ArtifactId> artifactIds) { super(loader, jdbcClient); this.joinFactory = joinFactory; this.session = session; @@ -54,8 +54,8 @@ public class LoadExecutor extends AbstractLoadExecutor { Id4JoinQuery join = joinFactory.createId4JoinQuery(); TransactionId transactionId = OptionsUtil.getFromTransaction(options); - for (Integer artId : artifactIds) { - join.add(branch, ArtifactId.valueOf(artId), transactionId); + for (ArtifactId artId : artifactIds) { + join.add(branch, artId, transactionId); } LoadSqlContext loadContext = new LoadSqlContext(session, options, branch); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/executors/UuidsLoadExecutor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/executors/UuidsLoadExecutor.java index 0d7bce80919..2523893d034 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/executors/UuidsLoadExecutor.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/executors/UuidsLoadExecutor.java @@ -15,6 +15,7 @@ package org.eclipse.osee.orcs.db.internal.loader.executors; import java.util.Collection; import org.eclipse.osee.framework.core.data.ArtifactId; +import org.eclipse.osee.framework.core.data.Branch; import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.data.TransactionId; import org.eclipse.osee.framework.core.executor.HasCancellation; @@ -27,7 +28,6 @@ import org.eclipse.osee.orcs.db.internal.loader.LoadSqlContext; import org.eclipse.osee.orcs.db.internal.loader.LoadUtil; import org.eclipse.osee.orcs.db.internal.loader.SqlObjectLoader; import org.eclipse.osee.orcs.db.internal.loader.criteria.CriteriaOrcsLoad; -import org.eclipse.osee.orcs.db.internal.sql.join.CharJoinQuery; import org.eclipse.osee.orcs.db.internal.sql.join.Id4JoinQuery; import org.eclipse.osee.orcs.db.internal.sql.join.SqlJoinFactory; @@ -36,20 +36,17 @@ import org.eclipse.osee.orcs.db.internal.sql.join.SqlJoinFactory; */ public class UuidsLoadExecutor extends AbstractLoadExecutor { - private static final String GUIDS_TO_IDS = - "SELECT art.art_id FROM osee_join_char_id jid, osee_artifact art WHERE jid.query_id = ? AND jid.id = art.guid"; - private final SqlJoinFactory joinFactory; private final OrcsSession session; private final BranchId branch; - private final Collection<String> artifactIds; + private final Collection<Long> artifactIds; - public UuidsLoadExecutor(SqlObjectLoader loader, JdbcClient jdbcClient, SqlJoinFactory joinFactory, OrcsSession session, BranchId branch, Collection<String> artifactIds) { + public UuidsLoadExecutor(SqlObjectLoader loader, JdbcClient jdbcClient, SqlJoinFactory joinFactory, OrcsSession session, Branch branch, Collection<Long> uuids) { super(loader, jdbcClient); this.joinFactory = joinFactory; this.session = session; this.branch = branch; - this.artifactIds = artifactIds; + this.artifactIds = uuids; } @Override @@ -64,17 +61,12 @@ public class UuidsLoadExecutor extends AbstractLoadExecutor { } private Id4JoinQuery createIdJoin(JdbcClient jdbcClient, Options options) { - Id4JoinQuery toReturn = joinFactory.createId4JoinQuery(); - - try (CharJoinQuery guidJoin = joinFactory.createCharJoinQuery()) { - guidJoin.addAndStore(artifactIds); - TransactionId transactionId = OptionsUtil.getFromTransaction(options); + Id4JoinQuery id4Join = joinFactory.createId4JoinQuery(); + TransactionId transactionId = OptionsUtil.getFromTransaction(options); - getJdbcClient().runQuery(stmt -> { - Integer artId = stmt.getInt("art_id"); - toReturn.add(branch, ArtifactId.valueOf(artId), transactionId); - }, artifactIds.size(), GUIDS_TO_IDS, guidJoin.getQueryId()); + for (long artId : artifactIds) { + id4Join.add(branch, ArtifactId.valueOf(artId), transactionId); } - return toReturn; + return id4Join; } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/AttributeSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/AttributeSqlHandler.java index dc3c689f4f5..2544fb69d43 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/AttributeSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/AttributeSqlHandler.java @@ -79,7 +79,7 @@ public class AttributeSqlHandler extends SqlHandler<CriteriaAttribute> { writer.write(".query_id = ?"); writer.addParameter(criteria.getQueryId()); - Collection<Integer> ids = criteria.getIds(); + Collection<Long> ids = criteria.getIds(); if (!ids.isEmpty()) { writer.write(" AND "); if (ids.size() > 1) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/RelationSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/RelationSqlHandler.java index 0fac5438e24..f626de27830 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/RelationSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/RelationSqlHandler.java @@ -89,7 +89,7 @@ public class RelationSqlHandler extends SqlHandler<CriteriaRelation> { writer.write(".query_id = ?"); writer.addParameter(criteria.getQueryId()); - Collection<Integer> ids = criteria.getIds(); + Collection<Long> ids = criteria.getIds(); if (!ids.isEmpty()) { writer.write(" AND "); if (ids.size() > 1) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/AbstractLoadProcessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/AbstractLoadProcessor.java index 5854c7afbcb..af9f7defac6 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/AbstractLoadProcessor.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/AbstractLoadProcessor.java @@ -28,6 +28,9 @@ public abstract class AbstractLoadProcessor<H> { rowCount++; onRow(handler, chStmt, options, conditions); } + if (rowCount == 0) { + System.out.println(""); + } onEnd(handler, options, conditions, rowCount); return rowCount; } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/ArtifactLoadProcessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/ArtifactLoadProcessor.java index e7ae392a340..7cd2d0a0f69 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/ArtifactLoadProcessor.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/ArtifactLoadProcessor.java @@ -38,7 +38,7 @@ public class ArtifactLoadProcessor extends LoadProcessor<ArtifactData, ArtifactO protected ArtifactData createData(Object conditions, ArtifactObjectFactory factory, JdbcStatement chStmt, Options options) { ArtifactData toReturn = null; - int artifactId = chStmt.getInt("id2"); + Long artifactId = chStmt.getLong("id2"); BranchId branch = BranchId.create(chStmt.getLong("branch_id"), OptionsUtil.getFromBranchView(options)); CreateConditions onCreate = asConditions(conditions); @@ -77,14 +77,14 @@ public class ArtifactLoadProcessor extends LoadProcessor<ArtifactData, ArtifactO } private static final class CreateConditions { - int previousArtId = -1; + Long previousArtId = -1L; BranchId previousBranchId = BranchId.SENTINEL; boolean isSame(BranchId branch, int artifactId) { - return previousBranchId.equals(branch) && previousArtId == artifactId; + return previousBranchId.equals(branch) && previousArtId.equals(artifactId); } - void saveConditions(BranchId branch, int artifactId) { + void saveConditions(BranchId branch, Long artifactId) { previousBranchId = branch; previousArtId = artifactId; } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/AttributeLoadProcessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/AttributeLoadProcessor.java index ddb7d61e665..d3a80f9addc 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/AttributeLoadProcessor.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/AttributeLoadProcessor.java @@ -49,7 +49,7 @@ public class AttributeLoadProcessor extends LoadProcessor<AttributeData, Attribu BranchId branch = BranchId.create(chStmt.getLong("branch_id"), OptionsUtil.getFromBranchView(options)); ArtifactId artId = ArtifactId.valueOf(chStmt.getLong("id2")); - int attrId = chStmt.getInt("attr_id"); + long attrId = chStmt.getLong("attr_id"); GammaId gammaId = GammaId.valueOf(chStmt.getLong("gamma_id")); ModificationType modType = ModificationType.valueOf(chStmt.getInt("mod_type")); ApplicabilityId applicId = ApplicabilityId.valueOf(chStmt.getLong("app_id")); @@ -96,7 +96,7 @@ public class AttributeLoadProcessor extends LoadProcessor<AttributeData, Attribu private static final class CreateConditions { ArtifactId previousArtId = ArtifactId.SENTINEL; BranchId previousBranchId = BranchId.SENTINEL; - int previousAttrId = -1; + long previousAttrId = -1; GammaId previousGammaId = GammaId.SENTINEL; ModificationType previousModType = null; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryFilterFactoryImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryFilterFactoryImpl.java index 5304f1329be..f61c6322245 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryFilterFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryFilterFactoryImpl.java @@ -144,7 +144,7 @@ public class QueryFilterFactoryImpl implements QueryFilterFactory { public void run() { try { boolean isEndOfQueue = false; - Map<Integer, CriteriaMatchTracker> artIdToCriteriaTracker = Maps.newHashMap(); + Map<Long, CriteriaMatchTracker> artIdToCriteriaTracker = Maps.newHashMap(); while (!isEndOfQueue) { Set<AttributeData> toProcess = new HashSet<>(); AttributeData entry = dataToProcess.take(); @@ -165,7 +165,7 @@ public class QueryFilterFactoryImpl implements QueryFilterFactory { } } } - for (Entry<Integer, CriteriaMatchTracker> e : artIdToCriteriaTracker.entrySet()) { + for (Entry<Long, CriteriaMatchTracker> e : artIdToCriteriaTracker.entrySet()) { // matched all criteria CriteriaMatchTracker tracker = e.getValue(); tracker.finish(handler); @@ -228,7 +228,7 @@ public class QueryFilterFactoryImpl implements QueryFilterFactory { private final Consumer consumer; - private final Set<Integer> acceptedArtIds = new ConcurrentSkipListSet<>(); + private final Set<Long> acceptedArtIds = new ConcurrentSkipListSet<>(); public AttributeDataProducer(LoadDataBuffer buffer, LoadDataHandler handler, Consumer consumer) { super(handler, buffer); @@ -261,7 +261,7 @@ public class QueryFilterFactoryImpl implements QueryFilterFactory { super.onData(data, match); } - private void forwardArtifacts(int artifactId) { + private void forwardArtifacts(long artifactId) { LoadDataBuffer buffer = getBuffer(); LoadDataHandler handler = getHandler(); if (handler != null) { @@ -288,7 +288,7 @@ public class QueryFilterFactoryImpl implements QueryFilterFactory { // Ensure all data required by the artifact is forwarded to the handler // This needs to be done in order to avoid missing relation data // coming in after the artifact data has been forwarded. - for (int artifactId : acceptedArtIds) { + for (long artifactId : acceptedArtIds) { forwardArtifacts(artifactId); } } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/LoadDataBuffer.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/LoadDataBuffer.java index 77f35a98d71..21a7b9f721b 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/LoadDataBuffer.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/LoadDataBuffer.java @@ -31,9 +31,9 @@ import org.eclipse.osee.orcs.core.ds.RelationData; */ public class LoadDataBuffer { - private final Map<Integer, ArtifactData> artifacts; - private final Multimap<Integer, AttributeData<?>> attributes; - private final Multimap<Integer, RelationData> relations; + private final Map<Long, ArtifactData> artifacts; + private final Multimap<Long, AttributeData<?>> attributes; + private final Multimap<Long, RelationData> relations; public LoadDataBuffer(int initialSize) { artifacts = new LinkedHashMap<>(initialSize); @@ -66,7 +66,7 @@ public class LoadDataBuffer { } } - public ArtifactData removeArtifactByArtId(int artifactId) { + public ArtifactData removeArtifactByArtId(long artifactId) { ArtifactData art = null; synchronized (artifacts) { art = artifacts.remove(artifactId); @@ -74,7 +74,7 @@ public class LoadDataBuffer { return art; } - public Iterable<AttributeData<?>> removeAttributesByArtId(int artifactId) { + public Iterable<AttributeData<?>> removeAttributesByArtId(long artifactId) { Collection<AttributeData<?>> data = null; synchronized (attributes) { data = attributes.removeAll(artifactId); @@ -82,7 +82,7 @@ public class LoadDataBuffer { return data; } - public Iterable<RelationData> removeRelationsByArtId(int artifactId) { + public Iterable<RelationData> removeRelationsByArtId(long artifactId) { Collection<RelationData> rels = null; synchronized (relations) { rels = relations.removeAll(artifactId); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/ComodificationCheck.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/ComodificationCheck.java index e7f2efb737a..09893df4764 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/ComodificationCheck.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/ComodificationCheck.java @@ -62,20 +62,20 @@ public class ComodificationCheck implements TransactionProcessor { private final class OnLoadChecker extends LoadDataHandlerAdapter implements OrcsVisitor { - private final Map<Integer, ArtifactData> artifacts = new HashMap<>(); - private final Map<Integer, AttributeData> attributes = new HashMap<>(); - private final Map<Integer, RelationData> relations = new HashMap<>(); + private final Map<Long, ArtifactData> artifacts = new HashMap<>(); + private final Map<Long, AttributeData> attributes = new HashMap<>(); + private final Map<Long, RelationData> relations = new HashMap<>(); private final Map<Integer, TupleData> tuples = new HashMap<>(); - public Collection<Integer> getArtifactIds() { + public Collection<Long> getArtifactIds() { return artifacts.keySet(); } - public Collection<Integer> getAttributeIds() { + public Collection<Long> getAttributeIds() { return attributes.keySet(); } - public Collection<Integer> getRelationIds() { + public Collection<Long> getRelationIds() { return relations.keySet(); } @@ -91,7 +91,7 @@ public class ComodificationCheck implements TransactionProcessor { @Override public void visit(ArtifactData data) { if (data.getVersion().isInStorage()) { - artifacts.put(data.getLocalId(), data); + artifacts.put((long) data.getLocalId(), data); } } 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 f0e6c017397..272c716589d 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 @@ -145,7 +145,7 @@ public class TxSqlBuilderImpl implements OrcsVisitor, TxSqlBuilder { binaryStores.add(dataProxy); if (RelationalConstants.DEFAULT_ITEM_ID == data.getLocalId()) { - int id = idManager.getNextAttributeId(); + long id = idManager.getNextAttributeId(); data.setLocalId(id); } addRow(SqlOrderEnum.ATTRIBUTES, data.getLocalId(), data.getType(), data.getVersion().getGammaId(), @@ -233,7 +233,7 @@ public class TxSqlBuilderImpl implements OrcsVisitor, TxSqlBuilder { if (!reuseGamma && !data.getDirtyState().isApplicOnly()) { updateGamma(data); if (RelationalConstants.DEFAULT_ITEM_ID == data.getLocalId()) { - int id = idManager.getNextRelationId(); + long id = idManager.getNextRelationId(); data.setLocalId(id); } addRow(SqlOrderEnum.RELATIONS, data.getLocalId(), data.getType(), data.getVersion().getGammaId(), 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 f45a1d9fed7..74d9da10073 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 @@ -24,7 +24,7 @@ import org.eclipse.osee.framework.core.enums.TxCurrent; */ public final class Address implements Comparable<Address> { private final BranchId branch; - private final int itemId; + private final Long itemId; private final long transactionId; private final GammaId gammaId; private ModificationType modType; @@ -34,7 +34,7 @@ public final class Address implements Comparable<Address> { private TxCurrent correctedTxCurrent; private boolean purge; - public Address(boolean isBaseline, Long branchId, int itemId, long transactionId, GammaId gammaId, ModificationType modType, ApplicabilityId appId, TxCurrent txCurrent) { + public Address(boolean isBaseline, Long branchId, Long itemId, long transactionId, GammaId gammaId, ModificationType modType, ApplicabilityId appId, TxCurrent txCurrent) { super(); this.branch = BranchId.valueOf(branchId); this.itemId = itemId; @@ -107,7 +107,7 @@ public final class Address implements Comparable<Address> { return branch; } - public int getItemId() { + public Long getItemId() { return itemId; } 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 0d0f4e93e41..133ef458ea2 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 @@ -39,18 +39,18 @@ public class IdentityManagerImpl implements IdentityManager { } @Override - public int getNextArtifactId() { - return (int) client.getNextSequence(OseeData.ART_ID_SEQ, true); + public long getNextArtifactId() { + return client.getNextSequence(OseeData.ART_ID_SEQ, true); } @Override - public int getNextAttributeId() { - return (int) client.getNextSequence(OseeData.ATTR_ID_SEQ, true); + public long getNextAttributeId() { + return client.getNextSequence(OseeData.ATTR_ID_SEQ, true); } @Override - public int getNextRelationId() { - return (int) client.getNextSequence(OseeData.REL_LINK_ID_SEQ, true); + public long getNextRelationId() { + return client.getNextSequence(OseeData.REL_LINK_ID_SEQ, true); } @Override diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/QueryBuilder.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/QueryBuilder.java index ed4c19150df..9882d1503f6 100644 --- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/QueryBuilder.java +++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/QueryBuilder.java @@ -192,4 +192,5 @@ public interface QueryBuilder { List<ArtifactId> getIds(); QueryBuilder getQueryBuilder(); + } |