05c87ba65064274935ec129ac7d8c48d7fa02ee2
[portal.git] / ecomp-portal-BE-common / src / main / java / org / onap / portalapp / portal / domain / CentralV2RoleFunction.java
1 /*-
2  * ============LICENSE_START==========================================
3  * ONAP Portal
4  * ===================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ===================================================================
7  *
8  * Unless otherwise specified, all software contained herein is licensed
9  * under the Apache License, Version 2.0 (the "License");
10  * you may not use this software except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *             http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Unless otherwise specified, all documentation contained herein is licensed
22  * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23  * you may not use this documentation except in compliance with the License.
24  * You may obtain a copy of the License at
25  *
26  *             https://creativecommons.org/licenses/by/4.0/
27  *
28  * Unless required by applicable law or agreed to in writing, documentation
29  * distributed under the License is distributed on an "AS IS" BASIS,
30  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  * See the License for the specific language governing permissions and
32  * limitations under the License.
33  *
34  * ============LICENSE_END============================================
35  *
36  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
37  */
38 package org.onap.portalapp.portal.domain;
39
40 import java.io.Serializable;
41
42 import org.onap.portalsdk.core.domain.support.DomainVo;
43
44 import com.fasterxml.jackson.annotation.JsonIgnore;
45  
46 @SuppressWarnings("rawtypes")
47 public class CentralV2RoleFunction extends DomainVo implements Serializable, Comparable{
48         
49            /**
50          * 
51          */
52         private static final long serialVersionUID = -4018975640065252688L;
53            private String code;
54            private String name;
55            @JsonIgnore
56            private Long appId;
57            @JsonIgnore
58            private Long roleId;
59            private String type;
60            private String action;
61            private String editUrl;
62            
63            
64         public CentralV2RoleFunction() {
65         
66         }
67         
68         
69         public CentralV2RoleFunction(Long id, String code, String name, Long appId, String type, String action,String editUrl) {
70                 super();
71                 this.id = id;
72                 this.code = code;
73                 this.name = name;
74                 this.appId = appId;
75                 this.type = type;
76                 this.action = action;
77                 this.editUrl = editUrl;
78         }
79         
80         public CentralV2RoleFunction(Long id, String code, String name, Long appId,String editUrl) {
81                 super();
82                 this.id = id;
83                 this.code = code;
84                 this.name = name;
85                 this.appId = appId;
86                 this.editUrl = editUrl;
87         }
88         
89         
90
91         public CentralV2RoleFunction(String code, String name) {
92                 super();
93                 this.code = code;
94                 this.name = name;
95         }
96
97         /**
98          * @return the code
99          */
100         public String getCode() {
101                 return code;
102         }
103         /**
104          * @param code the code to set
105          */
106         public void setCode(String code) {
107                 this.code = code;
108         }
109         /**
110          * @return the name
111          */
112         public String getName() {
113                 return name;
114         }
115         /**
116          * @param name the name to set
117          */
118         public void setName(String name) {
119                 this.name = name;
120         }
121         /**
122          * @return the appId
123          */
124         public Long getAppId() {
125                 return appId;
126         }
127         /**
128          * @param appId the appId to set
129          */
130         public void setAppId(Long appId) {
131                 this.appId = appId;
132         }
133         /**
134          * @return the editUrl
135          */
136         public String getEditUrl() {
137                 return editUrl;
138         }
139         /**
140          * @param editUrl the editUrl to set
141          */
142         public void setEditUrl(String editUrl) {
143                 this.editUrl = editUrl;
144         }
145         
146         
147     /**
148          * @return the type
149          */
150         public String getType() {
151                 return type;
152         }
153
154
155         /**
156          * @param type the type to set
157          */
158         public void setType(String type) {
159                 this.type = type;
160         }
161
162
163         /**
164          * @return the action
165          */
166         public String getAction() {
167                 return action;
168         }
169
170
171         /**
172          * @param action the action to set
173          */
174         public void setAction(String action) {
175                 this.action = action;
176         }
177
178
179         public int compareTo(Object obj){
180         String c1 = getName();
181         String c2 = ((CentralV2RoleFunction)obj).getName();
182
183         return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
184       }
185         
186         
187    
188 }