Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2017-08-24 17:55:56 -0400
committerRyan D. Brooks2017-08-29 15:58:27 -0400
commitf5b562cfcc469ea61f060b3ada7b8640c48e69b4 (patch)
treec0177e7487c926bbe2e28e02963591bb5c3afa76
parent1066b7ee8e3c6d4377c1d7f3c510f0239afd88f8 (diff)
downloadorg.eclipse.osee-f5b562cfcc469ea61f060b3ada7b8640c48e69b4.tar.gz
org.eclipse.osee-f5b562cfcc469ea61f060b3ada7b8640c48e69b4.tar.xz
org.eclipse.osee-f5b562cfcc469ea61f060b3ada7b8640c48e69b4.zip
refactor: Extend TxChange from Id
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ConflictDeletionTest.java12
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/TxChange.java74
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/sql/OseeSql.java12
-rw-r--r--plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/data/ArtifactUtil.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java14
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/BaseTransactionData.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java2
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/ItemsDeletedWithNoOtherModification.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java8
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderTest.java12
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/UpdatePreviousTxCurrent.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java8
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateRelationsDatabaseTxCallable.java8
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InvalidTxCurrentsAndModTypesCallable.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/OrcsTypeLoaderCallable.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeTransactionTxCallable.java7
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java12
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/console/FixDuplicateAttributesCommand.java3
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2TxsConsolidateParser.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/LoadSqlWriter.java10
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/DynamicLoadProcessor.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ApplicabilityDsQueryImpl.java5
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ArtifactQuerySqlWriter.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ObjectQuerySqlWriter.java8
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriter.java8
-rw-r--r--plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderImpl.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/TypesEndpointImpl.java4
33 files changed, 133 insertions, 126 deletions
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 37572fde3a..3f838fa851 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
@@ -158,7 +158,7 @@ public class ConflictDeletionTest {
if (DEBUG) {
dumpAttribute(attribute);
} else {
- checkAttribute(artifact, attribute, TxChange.ARTIFACT_DELETED.getValue());
+ checkAttribute(artifact, attribute, TxChange.ARTIFACT_DELETED);
}
}
//Check that relations are deleted.
@@ -166,7 +166,7 @@ public class ConflictDeletionTest {
if (DEBUG) {
dumpRelation(relation, artifact);
} else {
- checkRelation(artifact, relation, TxChange.ARTIFACT_DELETED.getValue());
+ checkRelation(artifact, relation, TxChange.ARTIFACT_DELETED);
}
}
}
@@ -286,8 +286,8 @@ public class ConflictDeletionTest {
assertTrue("Attribute " + attribute.getId() + " should be deleted but isn't", attribute.isDeleted());
assertTrue("Relation " + relation.getId() + " should be deleted but isn't", relation.isDeleted());
- checkAttribute(artifactForDeletionCheck, attribute, TxChange.DELETED.getValue());
- checkRelation(artifactForDeletionCheck, relation, TxChange.DELETED.getValue());
+ checkAttribute(artifactForDeletionCheck, attribute, TxChange.DELETED);
+ checkRelation(artifactForDeletionCheck, relation, TxChange.DELETED);
}
}
@@ -307,7 +307,7 @@ public class ConflictDeletionTest {
}
}
- private void checkAttribute(Artifact artifact, Attribute<?> attribute, int value) throws OseeCoreException {
+ private void checkAttribute(Artifact artifact, Attribute<?> attribute, TxChange value) throws OseeCoreException {
JdbcStatement chStmt = ConnectionHandler.getStatement();
try {
chStmt.runPreparedQuery(CHECK_FOR_ZERO_TX_CURRENT_ATTRIBUTE, artifact.getBranch(), artifact.getTransaction(),
@@ -336,7 +336,7 @@ public class ConflictDeletionTest {
}
}
- public void checkRelation(Artifact artifact, RelationLink relation, int value) throws OseeCoreException {
+ public void checkRelation(Artifact artifact, RelationLink relation, TxChange value) throws OseeCoreException {
JdbcStatement chStmt = ConnectionHandler.getStatement();
assertTrue(
"Relation should be deleted between Parent: " + relation.getArtifactIdA() + " and child " + relation.getArtifactIdB(),
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/TxChange.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/TxChange.java
index 202e7791e2..f16fceeda2 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/TxChange.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/TxChange.java
@@ -11,46 +11,58 @@
package org.eclipse.osee.framework.core.enums;
-import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+import org.eclipse.osee.framework.jdk.core.type.BaseId;
+import org.eclipse.osee.framework.jdk.core.type.Id;
+import org.eclipse.osee.framework.jdk.core.type.IdSerializer;
/**
* @author Ryan D. Brooks
*/
-public enum TxChange {
- NOT_CURRENT(0),
- CURRENT(1),
- DELETED(2),
- ARTIFACT_DELETED(3);
+@JsonSerialize(using = IdSerializer.class)
+public interface TxChange extends Id {
- private int value;
+ public static final TxChange SENTINEL = internalCreate(Id.SENTINEL);
+ public static final TxChange NOT_CURRENT = internalCreate(0L);
+ public static final TxChange CURRENT = internalCreate(1L);
+ public static final TxChange DELETED = internalCreate(2L);
+ public static final TxChange ARTIFACT_DELETED = internalCreate(3L);
- private TxChange(int value) {
- this.value = value;
- }
-
- public int getValue() {
- return value;
- }
-
- public boolean isDeleted() {
- return this == DELETED || this == ARTIFACT_DELETED;
+ public static TxChange valueOf(int id) {
+ switch (id) {
+ case 0:
+ return NOT_CURRENT;
+ case 1:
+ return CURRENT;
+ case 2:
+ return DELETED;
+ case 3:
+ return ARTIFACT_DELETED;
+ default:
+ return SENTINEL;
+ }
}
- public boolean isCurrent() {
- return this != TxChange.NOT_CURRENT;
- }
+ /**
+ * This method is only public because all methods in an interface are and it should never be called outside of this
+ * interface
+ */
+ public static TxChange internalCreate(Long id) {
+ final class TxChangeImpl extends BaseId implements TxChange, Comparable<TxChange> {
+ public TxChangeImpl(Long id) {
+ super(id);
+ }
- public static TxChange getChangeType(int value) throws OseeArgumentException {
- for (TxChange change : values()) {
- if (change.getValue() == value) {
- return change;
+ @Override
+ public int compareTo(TxChange o) {
+ return getId().compareTo(o.getId());
}
}
- throw new OseeArgumentException("[%s] does not correspond to any defined ModificationType enumerations", value);
+ return new TxChangeImpl(id);
}
public static TxChange getCurrent(ModificationType type) {
- TxChange txChange = null;
+ TxChange txChange;
if (type == ModificationType.DELETED) {
txChange = TxChange.DELETED;
@@ -61,4 +73,12 @@ public enum TxChange {
}
return txChange;
}
-}
+
+ default boolean isDeleted() {
+ return this == DELETED || this == ARTIFACT_DELETED;
+ }
+
+ default boolean isCurrent() {
+ return this != TxChange.NOT_CURRENT;
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/sql/OseeSql.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/sql/OseeSql.java
index 97f2b52210..943d4f34dd 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/sql/OseeSql.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/sql/OseeSql.java
@@ -21,9 +21,9 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
*/
public enum OseeSql {
- TX_GET_PREVIOUS_TX_NOT_CURRENT_ARTIFACTS("SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_artifact art, osee_txs txs WHERE art.art_id = ? AND art.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT.getValue()),
- TX_GET_PREVIOUS_TX_NOT_CURRENT_ATTRIBUTES("SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_attribute atr, osee_txs txs WHERE atr.attr_id = ? AND atr.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT.getValue()),
- TX_GET_PREVIOUS_TX_NOT_CURRENT_RELATIONS("SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_relation_link rel, osee_txs txs WHERE rel.rel_link_id = ? AND rel.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT.getValue()),
+ TX_GET_PREVIOUS_TX_NOT_CURRENT_ARTIFACTS("SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_artifact art, osee_txs txs WHERE art.art_id = ? AND art.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT),
+ TX_GET_PREVIOUS_TX_NOT_CURRENT_ATTRIBUTES("SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_attribute atr, osee_txs txs WHERE atr.attr_id = ? AND atr.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT),
+ TX_GET_PREVIOUS_TX_NOT_CURRENT_RELATIONS("SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_relation_link rel, osee_txs txs WHERE rel.rel_link_id = ? AND rel.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT),
MERGE_GET_ARTIFACTS_FOR_BRANCH("SELECT art.art_id FROM osee_txs txs, osee_artifact art WHERE txs.branch_id = ? and txs.gamma_id = art.gamma_id"),
MERGE_GET_ATTRIBUTES_FOR_BRANCH("SELECT atr.art_id, atr.attr_id FROM osee_txs txs, osee_attribute atr WHERE txs.branch_id = ? and txs.gamma_id = atr.gamma_id"),
@@ -47,7 +47,7 @@ public enum OseeSql {
LOAD_CURRENT_ARCHIVED_ATTRIBUTES_WITH_DELETED(Strings.SELECT_CURRENT_ARCHIVED_ATTRIBUTES_PREFIX + "IN (1, 3) order by al1.id2, al1.id1, att1.attr_id, txs.transaction_id desc", Strings.HintsOrdered),
LOAD_ALL_CURRENT_ARCHIVED_ATTRIBUTES(Strings.SELECT_CURRENT_ARCHIVED_ATTRIBUTES_PREFIX + "IN (1, 2, 3) order by al1.id2, al1.id1, att1.attr_id, txs.transaction_id desc", Strings.HintsOrdered),
- LOAD_RELATIONS("SELECT%s txs.mod_type, rel_link_id, a_art_id, b_art_id, rel_link_type_id, rel.gamma_id, rationale, txs.branch_id, aj.id4, txs.app_id FROM osee_join_id4 aj, osee_relation_link rel, osee_txs txs WHERE aj.query_id = ? AND (aj.id2 = rel.a_art_id OR aj.id2 = rel.b_art_id) AND rel.gamma_id = txs.gamma_id AND txs.tx_current = " + TxChange.CURRENT.getValue() + " AND aj.id1 = txs.branch_id", Strings.HintsOrdered),
+ LOAD_RELATIONS("SELECT%s txs.mod_type, rel_link_id, a_art_id, b_art_id, rel_link_type_id, rel.gamma_id, rationale, txs.branch_id, aj.id4, txs.app_id FROM osee_join_id4 aj, osee_relation_link rel, osee_txs txs WHERE aj.query_id = ? AND (aj.id2 = rel.a_art_id OR aj.id2 = rel.b_art_id) AND rel.gamma_id = txs.gamma_id AND txs.tx_current = " + TxChange.CURRENT + " AND aj.id1 = txs.branch_id", Strings.HintsOrdered),
LOAD_CURRENT_ARTIFACTS(Strings.SELECT_CURRENT_ARTIFACTS_PREFIX + "= 1", Strings.HintsOrdered),
LOAD_CURRENT_ARTIFACTS_WITH_DELETED(Strings.SELECT_CURRENT_ARTIFACTS_PREFIX + "in (1, 2)", Strings.HintsOrdered),
LOAD_CURRENT_ARCHIVED_ARTIFACTS(Strings.SELECT_CURRENT_ARCHIVED_ARTIFACTS_PREFIX + "= 1", Strings.HintsOrdered),
@@ -60,10 +60,10 @@ public enum OseeSql {
CHANGE_BRANCH_ATTRIBUTE_WAS("SELECT%s attxs1.attr_id, attxs1.value as was_value, txs1.mod_type FROM osee_join_id4 ja1, osee_attribute attxs1, osee_txs txs1, WHERE txs1.branch_id = ? AND txs1.tx_type = 1 AND attxs1.gamma_id = txs1.gamma_id AND attxs1.art_id = ja1.id2 AND txs1.branch_id = ja1.id1 AND ja1.query_id = ?", Strings.HintsOrdered),
CHANGE_TX_ATTRIBUTE_WAS("SELECT%s att1.attr_id, att1.value as was_value, txs1.mod_type FROM osee_join_id4 al1, osee_attribute att1, osee_txs txs1 WHERE al1.id2 = att1.art_id AND att1.gamma_id = txs1.gamma_id AND txs1.transaction_id < ? AND al1.query_id = ? AND txs1.branch_id = al1.id1 order by txs1.branch_id, att1.art_id, att1.attr_id, txs1.transaction_id desc", Strings.HintsOrdered),
- CHANGE_BRANCH_ATTRIBUTE_IS("SELECT%s art1.art_type_id, attr1.art_id, attr1.attr_id, attr1.gamma_id, attr1.attr_type_id, attr1.value as is_value, txs1.mod_type FROM osee_txs txs1, osee_attribute attr1, osee_artifact art1 WHERE txs1.branch_id = ? AND txs1.transaction_id <> = ? AND txs1.tx_current in (" + TxChange.DELETED.getValue() + ", " + TxChange.CURRENT.getValue() + ", " + TxChange.ARTIFACT_DELETED.getValue() + ") AND art1.art_id = attr1.art_id AND attr1.gamma_id = txs1.gamma_id", Strings.HintsOrdered),
+ CHANGE_BRANCH_ATTRIBUTE_IS("SELECT%s art1.art_type_id, attr1.art_id, attr1.attr_id, attr1.gamma_id, attr1.attr_type_id, attr1.value as is_value, txs1.mod_type FROM osee_txs txs1, osee_attribute attr1, osee_artifact art1 WHERE txs1.branch_id = ? AND txs1.transaction_id <> = ? AND txs1.tx_current in (" + TxChange.DELETED + ", " + TxChange.CURRENT + ", " + TxChange.ARTIFACT_DELETED + ") AND art1.art_id = attr1.art_id AND attr1.gamma_id = txs1.gamma_id", Strings.HintsOrdered),
CHANGE_TX_ATTRIBUTE_IS("SELECT art.art_type_id, att.art_id, att.attr_id, att.gamma_id, att.attr_type_id, att.value as is_value, txs.mod_type FROM osee_txs txs, osee_attribute att, osee_artifact art WHERE txs.branch_id = ? and txs.transaction_id = ? AND txs.gamma_id = att.gamma_id AND att.art_id = art.art_id"),
CHANGE_TX_ATTRIBUTE_IS_FOR_SPECIFIC_ARTIFACT(CHANGE_TX_ATTRIBUTE_IS.sql + " and att.art_id =?"),
- CHANGE_BRANCH_RELATION("SELECT%s txs1.mod_type, rel1.gamma_id, rel1.b_art_id, rel1.a_art_id, rel1.rationale, rel1.rel_link_id, rel1.rel_link_type_id, art.art_type_id from osee_txs txs1, osee_relation_link rel1, osee_artifact art where txs1.branch_id = ? AND txs1.transaction_id <> ? AND txs1.tx_current in (" + TxChange.DELETED.getValue() + ", " + TxChange.CURRENT.getValue() + ", " + TxChange.ARTIFACT_DELETED.getValue() + ") AND txs1.gamma_id = rel1.gamma_id AND rel1.a_art_id = art.art_id", Strings.HintsOrdered),
+ CHANGE_BRANCH_RELATION("SELECT%s txs1.mod_type, rel1.gamma_id, rel1.b_art_id, rel1.a_art_id, rel1.rationale, rel1.rel_link_id, rel1.rel_link_type_id, art.art_type_id from osee_txs txs1, osee_relation_link rel1, osee_artifact art where txs1.branch_id = ? AND txs1.transaction_id <> ? AND txs1.tx_current in (" + TxChange.DELETED + ", " + TxChange.CURRENT + ", " + TxChange.ARTIFACT_DELETED + ") AND txs1.gamma_id = rel1.gamma_id AND rel1.a_art_id = art.art_id", Strings.HintsOrdered),
CHANGE_TX_RELATION("SELECT txs.mod_type, rel.gamma_id, rel.b_art_id, rel.a_art_id, rel.rationale, rel.rel_link_id, rel.rel_link_type_id, art.art_type_id from osee_txs txs, osee_relation_link rel, osee_artifact art where txs.branch_id = ? AND txs.transaction_id = ? AND txs.gamma_id = rel.gamma_id AND rel.a_art_id = art.art_id"),
CHANGE_TX_RELATION_FOR_SPECIFIC_ARTIFACT(CHANGE_TX_RELATION.sql + " and (rel.a_art_id = ? or rel.b_art_id = ?)"),
CHANGE_BRANCH_ARTIFACT("select%s art1.art_id, art1.art_type_id, art1.gamma_id, txs1.mod_type FROM osee_txs txs1, osee_artifact art1 WHERE txs1.branch_id = ? AND txs1.transaction_id <> ? AND txs1.gamma_id = art1.gamma_id AND txs1.mod_type in (" + ModificationType.DELETED.getValue() + ", " + ModificationType.NEW.getValue() + ", " + ModificationType.INTRODUCED.getValue() + ") ", Strings.HintsOrdered),
diff --git a/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/data/ArtifactUtil.java b/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/data/ArtifactUtil.java
index 6e3f7c1a2b..324d852856 100644
--- a/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/data/ArtifactUtil.java
+++ b/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/data/ArtifactUtil.java
@@ -24,7 +24,7 @@ public class ArtifactUtil {
public static String getUri(JdbcClient jdbcClient, String artifactGuid, BranchReadable branch) throws OseeCoreException {
String sql = String.format(URI_BY_GUID, getTransactionTable(branch));
- return jdbcClient.fetch("", sql, artifactGuid, branch, TxChange.CURRENT.getValue());
+ return jdbcClient.fetch("", sql, artifactGuid, branch, TxChange.CURRENT);
}
private static String getTransactionTable(BranchReadable branch) {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java
index 2dad2c9485..d13a5b3de4 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java
@@ -136,7 +136,7 @@ public class ChangeArtifactType {
try (JdbcStatement chStmt = ConnectionHandler.getStatement()) {
chStmt.runPreparedQuery(
"select branch_id, gamma_id from osee_join_id jid1, osee_join_id jid2, osee_txs txs where jid1.query_id = ? and jid2.query_id = ? and jid1.id = txs.gamma_id and jid2.id = txs.branch_id and txs.tx_current = ?",
- gammaJoin.getQueryId(), branchJoin.getQueryId(), TxChange.CURRENT.getValue());
+ gammaJoin.getQueryId(), branchJoin.getQueryId(), TxChange.CURRENT);
while (chStmt.next()) {
GammaId gammaId = GammaId.valueOf(chStmt.getLong("gamma_id"));
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java
index 663aa2aecf..1d0a87d852 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java
@@ -40,9 +40,9 @@ import org.eclipse.osee.jdbc.JdbcConnection;
public class UpdateMergeBranch extends AbstractDbTxOperation {
private static final String TX_CURRENT_SETTINGS = "CASE" + //
- " WHEN txs1.mod_type = " + ModificationType.DELETED.getValue() + " THEN " + TxChange.DELETED.getValue() + //
- " WHEN txs1.mod_type = " + ModificationType.ARTIFACT_DELETED.getValue() + " THEN " + TxChange.ARTIFACT_DELETED.getValue() + //
- " ELSE " + TxChange.CURRENT.getValue() + //
+ " WHEN txs1.mod_type = " + ModificationType.DELETED.getValue() + " THEN " + TxChange.DELETED + //
+ " WHEN txs1.mod_type = " + ModificationType.ARTIFACT_DELETED.getValue() + " THEN " + TxChange.ARTIFACT_DELETED + //
+ " ELSE " + TxChange.CURRENT + //
" END";
private static final String UPDATE_ARTIFACTS =
@@ -116,9 +116,8 @@ public class UpdateMergeBranch extends AbstractDbTxOperation {
//Copy over any missing attributes
TransactionId baselineTransaction = BranchManager.getBaseTransaction(mergeBranch);
for (Artifact artifact : goodMergeBranchArtifacts) {
- numberAttrUpdated +=
- getJdbcClient().runPreparedUpdate(connection, UPDATE_ARTIFACTS, baselineTransaction, mergeBranch,
- artifact.getArtId(), sourceBranch, TxChange.NOT_CURRENT.getValue(), mergeBranch, baselineTransaction);
+ numberAttrUpdated += getJdbcClient().runPreparedUpdate(connection, UPDATE_ARTIFACTS, baselineTransaction,
+ mergeBranch, artifact.getArtId(), sourceBranch, TxChange.NOT_CURRENT, mergeBranch, baselineTransaction);
}
if (DEBUG) {
System.out.println(String.format(" Adding %d Attributes to Existing Artifacts took %s",
@@ -166,8 +165,7 @@ public class UpdateMergeBranch extends AbstractDbTxOperation {
}
private void insertGammas(JdbcConnection connection, String sql, TransactionId baseTx, int queryId, BranchId sourceBranch, BranchId mergeBranch) throws OseeCoreException {
- getJdbcClient().runPreparedUpdate(connection, sql, baseTx, TxChange.CURRENT.getValue(), mergeBranch, sourceBranch,
- queryId);
+ getJdbcClient().runPreparedUpdate(connection, sql, baseTx, TxChange.CURRENT, mergeBranch, sourceBranch, queryId);
}
private Collection<ArtifactId> getAllMergeArtifacts(BranchId branch) throws OseeCoreException {
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/BaseTransactionData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/BaseTransactionData.java
index 9775c1e32a..4eff50aedd 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/BaseTransactionData.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/BaseTransactionData.java
@@ -68,8 +68,8 @@ public abstract class BaseTransactionData {
ModificationType modTypeToStore = getAdjustedModificationType();
internalAddInsertToBatch(collector, Integer.MAX_VALUE, INSERT_INTO_TRANSACTION_TABLE, collector.getTransaction(),
- getGammaId(), modTypeToStore.getValue(), TxChange.getCurrent(modTypeToStore).getValue(),
- collector.getBranch(), getApplicId());
+ getGammaId(), modTypeToStore.getValue(), TxChange.getCurrent(modTypeToStore), collector.getBranch(),
+ getApplicId());
//TODO: remove hack defaulting to 1
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java
index 525a275b2c..d755d416e4 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java
@@ -52,7 +52,7 @@ import org.eclipse.osee.jdbc.JdbcStatement;
public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation implements InsertDataCollector {
private static final String UPDATE_TXS_NOT_CURRENT =
- "UPDATE osee_txs SET tx_current = " + TxChange.NOT_CURRENT.getValue() + " WHERE branch_id = ? AND transaction_id = ? AND gamma_id = ?";
+ "UPDATE osee_txs SET tx_current = " + TxChange.NOT_CURRENT + " WHERE branch_id = ? AND transaction_id = ? AND gamma_id = ?";
private final HashCollection<String, Object[]> dataItemInserts = new HashCollection<>();
private final Map<Integer, String> dataInsertOrder = new HashMap<>();
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java
index 9a82437f88..43140cb681 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java
@@ -93,7 +93,7 @@ public class InvalidTxCurrentsAndModTypes extends AbstractOperation {
} else if (address.getCorrectedTxCurrent() != null) {
logIssue("corrected txCurrent: " + address.getCorrectedTxCurrent(), address);
currentData.add(new Object[] {
- address.getCorrectedTxCurrent().getValue(),
+ address.getCorrectedTxCurrent(),
address.getTransactionId(),
address.getGammaId(),
address.getBranchId()});
@@ -182,7 +182,7 @@ public class InvalidTxCurrentsAndModTypes extends AbstractOperation {
Consumer<JdbcStatement> consumer = stmt -> {
checkForCancelledStatus(monitor);
ModificationType modType = ModificationType.getMod(stmt.getInt("mod_type"));
- TxChange txCurrent = TxChange.getChangeType(stmt.getInt("tx_current"));
+ TxChange txCurrent = TxChange.valueOf(stmt.getInt("tx_current"));
TransactionDetailsType type = TransactionDetailsType.toEnum(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),
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 9017bfa6af..b994f2f76e 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
@@ -71,7 +71,7 @@ public class ItemsDeletedWithNoOtherModification extends DatabaseHealthOperation
private void loadData(String sql, TxChange txChange, ModificationType modificationType) throws OseeCoreException {
JdbcStatement chStmt = ConnectionHandler.getStatement();
try {
- chStmt.runPreparedQuery(sql, txChange.getValue(), modificationType.getValue(), modificationType.getValue());
+ chStmt.runPreparedQuery(sql, txChange, modificationType.getValue(), modificationType.getValue());
while (chStmt.next()) {
addressing.add(
new LocalValues(chStmt.getInt("art_id"), chStmt.getInt("attr_id"), chStmt.getLong("branch_id"),
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 34838448d6..958da1b5c9 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
@@ -53,8 +53,8 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation {
" osee_tx_details txd " +
" WHERE " +
" tx1.branch_id = tx2.branch_id AND " +
- " tx1.tx_current = " + TxChange.CURRENT.getValue() + " AND " +
- " tx2.tx_current = " + TxChange.DELETED.getValue() + " AND " +
+ " tx1.tx_current = " + TxChange.CURRENT + " AND " +
+ " tx2.tx_current = " + TxChange.DELETED + " AND " +
" tx1.gamma_id = rel1.gamma_id AND " +
" tx2.gamma_id = av1.gamma_id AND " +
" av1.art_id = rel1.%s AND " +
@@ -102,10 +102,10 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation {
private static final String UPDATE_TXS_PREVIOUS =
"UPDATE osee_txs SET tx_current = 0 WHERE gamma_id = ? AND transaction_id = ?";
private static final String UPDATE_TXS_CURRENT =
- "UPDATE osee_txs SET tx_current = " + TxChange.ARTIFACT_DELETED.getValue() + ", mod_type = " + ModificationType.ARTIFACT_DELETED.getValue() + " WHERE gamma_id = ? AND transaction_id = ?";
+ "UPDATE osee_txs SET tx_current = " + TxChange.ARTIFACT_DELETED + ", mod_type = " + ModificationType.ARTIFACT_DELETED.getValue() + " WHERE gamma_id = ? AND transaction_id = ?";
private static final String INSERT_TXS =
- "INSERT INTO osee_txs (gamma_id, transaction_id, tx_current, mod_type, branch_id) VALUES (?, ?, " + TxChange.ARTIFACT_DELETED.getValue() + ", " + ModificationType.ARTIFACT_DELETED.getValue() + ", ?)";
+ "INSERT INTO osee_txs (gamma_id, transaction_id, tx_current, mod_type, branch_id) VALUES (?, ?, " + TxChange.ARTIFACT_DELETED + ", " + ModificationType.ARTIFACT_DELETED.getValue() + ", ?)";
private static final String[] COLUMN_HEADERS = {
"Rel Link ID",
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java
index 0bac39af01..c04ae91bad 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java
@@ -41,7 +41,7 @@ import org.eclipse.osee.jdbc.JdbcStatement;
public class RepeatEnumerationAttributeValues extends DatabaseHealthOperation {
private final static String FIND_REPEAT_ENUMS =
- "select DISTINCT(art1.guid), att1.art_id, att1.value, att1.attr_type_id from osee_attribute att1, osee_attribute att2, osee_txs txs1, osee_txs txs2, osee_artifact art1 where att1.gamma_id = txs1.gamma_id and txs1.branch_id = ? and att2.gamma_id = txs2.gamma_id and txs2.branch_id = ? and att1.art_id = att2.art_id and att1.attr_id <> att2.attr_id and att1.value = att2.value and txs1.tx_current = " + TxChange.CURRENT.getValue() + " and txs2.tx_current = " + TxChange.CURRENT.getValue() + " and att1.attr_type_id = att2.attr_type_id and art1.art_id = att1.art_id order by att1.art_id, att1.attr_type_id, att1.value";
+ "select DISTINCT(art1.guid), att1.art_id, att1.value, att1.attr_type_id from osee_attribute att1, osee_attribute att2, osee_txs txs1, osee_txs txs2, osee_artifact art1 where att1.gamma_id = txs1.gamma_id and txs1.branch_id = ? and att2.gamma_id = txs2.gamma_id and txs2.branch_id = ? and att1.art_id = att2.art_id and att1.attr_id <> att2.attr_id and att1.value = att2.value and txs1.tx_current = " + TxChange.CURRENT + " and txs2.tx_current = " + TxChange.CURRENT + " and att1.attr_type_id = att2.attr_type_id and art1.art_id = att1.art_id order by att1.art_id, att1.attr_type_id, att1.value";
public RepeatEnumerationAttributeValues() {
super("Repeat Enumeration Attribute Values");
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderTest.java
index 75ff8db9ff..9ee7e623cb 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderTest.java
@@ -193,7 +193,7 @@ public class TxSqlBuilderTest {
// @formatter:off
verifyRow(SqlOrderEnum.ARTIFACTS, ITEM_ID, TYPE_UUID, NEXT_GAMMA_ID, EXP_GUID);
- verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, NEXT_GAMMA_ID, modType.getValue(), TxChange.CURRENT.getValue(), COMMON);
+ verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, NEXT_GAMMA_ID, modType.getValue(), TxChange.CURRENT, COMMON);
verifyQuery(SqlOrderEnum.ARTIFACTS);
// @formatter:on
@@ -215,7 +215,7 @@ public class TxSqlBuilderTest {
ModificationType expectedType = modType != REPLACED_WITH_VERSION ? modType : MODIFIED;
// @formatter:off
- verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, GammaId.SENTINEL, expectedType.getValue(), TxChange.getCurrent(expectedType).getValue(), COMMON);
+ verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, GammaId.SENTINEL, expectedType.getValue(), TxChange.getCurrent(expectedType), COMMON);
verifyQuery(SqlOrderEnum.ARTIFACTS);
// @formatter:on
@@ -263,7 +263,7 @@ public class TxSqlBuilderTest {
// @formatter:off
verifyRow(SqlOrderEnum.RELATIONS, ITEM_ID, TYPE_UUID, NEXT_GAMMA_ID, A_ART_ID.getId().intValue(), B_ART_ID.getId().intValue(), RATIONALE);
- verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, NEXT_GAMMA_ID, modType.getValue(), TxChange.CURRENT.getValue(), COMMON);
+ verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, NEXT_GAMMA_ID, modType.getValue(), TxChange.CURRENT, COMMON);
verifyQuery(SqlOrderEnum.RELATIONS);
// @formatter:on
@@ -285,7 +285,7 @@ public class TxSqlBuilderTest {
ModificationType expectedType = modType != REPLACED_WITH_VERSION ? modType : MODIFIED;
// @formatter:off
- verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, GammaId.SENTINEL, expectedType.getValue(), TxChange.getCurrent(expectedType).getValue(), COMMON);
+ verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, GammaId.SENTINEL, expectedType.getValue(), TxChange.getCurrent(expectedType), COMMON);
verifyQuery(SqlOrderEnum.RELATIONS);
// @formatter:on
@@ -307,7 +307,7 @@ public class TxSqlBuilderTest {
// @formatter:off
verifyRow(SqlOrderEnum.ATTRIBUTES, ITEM_ID, TYPE_UUID, NEXT_GAMMA_ID, ATTR_ARTIFACT_ID, ATTR_VALUE, ATTR_URI);
- verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, NEXT_GAMMA_ID, modType.getValue(), TxChange.CURRENT.getValue(), COMMON);
+ verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, NEXT_GAMMA_ID, modType.getValue(), TxChange.CURRENT, COMMON);
verifyQuery(SqlOrderEnum.ATTRIBUTES);
// @formatter:on
@@ -341,7 +341,7 @@ public class TxSqlBuilderTest {
ModificationType expectedType = modType != REPLACED_WITH_VERSION ? modType : MODIFIED;
// @formatter:off
- verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, GammaId.SENTINEL, expectedType.getValue(), TxChange.getCurrent(expectedType).getValue(), COMMON);
+ verifyRow(SqlOrderEnum.TXS, EXPECTED_TX, GammaId.SENTINEL, expectedType.getValue(), TxChange.getCurrent(expectedType), COMMON);
verifyQuery(SqlOrderEnum.ATTRIBUTES);
// @formatter:on
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/UpdatePreviousTxCurrent.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/UpdatePreviousTxCurrent.java
index 0764314f4f..648d4b7612 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/UpdatePreviousTxCurrent.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/UpdatePreviousTxCurrent.java
@@ -25,9 +25,9 @@ import org.eclipse.osee.jdbc.OseePreparedStatement;
*/
public class UpdatePreviousTxCurrent {
private static final String UPDATE_TXS_NOT_CURRENT =
- "update osee_txs SET tx_current = " + TxChange.NOT_CURRENT.getValue() + " where branch_id = ? AND gamma_id = ? and transaction_id = ?";
+ "update osee_txs SET tx_current = " + TxChange.NOT_CURRENT + " where branch_id = ? AND gamma_id = ? and transaction_id = ?";
private static final String UPDATE_TXS_NOT_CURRENT_NO_TX =
- "update osee_txs SET tx_current = " + TxChange.NOT_CURRENT.getValue() + " where branch_id = ? AND gamma_id = ?";
+ "update osee_txs SET tx_current = " + TxChange.NOT_CURRENT + " where branch_id = ? AND gamma_id = ?";
// @formatter:off
private static final String SELECT_TXS_AND_GAMMAS_FROM_TXS ="with\n"+
"txs as (select gamma_id from osee_txs where branch_id = ? and transaction_id = ?),\n"+
@@ -37,7 +37,7 @@ public class UpdatePreviousTxCurrent {
" SELECT item2.gamma_id FROM osee_artifact item1, txs, osee_artifact item2 where txs.gamma_id = item1.gamma_id and item1.art_id = item2.art_id\n"+
"UNION ALL\n"+
" SELECT item2.gamma_id FROM osee_relation_link item1, txs, osee_relation_link item2 where txs.gamma_id = item1.gamma_id and item1.rel_link_id = item2.rel_link_id)\n"+
- "select txsb.transaction_id, txsb.gamma_id FROM item, osee_txs txsb where item.gamma_id = txsb.gamma_id AND txsb.branch_id = ? AND transaction_id <> ? AND txsb.tx_current <> " + TxChange.NOT_CURRENT.getValue();
+ "select txsb.transaction_id, txsb.gamma_id FROM item, osee_txs txsb where item.gamma_id = txsb.gamma_id AND txsb.branch_id = ? AND transaction_id <> ? AND txsb.tx_current <> " + TxChange.NOT_CURRENT;
// @formatter:on
private final JdbcClient jdbcClient;
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java
index 2f7860c7ac..008b60f238 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java
@@ -102,13 +102,7 @@ public final class BranchCopyTxCallable extends JdbcTransaction {
ModificationType modType = ModificationType.getMod(chStmt.getInt("mod_type"));
Long app_id = chStmt.getLong("app_id");
TxChange txCurrent = TxChange.getCurrent(modType);
- data.add(new Object[] {
- baseTxId,
- gamma,
- modType.getValue(),
- txCurrent.getValue(),
- branchData.getBranch(),
- app_id});
+ data.add(new Object[] {baseTxId, gamma, modType.getValue(), txCurrent, branchData.getBranch(), app_id});
gammas.add(gamma);
}
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java
index 2c0debe539..9beb0fd890 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java
@@ -153,7 +153,7 @@ public class CommitBranchDatabaseTxCallable extends AbstractDatastoreTxCallable<
destinationBranch,
change.getNetChange().getGammaId(),
modType.getValue(),
- TxChange.getCurrent(modType).getValue(),
+ TxChange.getCurrent(modType),
appToken});
}
getJdbcClient().runBatchUpdate(connection, INSERT_COMMIT_ADDRESSING, insertData);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateRelationsDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateRelationsDatabaseTxCallable.java
index ca674f560f..bb06dbe179 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateRelationsDatabaseTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateRelationsDatabaseTxCallable.java
@@ -163,13 +163,13 @@ public class ConsolidateRelationsDatabaseTxCallable extends AbstractDatastoreTxC
long transactionId = stmt.getLong("transaction_id");
long netGammaId = stmt.getLong("net_gamma_id");
int modType = stmt.getInt("mod_type");
- TxChange txCurrent = TxChange.getChangeType(stmt.getInt("tx_current"));
+ TxChange txCurrent = TxChange.valueOf(stmt.getInt("tx_current"));
long branchId = stmt.getLong("branch_id");
if (isNextAddressing(netGammaId, transactionId)) {
if (updatedAddressing) {
- updateAddressing.addToBatch(previousNetGammaId, netModType.getValue(), netTxCurrent.getValue(),
- previousBranchId, previousTransactionId, previousObsoleteGammaId);
+ updateAddressing.addToBatch(previousNetGammaId, netModType.getValue(), netTxCurrent, previousBranchId,
+ previousTransactionId, previousObsoleteGammaId);
}
updatedAddressing = obsoleteGammaId != netGammaId;
previousNetGammaId = netGammaId;
@@ -244,7 +244,7 @@ public class ConsolidateRelationsDatabaseTxCallable extends AbstractDatastoreTxC
strB.append(",");
strB.append(modType);
strB.append(",");
- strB.append(txCurrent.getValue());
+ strB.append(txCurrent);
strB.append("\n");
console.writeln(strB.toString());
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java
index f188164c04..80e1acdd9e 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java
@@ -226,9 +226,9 @@ public class CreateBranchDatabaseTxCallable extends JdbcTransaction {
OseePreparedStatement addressing = jdbcClient.getBatchStatement(connection, INSERT_ADDRESSING);
if (newBranchData.getBranchType().isMergeBranch()) {
populateAddressingToCopy(connection, addressing, baseTxId, gammas, SELECT_ATTRIBUTE_ADDRESSING_FROM_JOIN,
- parentBranch, TxChange.NOT_CURRENT.getValue(), newBranchData.getMergeAddressingQueryId());
+ parentBranch, TxChange.NOT_CURRENT, newBranchData.getMergeAddressingQueryId());
populateAddressingToCopy(connection, addressing, baseTxId, gammas, SELECT_ARTIFACT_ADDRESSING_FROM_JOIN,
- parentBranch, TxChange.NOT_CURRENT.getValue(), newBranchData.getMergeAddressingQueryId());
+ parentBranch, TxChange.NOT_CURRENT, newBranchData.getMergeAddressingQueryId());
} else {
populateAddressingToCopy(connection, addressing, baseTxId, gammas, SELECT_ADDRESSING, parentBranch,
sourceTxId);
@@ -249,7 +249,7 @@ public class CreateBranchDatabaseTxCallable extends JdbcTransaction {
ModificationType modType = ModificationType.getMod(chStmt.getInt("mod_type"));
Long appId = chStmt.getLong("app_id");
TxChange txCurrent = TxChange.getCurrent(modType);
- addressing.addToBatch(baseTxId, gamma, modType.getValue(), txCurrent.getValue(), branchId, appId);
+ addressing.addToBatch(baseTxId, gamma, modType.getValue(), txCurrent, branchId, appId);
gammas.add(gamma);
}
}
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 4b732ba970..af028189b2 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
@@ -79,7 +79,7 @@ public class InvalidTxCurrentsAndModTypesCallable extends AbstractDatastoreTxCal
logIssue("corrected txCurrent: " + address.getCorrectedTxCurrent(), address);
currentData.add(new Object[] {
- address.getCorrectedTxCurrent().getValue(),
+ address.getCorrectedTxCurrent(),
address.getTransactionId(),
address.getGammaId(),
address.getBranchId()});
@@ -166,9 +166,9 @@ public class InvalidTxCurrentsAndModTypesCallable extends AbstractDatastoreTxCal
Consumer<JdbcStatement> consumer = stmt -> {
checkForCancelled();
ModificationType modType = ModificationType.getMod(stmt.getInt("mod_type"));
- TxChange txCurrent = TxChange.getChangeType(stmt.getInt("tx_current"));
+ TxChange txCurrent = TxChange.valueOf(stmt.getInt("tx_current"));
TransactionDetailsType type = TransactionDetailsType.toEnum(stmt.getInt("tx_type"));
- ApplicabilityId appId = ApplicabilityId.valueOf(stmt.getLong("app_id"));
+ ApplicabilityId appId = ApplicabilityId.valueOf(stmt.getLong("app_id"));
Address address = new Address(type.isBaseline(), stmt.getLong("branch_id"), stmt.getInt(columnName),
stmt.getLong("transaction_id"), stmt.getLong("gamma_id"), modType, appId, txCurrent);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/OrcsTypeLoaderCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/OrcsTypeLoaderCallable.java
index f6e707f2ab..5554346836 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/OrcsTypeLoaderCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/OrcsTypeLoaderCallable.java
@@ -62,8 +62,8 @@ public class OrcsTypeLoaderCallable extends AbstractDatastoreCallable<IResource>
getJdbcClient().runQuery(stmt -> {
String uri = stmt.getString("uri");
paths.add(uri);
- }, OrcsTypes.LOAD_OSEE_TYPE_DEF_URIS, CoreTupleTypes.OseeTypeDef, CoreBranches.COMMON,
- TxChange.CURRENT.getValue(), OrcsTypesData.OSEE_TYPE_VERSION, TxChange.CURRENT.getValue());
+ }, OrcsTypes.LOAD_OSEE_TYPE_DEF_URIS, CoreTupleTypes.OseeTypeDef, CoreBranches.COMMON, TxChange.CURRENT,
+ OrcsTypesData.OSEE_TYPE_VERSION, TxChange.CURRENT);
return paths;
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeTransactionTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeTransactionTxCallable.java
index 913108bd11..afec58ba55 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeTransactionTxCallable.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeTransactionTxCallable.java
@@ -152,11 +152,8 @@ public class PurgeTransactionTxCallable extends AbstractDatastoreTxCallable<Inte
if (previousItem != currentItem) {
ModificationType modType = ModificationType.getMod(stmt.getInt("mod_type"));
TxChange txCurrent = TxChange.getCurrent(modType);
- updateData.add(new Object[] {
- txCurrent.getValue(),
- branch,
- stmt.getLong("transaction_id"),
- stmt.getLong("gamma_id")});
+ updateData.add(
+ new Object[] {txCurrent, branch, stmt.getLong("transaction_id"), stmt.getLong("gamma_id")});
previousItem = currentItem;
}
};
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java
index d2489f57df..5d768e96f4 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java
@@ -198,7 +198,7 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
}
};
getJdbcClient().runQuery(consumer, JdbcConstants.JDBC__MAX_FETCH_SIZE, SELECT_ALL_SOURCE_ADDRESSING, sourceBranch,
- TxChange.NOT_CURRENT.getValue(), sourceBaselineTxId, sourceBranch, sourceBaselineTxId);
+ TxChange.NOT_CURRENT, sourceBaselineTxId, sourceBranch, sourceBaselineTxId);
return hashChangeData;
}
@@ -236,8 +236,8 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
" and item.gamma_id = txs.gamma_id and txs.tx_current <> ? and txs.branch_id = ? and txs.transaction_id <= ?";
getJdbcClient().runQuery(consumer, JdbcConstants.JDBC__MAX_FETCH_SIZE, query, idJoin.getQueryId(),
- TxChange.NOT_CURRENT.getValue(), txBranchId, txId, idJoin.getQueryId(), TxChange.NOT_CURRENT.getValue(),
- txBranchId, txId, idJoin.getQueryId(), TxChange.NOT_CURRENT.getValue(), txBranchId, txId);
+ TxChange.NOT_CURRENT, txBranchId, txId, idJoin.getQueryId(), TxChange.NOT_CURRENT, txBranchId, txId,
+ idJoin.getQueryId(), TxChange.NOT_CURRENT, txBranchId, txId);
}
@@ -254,9 +254,9 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch
"osee_relation_link item, osee_txs txs where idj.query_id = ? and idj.id2 = item.rel_link_id and idj.id1 = 3 " + //
"and item.gamma_id = txs.gamma_id and txs.tx_current = ? and txs.branch_id = ?) t order by t.id2, t.transaction_id asc";
- chStmt.runPreparedQuery(JdbcConstants.JDBC__MAX_FETCH_SIZE, query, idJoin.getQueryId(),
- TxChange.NOT_CURRENT.getValue(), sourceBranch, idJoin.getQueryId(), TxChange.NOT_CURRENT.getValue(),
- sourceBranch, idJoin.getQueryId(), TxChange.NOT_CURRENT.getValue(), sourceBranch);
+ chStmt.runPreparedQuery(JdbcConstants.JDBC__MAX_FETCH_SIZE, query, idJoin.getQueryId(), TxChange.NOT_CURRENT,
+ sourceBranch, idJoin.getQueryId(), TxChange.NOT_CURRENT, sourceBranch, idJoin.getQueryId(),
+ TxChange.NOT_CURRENT, sourceBranch);
Long previousItemId = -1L;
boolean isFirstSet = false;
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/console/FixDuplicateAttributesCommand.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/console/FixDuplicateAttributesCommand.java
index ca98cd47d7..a56bb59231 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/console/FixDuplicateAttributesCommand.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/console/FixDuplicateAttributesCommand.java
@@ -102,8 +102,7 @@ public class FixDuplicateAttributesCommand extends AbstractDatastoreConsoleComma
private void selectDuplicates(ExportImportJoinQuery gammaJoin, JdbcConnection connection) throws OseeCoreException {
JdbcStatement chStmt = getJdbcClient().getStatement(connection);
try {
- chStmt.runPreparedQuery(SELECT_DUPLICATES, gammaJoin.getQueryId(), TxChange.CURRENT.getValue(),
- TxChange.CURRENT.getValue());
+ chStmt.runPreparedQuery(SELECT_DUPLICATES, gammaJoin.getQueryId(), TxChange.CURRENT, TxChange.CURRENT);
while (chStmt.next()) {
console.writeln("branch: " + chStmt.getLong("branch_id"), "gamma1: " + chStmt.getLong("gamma1"),
"gamma2: " + chStmt.getLong("gamma2"));
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java
index 17c9ce1bbc..0a76fda8b2 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java
@@ -149,7 +149,7 @@ public class V0_9_2Transformer implements IOseeExchangeVersionTransformer {
writer.writeStartElement("entry");
writer.writeAttribute("branch_id", String.valueOf(address.getBranchId()));
writer.writeAttribute("gamma_id", String.valueOf(address.getGammaId()));
- writer.writeAttribute("tx_current", String.valueOf(address.getCorrectedTxCurrent().getValue()));
+ writer.writeAttribute("tx_current", String.valueOf(address.getCorrectedTxCurrent()));
writer.writeAttribute("mod_type", String.valueOf(address.getModType().getValue()));
writer.writeAttribute("transaction_id", String.valueOf(address.getTransactionId()));
writer.writeEndElement();
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 da27ef8009..0f76cd64ef 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
@@ -79,7 +79,7 @@ public class V0_9_2TxsConsolidateParser extends SaxTransformer {
int modType = Integer.parseInt(attributes.getValue("mod_type"));
ModificationType modificationType = ModificationType.getMod(modType);
int transactionId = Integer.parseInt(attributes.getValue("transaction_id"));
- TxChange txCurrent = TxChange.getChangeType(Integer.parseInt(attributes.getValue("tx_current")));
+ TxChange txCurrent = TxChange.valueOf(Integer.parseInt(attributes.getValue("tx_current")));
return new Address(false, targetBranchId, -1, transactionId, gammaId, modificationType,
ApplicabilityId.valueOf(1L), txCurrent);
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/LoadSqlWriter.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/LoadSqlWriter.java
index ffed781cd1..14ce916736 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/LoadSqlWriter.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/LoadSqlWriter.java
@@ -151,11 +151,11 @@ public class LoadSqlWriter extends AbstractSqlWriter {
sb.append(txsAlias);
sb.append(".tx_current");
sb.append(" IN (");
- sb.append(String.valueOf(TxChange.CURRENT.getValue()));
+ sb.append(String.valueOf(TxChange.CURRENT));
sb.append(", ");
- sb.append(String.valueOf(TxChange.DELETED.getValue()));
+ sb.append(String.valueOf(TxChange.DELETED));
sb.append(", ");
- sb.append(String.valueOf(TxChange.ARTIFACT_DELETED.getValue()));
+ sb.append(String.valueOf(TxChange.ARTIFACT_DELETED));
sb.append(")");
} else {
buildDeletedClause(sb, txsAlias);
@@ -163,7 +163,7 @@ public class LoadSqlWriter extends AbstractSqlWriter {
} else {
sb.append(txsAlias);
sb.append(".tx_current = ");
- sb.append(String.valueOf(TxChange.CURRENT.getValue()));
+ sb.append(String.valueOf(TxChange.CURRENT));
}
}
}
@@ -251,7 +251,7 @@ public class LoadSqlWriter extends AbstractSqlWriter {
sb.append(txsAlias);
if (!OptionsUtil.isHistorical(getOptions())) {
sb.append(".tx_current = ");
- sb.append(String.valueOf(TxChange.CURRENT.getValue()));
+ sb.append(String.valueOf(TxChange.CURRENT));
}
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/DynamicLoadProcessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/DynamicLoadProcessor.java
index fdde5a16b8..f8bb4aaaa1 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/DynamicLoadProcessor.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/DynamicLoadProcessor.java
@@ -191,6 +191,6 @@ public class DynamicLoadProcessor extends AbstractLoadProcessor<DynamicDataHandl
}
private TxChange getTxCurrent(JdbcStatement chStmt, String columnName) {
- return TxChange.getChangeType(chStmt.getInt(columnName));
+ return TxChange.valueOf(chStmt.getInt(columnName));
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ApplicabilityDsQueryImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ApplicabilityDsQueryImpl.java
index 069c277340..dcc46334a1 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ApplicabilityDsQueryImpl.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ApplicabilityDsQueryImpl.java
@@ -18,7 +18,6 @@ import java.util.List;
import org.eclipse.osee.framework.core.data.ApplicabilityToken;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.BranchId;
-import org.eclipse.osee.framework.core.enums.TxChange;
import org.eclipse.osee.framework.jdk.core.type.Pair;
import org.eclipse.osee.jdbc.JdbcClient;
import org.eclipse.osee.orcs.core.ds.ApplicabilityDsQuery;
@@ -46,7 +45,7 @@ public class ApplicabilityDsQueryImpl implements ApplicabilityDsQuery {
@Override
public ApplicabilityToken getApplicabilityToken(ArtifactId artId, BranchId branch) {
return jdbcClient.fetch(BASE, stmt -> new ApplicabilityToken(stmt.getLong("key"), stmt.getString("value")),
- SELECT_APPLIC_FOR_ART, artId, branch, NOT_CURRENT.getValue());
+ SELECT_APPLIC_FOR_ART, artId, branch, NOT_CURRENT);
}
@Override
@@ -61,7 +60,7 @@ public class ApplicabilityDsQueryImpl implements ApplicabilityDsQuery {
jdbcClient.runQuery(
stmt -> result.add(new Pair<ArtifactId, ApplicabilityToken>(ArtifactId.valueOf(stmt.getLong("art_id")),
ApplicabilityToken.create(stmt.getLong("key"), stmt.getString("value")))),
- SELECT_APPLIC_FOR_ARTS, idJoin.getQueryId(), branch, TxChange.NOT_CURRENT.getValue());
+ SELECT_APPLIC_FOR_ARTS, idJoin.getQueryId(), branch, NOT_CURRENT);
}
return result;
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ArtifactQuerySqlWriter.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ArtifactQuerySqlWriter.java
index 56dc9aa6c1..53894a757a 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ArtifactQuerySqlWriter.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ArtifactQuerySqlWriter.java
@@ -126,10 +126,10 @@ public class ArtifactQuerySqlWriter extends AbstractSqlWriter {
sb.append(".tx_current");
if (allowDeleted) {
sb.append(" <> ");
- sb.append(String.valueOf(TxChange.NOT_CURRENT.getValue()));
+ sb.append(String.valueOf(TxChange.NOT_CURRENT));
} else {
sb.append(" = ");
- sb.append(String.valueOf(TxChange.CURRENT.getValue()));
+ sb.append(String.valueOf(TxChange.CURRENT));
}
}
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ObjectQuerySqlWriter.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ObjectQuerySqlWriter.java
index d2de975a76..fdd4ba22f2 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ObjectQuerySqlWriter.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ObjectQuerySqlWriter.java
@@ -265,15 +265,15 @@ public class ObjectQuerySqlWriter extends AbstractSqlWriter {
sb.append(".tx_current");
if (allowDeleted) {
sb.append(" IN (");
- sb.append(String.valueOf(TxChange.CURRENT.getValue()));
+ sb.append(String.valueOf(TxChange.CURRENT));
sb.append(", ");
- sb.append(String.valueOf(TxChange.DELETED.getValue()));
+ sb.append(String.valueOf(TxChange.DELETED));
sb.append(", ");
- sb.append(String.valueOf(TxChange.ARTIFACT_DELETED.getValue()));
+ sb.append(String.valueOf(TxChange.ARTIFACT_DELETED));
sb.append(")");
} else {
sb.append(" = ");
- sb.append(String.valueOf(TxChange.CURRENT.getValue()));
+ sb.append(String.valueOf(TxChange.CURRENT));
}
}
}
diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriter.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriter.java
index d964d9fd0e..5ed713d6bd 100644
--- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriter.java
+++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriter.java
@@ -30,7 +30,7 @@ import org.eclipse.osee.orcs.db.internal.sql.join.AbstractJoinQuery;
public class TransactionWriter {
protected static final String UPDATE_TXS_NOT_CURRENT =
- "UPDATE osee_txs SET tx_current = " + TxChange.NOT_CURRENT.getValue() + " WHERE branch_id = ? AND transaction_id = ? AND gamma_id = ?";
+ "UPDATE osee_txs SET tx_current = " + TxChange.NOT_CURRENT + " WHERE branch_id = ? AND transaction_id = ? AND gamma_id = ?";
private static final String INSERT_ARTIFACT =
"INSERT INTO osee_artifact (art_id, art_type_id, gamma_id, guid) VALUES (?,?,?,?)";
@@ -57,13 +57,13 @@ public class TransactionWriter {
"INSERT INTO osee_tx_details (transaction_id, osee_comment, time, author, branch_id, tx_type) VALUES (?, ?, ?, ?, ?, ?)";
private static final String TX_GET_PREVIOUS_TX_NOT_CURRENT_ARTIFACTS =
- "SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_join_id jid, osee_artifact art, osee_txs txs WHERE jid.query_id = ? AND art.art_id = jid.id AND art.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT.getValue();
+ "SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_join_id jid, osee_artifact art, osee_txs txs WHERE jid.query_id = ? AND art.art_id = jid.id AND art.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT;
private static final String TX_GET_PREVIOUS_TX_NOT_CURRENT_ATTRIBUTES =
- "SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_join_id jid, osee_attribute attr, osee_txs txs WHERE jid.query_id = ? AND attr.attr_id = jid.id AND attr.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT.getValue();
+ "SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_join_id jid, osee_attribute attr, osee_txs txs WHERE jid.query_id = ? AND attr.attr_id = jid.id AND attr.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT;
private static final String TX_GET_PREVIOUS_TX_NOT_CURRENT_RELATIONS =
- "SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_join_id jid, osee_relation_link rel, osee_txs txs WHERE jid.query_id = ? AND rel.rel_link_id = jid.id AND rel.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT.getValue();
+ "SELECT txs.transaction_id, txs.gamma_id, txs.app_id FROM osee_join_id jid, osee_relation_link rel, osee_txs txs WHERE jid.query_id = ? AND rel.rel_link_id = jid.id AND rel.gamma_id = txs.gamma_id AND txs.branch_id = ? AND txs.tx_current <> " + TxChange.NOT_CURRENT;
public static enum SqlOrderEnum {
ARTIFACTS(INSERT_ARTIFACT, TX_GET_PREVIOUS_TX_NOT_CURRENT_ARTIFACTS),
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 2da021ea2b..aec1131d6b 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
@@ -195,7 +195,7 @@ public class TxSqlBuilderImpl implements OrcsVisitor, TxSqlBuilder {
ModificationType modType = orcsData.getModType();
addRow(SqlOrderEnum.TXS, data.getTransactionId(), data.getGammaId(), modType.getValue(),
- TxChange.getCurrent(modType).getValue(), data.getBranch(), orcsData.getApplicabilityId());
+ TxChange.getCurrent(modType), data.getBranch(), orcsData.getApplicabilityId());
if (key.hasTxNotCurrentQuery()) {
IdJoinQuery join = txNotCurrentsJoin.get(key);
diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/TypesEndpointImpl.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/TypesEndpointImpl.java
index 322bc7435d..53e019a917 100644
--- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/TypesEndpointImpl.java
+++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/TypesEndpointImpl.java
@@ -281,8 +281,8 @@ public class TypesEndpointImpl implements TypesEndpoint {
sheet.setAttrId(stmt2.getInt("attr_id"));
attrIds.add(new Long(sheet.getAttrId()).intValue());
typeVersion.getSheets().add(sheet);
- }, OrcsTypes.LOAD_OSEE_TYPE_DEF_URIS, CoreTupleTypes.OseeTypeDef, CoreBranches.COMMON,
- TxChange.CURRENT.getValue(), typeVersion.getVersionNum(), TxChange.CURRENT.getValue());
+ }, OrcsTypes.LOAD_OSEE_TYPE_DEF_URIS, CoreTupleTypes.OseeTypeDef, CoreBranches.COMMON, TxChange.CURRENT,
+ typeVersion.getVersionNum(), TxChange.CURRENT);
}, OrcsTypes.LOAD_OSEE_TYPE_VERSIONS, CoreTupleTypes.OseeTypeDef.getId());

Back to the top