diff options
author | 2020-09-18 13:30:32 +0530 | |
---|---|---|
committer | 2020-09-18 13:31:49 +0530 | |
commit | f951915573eebe953317fe3d077857a80b422a6f (patch) | |
tree | d016d63776bf3e77783963b6c2571ff6cd2bb8d3 /ecomp-portal-BE-common/src/main/java/org | |
parent | ce34d843f7e16ecddc839ee9976b4652bfdde571 (diff) |
Updated DB scrip and EPUesrApp
Updated DB scrip and EPUesrApp
Issue-ID: PORTAL-1012
Change-Id: If8385754583e29c57fceb466d3eeaf6edc601920
Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org')
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUserApp.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUserApp.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUserApp.java index d644c998..2b23568f 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUserApp.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/domain/EPUserApp.java @@ -116,8 +116,7 @@ public class EPUserApp extends DomainVo implements java.io.Serializable, Compara return (otherUserIdIsSameAsThisUserId(castOther)) && (otherAppIdIsSameAsThis(castOther)) - && (otherRoleIsSameAsThis(castOther)) - && (otherPriorityIsSameAsThis(castOther)); + && (otherRoleIsSameAsThis(castOther)); } public int hashCode() { @@ -126,22 +125,18 @@ public class EPUserApp extends DomainVo implements java.io.Serializable, Compara result = 37 * result + (int) (this.getUserId()==null ? 0 : this.getUserId().intValue()); result = 37 * result + (int) (this.getApp().getId()==null ? 0 : this.getApp().getId().intValue()); result = 37 * result + (int) (this.getRole().getId()==null ? 0 : this.getRole().getId().intValue()); - result = 37 * result + (int) (this.priority==null ? 0 : this.priority); return result; } public int compareTo(Object other){ EPUserApp castOther = (EPUserApp) other; - Long c1 = (this.getUserId()==null ? 0 : this.getUserId()) + (this.getApp()==null||this.getApp().getId()==null ? 0 : this.getApp().getId()) + (this.getRole()==null||this.getRole().getId()==null ? 0 : this.getRole().getId()) + (this.priority==null ? 0 : this.priority); - Long c2 = (castOther.getUserId()==null ? 0 : castOther.getUserId()) + (castOther.getApp()==null||castOther.getApp().getId()==null ? 0 : castOther.getApp().getId()) + (castOther.getRole()==null||castOther.getRole().getId()==null ? 0 : castOther.getRole().getId()) + (castOther.priority==null ? 0 : castOther.priority); + Long c1 = (this.getUserId()==null ? 0 : this.getUserId()) + (this.getApp()==null||this.getApp().getId()==null ? 0 : this.getApp().getId()) + (this.getRole()==null||this.getRole().getId()==null ? 0 : this.getRole().getId()); + Long c2 = (castOther.getUserId()==null ? 0 : castOther.getUserId()) + (castOther.getApp()==null||castOther.getApp().getId()==null ? 0 : castOther.getApp().getId()) + (castOther.getRole()==null||castOther.getRole().getId()==null ? 0 : castOther.getRole().getId()); return c1.compareTo(c2); } - private boolean otherPriorityIsSameAsThis(EPUserApp other){ - return (this.priority==null && other.getPriority()==null) || this.getPriority().equals(other.getPriority()); - } - + private boolean otherRoleIsSameAsThis(EPUserApp other){ return this.getRole().getId().equals(other.getRole().getId()); } |