diff options
author | donald.g.dunne | 2014-04-11 23:22:24 +0000 |
---|---|---|
committer | donald.g.dunne | 2014-04-22 19:20:23 +0000 |
commit | 040fea496b7a84d65e610934f642790f22420077 (patch) | |
tree | c71a0ef84e0ed4450e11565ae26f4b08beed814d /plugins/org.eclipse.osee.framework.database | |
parent | 51a5d09a64684b410a82624dce3645c05a229415 (diff) | |
download | org.eclipse.osee-040fea496b7a84d65e610934f642790f22420077.tar.gz org.eclipse.osee-040fea496b7a84d65e610934f642790f22420077.tar.xz org.eclipse.osee-040fea496b7a84d65e610934f642790f22420077.zip |
feature[ats_ATS19845]: Rename branchId to branchUuid
Change-Id: I51e6a56ae3682c4c19a08e378da07bbc93f20bab
Diffstat (limited to 'plugins/org.eclipse.osee.framework.database')
3 files changed, 22 insertions, 22 deletions
diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/ArtifactJoinQuery.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/ArtifactJoinQuery.java index 4750a3acd77..49c3ea5b551 100644 --- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/ArtifactJoinQuery.java +++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/core/ArtifactJoinQuery.java @@ -22,23 +22,23 @@ public class ArtifactJoinQuery extends AbstractJoinQuery { private final class Entry implements IJoinRow { private final Integer artId; - private final Long branchId; + private final Long branchUuid; private final Integer transactionId; - private Entry(Integer artId, Long branchId, Integer transactionId) { + private Entry(Integer artId, Long branchUuid, Integer transactionId) { this.artId = artId; - this.branchId = branchId; + this.branchUuid = branchUuid; this.transactionId = transactionId; } @Override public Object[] toArray() { - return new Object[] {getQueryId(), getInsertTime(), artId, branchId, transactionId}; + return new Object[] {getQueryId(), getInsertTime(), artId, branchUuid, transactionId}; } @Override public String toString() { - return String.format("art_id=%s, branch_id=%s, transaction_id=%s", artId, branchId, transactionId); + return String.format("art_id=%s, branch_id=%s, transaction_id=%s", artId, branchUuid, transactionId); } @Override @@ -63,11 +63,11 @@ public class ArtifactJoinQuery extends AbstractJoinQuery { } else if (!artId.equals(other.artId)) { return false; } - if (branchId == null) { - if (other.branchId != null) { + if (branchUuid == null) { + if (other.branchUuid != null) { return false; } - } else if (!branchId.equals(other.branchId)) { + } else if (!branchUuid.equals(other.branchUuid)) { return false; } if (transactionId == null) { @@ -86,7 +86,7 @@ public class ArtifactJoinQuery extends AbstractJoinQuery { int result = 1; result = prime * result + getOuterType().hashCode(); result = prime * result + ((artId == null) ? 0 : artId.hashCode()); - result = prime * result + ((branchId == null) ? 0 : branchId.hashCode()); + result = prime * result + ((branchUuid == null) ? 0 : branchUuid.hashCode()); result = prime * result + ((transactionId == null) ? 0 : transactionId.hashCode()); return result; } @@ -101,8 +101,8 @@ public class ArtifactJoinQuery extends AbstractJoinQuery { this.maxJoinSize = maxJoinSize; } - public void add(Integer art_id, Long branchId, Integer transactionId) { - entries.add(new Entry(art_id, branchId, transactionId)); + public void add(Integer art_id, Long branchUuid, Integer transactionId) { + entries.add(new Entry(art_id, branchUuid, transactionId)); if (entries.size() > maxJoinSize) { throw new OseeDataStoreException("Exceeded max artifact join size of [%d]", maxJoinSize); } 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 5d494c3b072..b96356c4997 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 @@ -17,7 +17,7 @@ import org.eclipse.osee.framework.core.enums.TxChange; * @author Ryan D. Brooks */ public final class Address implements Comparable<Address> { - private final long branchId; + private final long branchUuid; private final int itemId; private final int transactionId; private final long gammaId; @@ -27,9 +27,9 @@ public final class Address implements Comparable<Address> { private TxChange correctedTxCurrent; private boolean purge; - public Address(boolean isBaseline, long branchId, int itemId, int transactionId, long gammaId, ModificationType modType, TxChange txCurrent) { + public Address(boolean isBaseline, long branchUuid, int itemId, int transactionId, long gammaId, ModificationType modType, TxChange txCurrent) { super(); - this.branchId = branchId; + this.branchUuid = branchUuid; this.itemId = itemId; this.transactionId = transactionId; this.gammaId = gammaId; @@ -43,7 +43,7 @@ public final class Address implements Comparable<Address> { } public boolean isSimilar(Address other) { - return other != null && other.itemId == itemId && other.branchId == branchId; + return other != null && other.itemId == itemId && other.branchUuid == branchUuid; } public boolean isSameTransaction(Address other) { @@ -92,7 +92,7 @@ public final class Address implements Comparable<Address> { } public long getBranchId() { - return branchId; + return branchUuid; } public int getItemId() { @@ -125,7 +125,7 @@ public final class Address implements Comparable<Address> { @Override public String toString() { - return "Address [branchId=" + branchId + ", gammaId=" + gammaId + ", itemId=" + itemId + ", modType=" + modType + ", transactionId=" + transactionId + ", txCurrent=" + txCurrent + "]"; + return "Address [branchUuid=" + branchUuid + ", gammaId=" + gammaId + ", itemId=" + itemId + ", modType=" + modType + ", transactionId=" + transactionId + ", txCurrent=" + txCurrent + "]"; } @Override diff --git a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/PurgeTransactionOperation.java b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/PurgeTransactionOperation.java index 00203de6c2e..da038ae3dc1 100644 --- a/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/PurgeTransactionOperation.java +++ b/plugins/org.eclipse.osee.framework.database/src/org/eclipse/osee/framework/database/operation/PurgeTransactionOperation.java @@ -163,12 +163,12 @@ public class PurgeTransactionOperation extends AbstractDbTxOperation { String query = String.format(FIND_NEW_TX_CURRENTS, tableName, itemId); for (Entry<Long, IdJoinQuery> entry : affected.entrySet()) { - Long branchId = entry.getKey(); + Long branchUuid = entry.getKey(); IdJoinQuery joinQuery = entry.getValue(); IOseeStatement statement = ConnectionHandler.getStatement(connection); try { - statement.runPreparedQuery(MAX_FETCH, query, joinQuery.getQueryId(), branchId); + statement.runPreparedQuery(MAX_FETCH, query, joinQuery.getQueryId(), branchUuid); int previousItem = -1; while (statement.next()) { int currentItem = statement.getInt("item_id"); @@ -178,7 +178,7 @@ public class PurgeTransactionOperation extends AbstractDbTxOperation { TxChange txCurrent = TxChange.getCurrent(modType); updateData.add(new Object[] { txCurrent.getValue(), - branchId, + branchUuid, statement.getInt("transaction_id"), statement.getLong("gamma_id")}); previousItem = currentItem; @@ -197,11 +197,11 @@ public class PurgeTransactionOperation extends AbstractDbTxOperation { try { for (Object[] bindData : bindDataList) { - Long branchId = (Long) bindData[0]; + Long branchUuid = (Long) bindData[0]; String query = String.format(SELECT_AFFECTED_ITEMS, itemId, itemTable); statement.runPreparedQuery(MAX_FETCH, query, bindData); IdJoinQuery joinId = JoinUtility.createIdJoinQuery(); - items.put(branchId, joinId); + items.put(branchUuid, joinId); while (statement.next()) { Integer id = statement.getInt("item_id"); |