X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportalapp%2Fportal%2Fdomain%2FExternalRoleDetails.java;h=bb9027867d90131141cdc0b6f1f7b8b35db5daac;hb=3c2124f79ba88792211ad019c0535b060cdea2ee;hp=6c8a548a3536aa005bdf0922f5d16015b5911c38;hpb=21a8761f684745bb300e075c7e98ad897ace9eed;p=portal.git 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 6c8a548a..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 @@ -33,83 +33,32 @@ * * ============LICENSE_END============================================ * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. + * */ 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 ECOMP only - private Long appRoleId; // used by ECOMP only - + private Long appId; // used by ONAP only + private Long appRoleId; // used by ONAP only private List 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 getPerms() { - return perms; - } - - public void setPerms(List 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; } - + }