Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/BranchId.java')
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/BranchId.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/BranchId.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/BranchId.java
index a5007d841ac..08e4f87afe9 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/BranchId.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/BranchId.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.data;
+import org.codehaus.jackson.annotate.JsonCreator;
import org.eclipse.osee.framework.jdk.core.type.Id;
import org.eclipse.osee.framework.jdk.core.type.Identity;
@@ -28,7 +29,12 @@ public interface BranchId extends Identity<Long>, HasUuid, Id {
return getId();
};
- default Long getBranchId() {
- return getId();
+ public static BranchId valueOf(String id) {
+ return valueOf(Long.valueOf(id));
+ }
+
+ @JsonCreator
+ public static BranchId valueOf(long id) {
+ return TokenFactory.createBranch(id);
}
-}
+} \ No newline at end of file

Back to the top