Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2016-07-02 18:16:14 -0400
committerRyan D. Brooks2016-07-12 12:21:10 -0400
commit45b28b0508c364098cfcdb3892951c21c36acc6e (patch)
treef785484ed27e846d548e7d13895bc05d56bf37dd /plugins/org.eclipse.osee.account.rest.model
parentfc9d7c9e9f4b99af674b3591224cc7a8615e322e (diff)
downloadorg.eclipse.osee-45b28b0508c364098cfcdb3892951c21c36acc6e.tar.gz
org.eclipse.osee-45b28b0508c364098cfcdb3892951c21c36acc6e.tar.xz
org.eclipse.osee-45b28b0508c364098cfcdb3892951c21c36acc6e.zip
refactor: Extend ArtifactId from Id
Diffstat (limited to 'plugins/org.eclipse.osee.account.rest.model')
-rw-r--r--plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupData.java8
-rw-r--r--plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupId.java44
2 files changed, 12 insertions, 40 deletions
diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupData.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupData.java
index 0ba12a3fac..b65ec2ff86 100644
--- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupData.java
+++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupData.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.account.rest.model;
import javax.xml.bind.annotation.XmlRootElement;
+import org.eclipse.osee.framework.jdk.core.type.Id;
import org.eclipse.osee.framework.jdk.core.type.Identifiable;
import org.eclipse.osee.framework.jdk.core.type.Identity;
@@ -18,7 +19,7 @@ import org.eclipse.osee.framework.jdk.core.type.Identity;
* @author Roberto E. Escobar
*/
@XmlRootElement
-public class SubscriptionGroupData implements Identifiable<String> {
+public class SubscriptionGroupData implements Identifiable<String>, Id {
private String uuid;
private String name;
@@ -56,6 +57,11 @@ public class SubscriptionGroupData implements Identifiable<String> {
}
@Override
+ public Long getId() {
+ return null;
+ }
+
+ @Override
public boolean equals(Object obj) {
boolean equal = false;
if (obj instanceof Identity) {
diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupId.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupId.java
index b03dfdf931..3b2d214e8e 100644
--- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupId.java
+++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupId.java
@@ -10,48 +10,14 @@
*******************************************************************************/
package org.eclipse.osee.account.rest.model;
-import org.eclipse.osee.framework.core.data.ArtifactId;
-import org.eclipse.osee.framework.jdk.core.type.Named;
-import org.eclipse.osee.framework.jdk.core.type.NamedIdentity;
+import org.eclipse.osee.framework.jdk.core.type.NamedId;
/**
* @author Angel Avila
*/
-public class SubscriptionGroupId extends NamedIdentity<String> implements ArtifactId {
+public class SubscriptionGroupId extends NamedId {
- private final Long uuid;
-
- public SubscriptionGroupId(Long uuid) {
- super(null, String.valueOf(uuid));
- this.uuid = uuid;
- }
-
- @Override
- public Long getUuid() {
- return uuid;
- }
-
- @Override
- public boolean equals(Object other) {
- boolean toReturn = false;
- if (other instanceof SubscriptionGroupId) {
- toReturn = this.getUuid().equals(((SubscriptionGroupId) other).getUuid());
- }
- return toReturn;
- }
-
- @Override
- public int hashCode() {
- return getUuid().hashCode();
- }
-
- @Override
- public int compareTo(Named arg0) {
- return getName().compareTo(arg0.getName());
- }
-
- @Override
- public String toStringWithId() {
- return String.format("[%s][%s]", getName(), getUuid());
+ public SubscriptionGroupId(Long id) {
+ super(id, String.valueOf(id));
}
-}
+} \ No newline at end of file

Back to the top