Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid W. Miller2013-06-26 13:24:52 -0400
committerGerrit Code Review @ Eclipse.org2013-06-27 14:13:52 -0400
commitb74ff3b5f68beadf5c309faa953c8643bdd21079 (patch)
treeddd46c4424f93d736814eae62a8c440a562dc6e9
parent40587061c4457256bfccc3187410aae64ae05cc4 (diff)
downloadorg.eclipse.osee-b74ff3b5f68beadf5c309faa953c8643bdd21079.tar.gz
org.eclipse.osee-b74ff3b5f68beadf5c309faa953c8643bdd21079.tar.xz
org.eclipse.osee-b74ff3b5f68beadf5c309faa953c8643bdd21079.zip
bug[ats_6QHWQ]: Improve Relation Integrity Check
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java12
1 files changed, 5 insertions, 7 deletions
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 feb290281c..270f79e77e 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
@@ -96,8 +96,6 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation {
private static final String NO_ADDRESSING_ARTIFACTS_A = String.format(NO_ADDRESSING_QUERY, "a_art_id");
private static final String NO_ADDRESSING_ARTIFACTS_B = String.format(NO_ADDRESSING_QUERY, "b_art_id");
- public static final String DELETE_FROM_TXS = "DELETE FROM osee_txs where gamma_id = ? AND transaction_id = ?";
-
public static final String DEL_FROM_TXS_W_SPEC_BRANCH_ID =
"DELETE FROM osee_txs where gamma_id = ? AND transaction_id = ? AND branch_id = ?";
@@ -243,12 +241,12 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation {
private void deleteInvalidRelationAddressing() throws OseeCoreException {
List<Object[]> rowsToDelete = new LinkedList<Object[]>();
for (LocalRelationLink relLink : deleteMap.allValues()) {
- rowsToDelete.add(new Object[] {relLink.gammaId, relLink.relTransId});
+ rowsToDelete.add(new Object[] {relLink.gammaId, relLink.relTransId, relLink.branchId});
}
monitor.subTask("Deleting Relation Addressing with " + TxChange.DELETED + " Artifact");
if (rowsToDelete.size() != 0) {
- ConnectionHandler.runBatchUpdate(DELETE_FROM_TXS, rowsToDelete);
+ ConnectionHandler.runBatchUpdate(DEL_FROM_TXS_W_SPEC_BRANCH_ID, rowsToDelete);
}
deleteMap = null;
@@ -278,7 +276,7 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation {
sbFull.append(AHTML.endMultiColumnTable());
XResultData rd = new XResultData();
rd.addRaw(sbFull.toString());
- XResultDataUI.report(rd,getVerifyTaskName(), Manipulations.RAW_HTML);
+ XResultDataUI.report(rd, getVerifyTaskName(), Manipulations.RAW_HTML);
monitor.worked(calculateWork(0.10));
}
@@ -343,8 +341,8 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation {
@SuppressWarnings("unused")
private void displayUnexpectedRelLinks(LocalRelationLink relationLink) {
- System.out.println("gam_id \t transaction_id \t rel_link_id \t branch_d \t a_art_id \t b_art_id \t deleted_tran \t commit trans \t commit trans mod type");
- System.out.println(relationLink.toString());
+ log("gam_id \t transaction_id \t rel_link_id \t branch_d \t a_art_id \t b_art_id \t deleted_tran \t commit trans \t commit trans mod type");
+ log(relationLink.toString());
}
private boolean isLoadingBrokenRelationsNecessary() {

Back to the top