Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrbrooks2010-05-24 17:09:45 -0400
committerrbrooks2010-05-24 17:09:45 -0400
commitbe71c7887401242dfd60fea72d889a7e28381141 (patch)
tree4007d1d0ffc31a5c898351387693357105641a87 /plugins/org.eclipse.osee.framework.database
parent72981b212ad118e77b9dce355539aa9c2e23e06f (diff)
downloadorg.eclipse.osee-be71c7887401242dfd60fea72d889a7e28381141.tar.gz
org.eclipse.osee-be71c7887401242dfd60fea72d889a7e28381141.tar.xz
org.eclipse.osee-be71c7887401242dfd60fea72d889a7e28381141.zip
Diffstat (limited to 'plugins/org.eclipse.osee.framework.database')
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/Address.java18
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java5
-rw-r--r--plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/InvalidTxCurrentsAndModTypes.java10
3 files changed, 26 insertions, 7 deletions
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/Address.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/Address.java
index b42916f3e9..291580d3b2 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/Address.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/Address.java
@@ -1,14 +1,22 @@
-/*
- * Created on Apr 6, 2010
+/*******************************************************************************
+ * Copyright (c) 2010 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
*
- * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
- */
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
package org.eclipse.osee.framework.database.operation;
import org.eclipse.osee.framework.core.enums.ModificationType;
import org.eclipse.osee.framework.core.enums.TxChange;
-final class Address {
+/**
+ * @author Ryan D. Brooks
+ */
+public final class Address {
final int branchId;
final int itemId;
final int transactionId;
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java
index 28023074bd..8a65fd52ea 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/ConsolidateArtifactVersionTxOperation.java
@@ -262,13 +262,14 @@ public class ConsolidateArtifactVersionTxOperation extends AbstractDbTxOperation
writeAddressingChanges(archived, false);
if (modType == ModificationType.MODIFIED) {
addToUpdateAddresssing(ModificationType.NEW, netGammaId, modType, transactionId, obsoleteGammaId);
- } else if (modType == ModificationType.NEW || modType == ModificationType.INTRODUCED || modType == ModificationType.DELETED || modType == ModificationType.MERGED) {
+ } else if (modType.matches(ModificationType.NEW, ModificationType.INTRODUCED, ModificationType.DELETED,
+ ModificationType.MERGED)) {
addToUpdateAddresssing(modType, netGammaId, modType, transactionId, obsoleteGammaId);
} else {
throw new OseeStateException("unexpected mod type: " + modType);
}
} else {
- if (modType == ModificationType.MODIFIED || modType == ModificationType.NEW || modType == ModificationType.INTRODUCED) {
+ if (modType.matches(ModificationType.NEW, ModificationType.INTRODUCED, ModificationType.MODIFIED)) {
addressingToDelete.add(new Object[] {transactionId, obsoleteGammaId});
} else if (modType == ModificationType.DELETED || modType == ModificationType.MERGED) {
if (previuosTransactionId != transactionId) { // can't use a gamma (netGammaId) more than once in a transaction
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/InvalidTxCurrentsAndModTypes.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/InvalidTxCurrentsAndModTypes.java
index f6869e78e1..e29c36ee6a 100644
--- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/InvalidTxCurrentsAndModTypes.java
+++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/InvalidTxCurrentsAndModTypes.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
package org.eclipse.osee.framework.database.operation;
import java.util.ArrayList;

Back to the top