diff options
author | Dominik Mizyn <d.mizyn@samsung.com> | 2019-07-16 12:12:20 +0200 |
---|---|---|
committer | Dominik Mizyn <d.mizyn@samsung.com> | 2019-07-16 12:12:22 +0200 |
commit | 3c2124f79ba88792211ad019c0535b060cdea2ee (patch) | |
tree | 29aab5358dc2b49610f9d3a8240fe059b431ffeb /ecomp-portal-BE-common/src | |
parent | 73248465fc2867a3dd1a6494afb6b0774c9028f2 (diff) |
ExternalRoleDetails class fix
Sonar errors in ExternalRoleDetails class
Issue-ID: PORTAL-665
Change-Id: I08b19539a4ca154caf8d75f52e3f04ca6ebc1d8f
Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
Diffstat (limited to 'ecomp-portal-BE-common/src')
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/ExternalRoleDetails.java | 67 |
1 files changed, 8 insertions, 59 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/ExternalRoleDetails.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/ExternalRoleDetails.java index e561c8d3..bb902786 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/ExternalRoleDetails.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/ExternalRoleDetails.java @@ -38,78 +38,27 @@ package org.onap.portalapp.portal.domain; import java.util.List; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter +@EqualsAndHashCode public class ExternalRoleDetails implements Comparable { - private String name; private boolean active; private Integer priority; - private Long appId; // used by ONAP only private Long appRoleId; // used by ONAP only - private List<EPAppRoleFunction> perms; - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public boolean isActive() { - return active; - } - - public void setActive(boolean active) { - this.active = active; - } - - public Integer getPriority() { - return priority; - } - - public void setPriority(Integer priority) { - this.priority = priority; - } - - public Long getAppId() { - return appId; - } - - public void setAppId(Long appId) { - this.appId = appId; - } - - public Long getAppRoleId() { - return appRoleId; - } - - public void setAppRoleId(Long appRoleId) { - this.appRoleId = appRoleId; - } - - - - public List<EPAppRoleFunction> getPerms() { - return perms; - } - - public void setPerms(List<EPAppRoleFunction> perms) { - this.perms = perms; - } - @Override public int compareTo(Object obj) { EPRole other = (EPRole)obj; - - String c1 = getName(); - String c2 = other.getName(); - - return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2); + return (this.getName() == null || other.getName() == null) ? 1 : getName().equals(other.getName()) ? 0 : 1; } - + } |