diff options
author | Ryan D. Brooks | 2016-04-06 20:01:01 +0000 |
---|---|---|
committer | Angel Avila | 2016-04-06 20:01:01 +0000 |
commit | d3dc25a84c538031a7f85c23b209baaf494201fa (patch) | |
tree | c9b9cef3431649ca27ef9a98696318632e1eaa71 /plugins/org.eclipse.osee.orcs.rest.model | |
parent | f492c524fd4fe6f45f8990dd66bd2c6f58b73fd7 (diff) | |
download | org.eclipse.osee-d3dc25a84c538031a7f85c23b209baaf494201fa.tar.gz org.eclipse.osee-d3dc25a84c538031a7f85c23b209baaf494201fa.tar.xz org.eclipse.osee-d3dc25a84c538031a7f85c23b209baaf494201fa.zip |
refactor: Use BranchId for parentBranch
Change-Id: I39280a906d1f39bfd72431a3a941778e29a82824
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.rest.model')
2 files changed, 13 insertions, 16 deletions
diff --git a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/Branch.java b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/Branch.java index 923b13ad868..4f0794c2e34 100644 --- a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/Branch.java +++ b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/Branch.java @@ -11,6 +11,7 @@ package org.eclipse.osee.orcs.rest.model; import javax.xml.bind.annotation.XmlRootElement; +import org.eclipse.osee.framework.core.data.BranchId; import org.eclipse.osee.framework.core.enums.BranchArchivedState; import org.eclipse.osee.framework.core.enums.BranchState; import org.eclipse.osee.framework.core.enums.BranchType; @@ -25,7 +26,7 @@ public class Branch { private long branchUuid; private String name; - private long parentBranchUuid; + private BranchId parentBranch; private int associatedArtifactId = DEFAULT_INT; private int baseTransaction = DEFAULT_INT; @@ -80,16 +81,12 @@ public class Branch { sourceTransaction = sourceTx; } - public long getParentBranchUuid() { - return parentBranchUuid; + public BranchId getParentBranch() { + return parentBranch; } - public void setParentBranchUuid(long parentBranchUuid) { - this.parentBranchUuid = parentBranchUuid; - } - - public boolean hasParentBranchUuid() { - return getParentBranchUuid() > 0; + public void setParentBranch(BranchId parentBranch) { + this.parentBranch = parentBranch; } public BranchArchivedState getArchiveState() { @@ -152,7 +149,7 @@ public class Branch { @Override public String toString() { - return "Branch [branchUuid=" + getBranchUuid() + ", name=" + name + ", parentBranchUuid=" + getParentBranchUuid() + ", associatedArtifactId=" + associatedArtifactId + ", baseTransaction=" + baseTransaction + ", sourceTransaction=" + sourceTransaction + ", archiveState=" + archiveState + ", branchState=" + branchState + ", branchType=" + branchType + ", inheritAccessControl=" + inheritAccessControl + "]"; + return "Branch [branchUuid=" + getBranchUuid() + ", name=" + name + ", parentBranchUuid=" + getParentBranch() + ", associatedArtifactId=" + associatedArtifactId + ", baseTransaction=" + baseTransaction + ", sourceTransaction=" + sourceTransaction + ", archiveState=" + archiveState + ", branchState=" + branchState + ", branchType=" + branchType + ", inheritAccessControl=" + inheritAccessControl + "]"; } } diff --git a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/NewBranch.java b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/NewBranch.java index e54eab06d04..7396ce56312 100644 --- a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/NewBranch.java +++ b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/NewBranch.java @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.core.enums.BranchType; public class NewBranch { private String branchName; - private long parentBranchId; + private BranchId parentBranch; private int associatedArtifactId; private BranchType branchType; @@ -40,8 +40,8 @@ public class NewBranch { return branchName; } - public long getParentBranchId() { - return parentBranchId; + public BranchId getParentBranch() { + return parentBranch; } public int getAssociatedArtifactId() { @@ -80,8 +80,8 @@ public class NewBranch { this.branchName = branchName; } - public void setParentBranchId(long parentBranchId) { - this.parentBranchId = parentBranchId; + public void setParentBranchId(BranchId parentBranch) { + this.parentBranch = parentBranch; } public void setAssociatedArtifactId(int associatedArtifactId) { @@ -118,7 +118,7 @@ public class NewBranch { @Override public String toString() { - return "NewBranch [branchName=" + branchName + ", parentBranchId=" + parentBranchId + ", associatedArtifactId=" + associatedArtifactId + ", branchType=" + branchType + ", authorId=" + authorId + ", sourceTransactionId=" + sourceTransactionId + ", creationComment=" + creationComment + ", mergeAddressingQueryId=" + mergeAddressingQueryId + ", mergeDestinationBranchId=" + mergeDestinationBranchId + ", txCopyBranchType=" + txCopyBranchType + "]"; + return "NewBranch [branchName=" + branchName + ", parentBranchId=" + parentBranch + ", associatedArtifactId=" + associatedArtifactId + ", branchType=" + branchType + ", authorId=" + authorId + ", sourceTransactionId=" + sourceTransactionId + ", creationComment=" + creationComment + ", mergeAddressingQueryId=" + mergeAddressingQueryId + ", mergeDestinationBranchId=" + mergeDestinationBranchId + ", txCopyBranchType=" + txCopyBranchType + "]"; } } |