Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2016-03-02 04:58:11 -0500
committerRyan D. Brooks2016-03-02 04:58:11 -0500
commit640a48c2684153ac0cd054a785cbe136ade0dbab (patch)
tree876d7aea8dc9ec9e4bfbe4f28d39cf01415de563 /plugins/org.eclipse.osee.account.rest.model
parentb4a6440a00ba4adfe1bb26e7c35b1b59a2f31810 (diff)
downloadorg.eclipse.osee-640a48c2684153ac0cd054a785cbe136ade0dbab.tar.gz
org.eclipse.osee-640a48c2684153ac0cd054a785cbe136ade0dbab.tar.xz
org.eclipse.osee-640a48c2684153ac0cd054a785cbe136ade0dbab.zip
refactor[ats_ATS253925]: Change ids in Account from int to Long
Diffstat (limited to 'plugins/org.eclipse.osee.account.rest.model')
-rw-r--r--plugins/org.eclipse.osee.account.rest.model/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountActiveData.java6
-rw-r--r--plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountInfoData.java6
-rw-r--r--plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesData.java6
-rw-r--r--plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountSessionData.java6
-rw-r--r--plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountSessionDetailsData.java6
-rw-r--r--plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupData.java10
-rw-r--r--plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupId.java57
8 files changed, 79 insertions, 21 deletions
diff --git a/plugins/org.eclipse.osee.account.rest.model/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.account.rest.model/META-INF/MANIFEST.MF
index 696765fd75..da189c26f9 100644
--- a/plugins/org.eclipse.osee.account.rest.model/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.account.rest.model/META-INF/MANIFEST.MF
@@ -6,6 +6,7 @@ Bundle-Version: 0.24.0.qualifier
Bundle-Vendor: Eclipse Open System Engineering Environment
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.osee.account.rest.model
-Import-Package: org.eclipse.osee.framework.jdk.core.type,
+Import-Package: org.eclipse.osee.framework.core.data,
+ org.eclipse.osee.framework.jdk.core.type,
org.eclipse.osee.framework.jdk.core.util,
org.json
diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountActiveData.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountActiveData.java
index 5530a80f3d..272bc58f00 100644
--- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountActiveData.java
+++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountActiveData.java
@@ -19,15 +19,15 @@ import org.eclipse.osee.framework.jdk.core.type.Identity;
@XmlRootElement
public class AccountActiveData implements Identity<String> {
- private long accountId;
+ private Long accountId;
private boolean isActive;
private String uuid;
- public long getAccountId() {
+ public Long getAccountId() {
return accountId;
}
- public void setAccountId(long accountId) {
+ public void setAccountId(Long accountId) {
this.accountId = accountId;
}
diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountInfoData.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountInfoData.java
index 4e7b2bd4a3..4d7851615e 100644
--- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountInfoData.java
+++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountInfoData.java
@@ -24,7 +24,7 @@ public class AccountInfoData implements Identity<String> {
private String userName;
private String email;
private String uuid;
- private long accountId;
+ private Long accountId;
private boolean isActive;
private Set<String> roles;
@@ -56,11 +56,11 @@ public class AccountInfoData implements Identity<String> {
this.email = email;
}
- public long getAccountId() {
+ public Long getAccountId() {
return accountId;
}
- public void setAccountId(long accountId) {
+ public void setAccountId(Long accountId) {
this.accountId = accountId;
}
diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesData.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesData.java
index e7ecda77ee..0a89e0f351 100644
--- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesData.java
+++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesData.java
@@ -20,14 +20,14 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class AccountPreferencesData {
- private long id;
+ private Long id;
private Map<String, String> preferences;
- public long getId() {
+ public Long getId() {
return id;
}
- public void setId(long id) {
+ public void setId(Long id) {
this.id = id;
}
diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountSessionData.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountSessionData.java
index 350fae3330..5f546ea08d 100644
--- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountSessionData.java
+++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountSessionData.java
@@ -18,7 +18,7 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class AccountSessionData {
- private long accountId;
+ private Long accountId;
private String token;
public String getToken() {
@@ -29,11 +29,11 @@ public class AccountSessionData {
this.token = token;
}
- public long getAccountId() {
+ public Long getAccountId() {
return accountId;
}
- public void setAccountId(long accountId) {
+ public void setAccountId(Long accountId) {
this.accountId = accountId;
}
diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountSessionDetailsData.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountSessionDetailsData.java
index 3eeb261293..1f46c1ce44 100644
--- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountSessionDetailsData.java
+++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountSessionDetailsData.java
@@ -19,17 +19,17 @@ import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class AccountSessionDetailsData {
- private long accountId;
+ private Long accountId;
private Date createdOn;
private Date lastAccessedOn;
private String accessedFrom;
private String accessDetails;
- public long getAccountId() {
+ public Long getAccountId() {
return accountId;
}
- public void setAccountId(long accountId) {
+ public void setAccountId(Long accountId) {
this.accountId = accountId;
}
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 9de16429f2..0ba12a3fac 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
@@ -22,7 +22,7 @@ public class SubscriptionGroupData implements Identifiable<String> {
private String uuid;
private String name;
- private long id;
+ private SubscriptionGroupId groupId;
@Override
public String getName() {
@@ -42,12 +42,12 @@ public class SubscriptionGroupData implements Identifiable<String> {
this.uuid = uuid;
}
- public long getId() {
- return id;
+ public SubscriptionGroupId getSubscriptionGroupId() {
+ return groupId;
}
- public void setId(long id) {
- this.id = id;
+ public void setSubscriptionGroupId(SubscriptionGroupId id) {
+ this.groupId = id;
}
@Override
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
new file mode 100644
index 0000000000..b03dfdf931
--- /dev/null
+++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/SubscriptionGroupId.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+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;
+
+/**
+ * @author Angel Avila
+ */
+public class SubscriptionGroupId extends NamedIdentity<String> implements ArtifactId {
+
+ 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());
+ }
+}

Back to the top