diff options
author | Kotta, Shireesha (sk434m) <sk434m@att.com> | 2018-03-06 09:44:53 -0500 |
---|---|---|
committer | Kotta, Shireesha (sk434m) <sk434m@att.com> | 2018-03-06 17:43:16 -0500 |
commit | cfb69f44f841338e1f208225ec006388e986bd2c (patch) | |
tree | e8b7e982637a5b27f3383a793fcdcee50f7e0057 /ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompRoleFunction.java | |
parent | 724ff8f8b22d6503ce5070ebc13f6f5fbc48c8cf (diff) |
Added Junits & AAF attributes Support
Issue-ID: PORTAL-136
Includes JUNITS, AAF attributes support
Change-Id: Id4cc9f64268017665d7245d0a10369c9b498ba2f
Signed-off-by: Kotta, Shireesha (sk434m) <sk434m@att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompRoleFunction.java')
-rw-r--r-- | ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompRoleFunction.java | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompRoleFunction.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompRoleFunction.java index 6e108a02..f0ad43e0 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompRoleFunction.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/restful/domain/EcompRoleFunction.java @@ -37,17 +37,11 @@ */ package org.onap.portalsdk.core.restful.domain; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; - -@JsonIgnoreProperties(ignoreUnknown = true) public class EcompRoleFunction implements Comparable<EcompRoleFunction>{ private String name; private String code; - @JsonInclude(JsonInclude.Include.NON_NULL) private String type; - @JsonInclude(JsonInclude.Include.NON_NULL) private String action; @@ -75,10 +69,19 @@ public class EcompRoleFunction implements Comparable<EcompRoleFunction>{ public void setAction(String action) { this.action = action; } + @Override public int compareTo(EcompRoleFunction arg0) { - return this.getCode().compareTo(arg0.getCode()); + int result = this.code.compareTo(arg0.getCode()); + if (result == 0) { + result = this.name.compareTo(arg0.getName()); + } + if (result == 0) { + result = this.type.compareTo(arg0.getType()); + } + if (result == 0) { + result = this.action.compareTo(arg0.getAction()); + } + return result; } - } - |