Deliver centralized role management feature
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / domain / CentralRoleFunction.java
1 package org.openecomp.portalapp.portal.domain;
2
3 import org.openecomp.portalsdk.core.domain.support.DomainVo;
4
5 import com.fasterxml.jackson.annotation.JsonIgnore;
6
7 @SuppressWarnings("rawtypes")
8 public class CentralRoleFunction extends DomainVo implements java.io.Serializable, Comparable{
9         
10            /**
11          * 
12          */
13         private static final long serialVersionUID = -4018975640065252688L;
14            private String code;
15            private String name;
16            @JsonIgnore
17            private Long appId;
18            @JsonIgnore
19            private Long roleId;
20            private String editUrl;
21            
22            
23         public CentralRoleFunction() {
24         
25         }
26         
27         
28         public CentralRoleFunction(Long id, String code, String name, Long appId, String editUrl) {
29                 super();
30                 this.id = id;
31                 this.code = code;
32                 this.name = name;
33                 this.appId = appId;
34                 this.editUrl = editUrl;
35         }
36
37         public CentralRoleFunction(String code, String name) {
38                 super();
39                 this.code = code;
40                 this.name = name;
41         }
42
43         /**
44          * @return the code
45          */
46         public String getCode() {
47                 return code;
48         }
49         /**
50          * @param code the code to set
51          */
52         public void setCode(String code) {
53                 this.code = code;
54         }
55         /**
56          * @return the name
57          */
58         public String getName() {
59                 return name;
60         }
61         /**
62          * @param name the name to set
63          */
64         public void setName(String name) {
65                 this.name = name;
66         }
67         /**
68          * @return the appId
69          */
70         public Long getAppId() {
71                 return appId;
72         }
73         /**
74          * @param appId the appId to set
75          */
76         public void setAppId(Long appId) {
77                 this.appId = appId;
78         }
79         /**
80          * @return the editUrl
81          */
82         public String getEditUrl() {
83                 return editUrl;
84         }
85         /**
86          * @param editUrl the editUrl to set
87          */
88         public void setEditUrl(String editUrl) {
89                 this.editUrl = editUrl;
90         }
91     public int compareTo(Object obj){
92         String c1 = getName();
93         String c2 = ((CentralRoleFunction)obj).getName();
94
95         return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
96       }
97         
98         
99    
100 }