Replace ecomp references
[portal.git] / ecomp-portal-BE-common / src / main / java / org / onap / portalapp / portal / transport / CentralRole.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  * 
37  */
38 package org.onap.portalapp.portal.transport;
39
40 import java.io.Serializable;
41 import java.util.Date;
42 import java.util.SortedSet;
43 import java.util.TreeSet;
44
45 import org.onap.portalsdk.core.domain.RoleFunction;
46
47 public class CentralRole implements Serializable {
48
49         private static final long serialVersionUID = -9210905386086213882L;
50         private Long id;
51         private Date created;
52         private Date modified;
53         private Long createdId;
54         private Long modifiedId;
55         private Long rowNum;
56
57         private String name;
58         private boolean active;
59         private Integer priority;
60
61         private SortedSet<CentralRoleFunction> roleFunctions = new TreeSet<>();
62
63         private SortedSet<CentralRole> childRoles = new TreeSet<>();
64
65         private SortedSet<CentralRole> parentRoles = new TreeSet<>();
66
67         public CentralRole(){
68                 
69         }
70         
71         public CentralRole(Long id, String name, boolean active, Integer priority,
72                         SortedSet<CentralRoleFunction> roleFunctions) {
73                 super();
74                 this.id = id;
75                 this.name = name;
76                 this.active = active;
77                 this.priority = priority;
78                 this.roleFunctions = roleFunctions;
79         }
80         
81         
82
83         public CentralRole(Long id, Date created, Date modified, Long createdId, Long modifiedId, Long rowNum, String name,
84                         boolean active, Integer priority, SortedSet<CentralRoleFunction> roleFunctions,
85                         SortedSet<CentralRole> childRoles, SortedSet<CentralRole> parentRoles) {
86                 super();
87                 this.id = id;
88                 this.created = created;
89                 this.modified = modified;
90                 this.createdId = createdId;
91                 this.modifiedId = modifiedId;
92                 this.rowNum = rowNum;
93                 this.name = name;
94                 this.active = active;
95                 this.priority = priority;
96                 this.roleFunctions = roleFunctions;
97                 this.childRoles = childRoles;
98                 this.parentRoles = parentRoles;
99         }
100
101         /**
102          * @return the id
103          */
104         public Long getId() {
105                 return id;
106         }
107
108         /**
109          * @param id
110          *            the id to set
111          */
112         public void setId(Long id) {
113                 this.id = id;
114         }
115
116         /**
117          * @return the created
118          */
119         public Date getCreated() {
120                 return created;
121         }
122
123         /**
124          * @param created
125          *            the created to set
126          */
127         public void setCreated(Date created) {
128                 this.created = created;
129         }
130
131         /**
132          * @return the modified
133          */
134         public Date getModified() {
135                 return modified;
136         }
137
138         /**
139          * @param modified
140          *            the modified to set
141          */
142         public void setModified(Date modified) {
143                 this.modified = modified;
144         }
145
146         /**
147          * @return the createdId
148          */
149         public Long getCreatedId() {
150                 return createdId;
151         }
152
153         /**
154          * @param createdId
155          *            the createdId to set
156          */
157         public void setCreatedId(Long createdId) {
158                 this.createdId = createdId;
159         }
160
161         /**
162          * @return the modifiedId
163          */
164         public Long getModifiedId() {
165                 return modifiedId;
166         }
167
168         /**
169          * @param modifiedId
170          *            the modifiedId to set
171          */
172         public void setModifiedId(Long modifiedId) {
173                 this.modifiedId = modifiedId;
174         }
175
176         /**
177          * @return the rowNum
178          */
179         public Long getRowNum() {
180                 return rowNum;
181         }
182
183         /**
184          * @param rowNum
185          *            the rowNum to set
186          */
187         public void setRowNum(Long rowNum) {
188                 this.rowNum = rowNum;
189         }
190
191         /**
192          * @return the name
193          */
194         public String getName() {
195                 return name;
196         }
197
198         /**
199          * @param name
200          *            the name to set
201          */
202         public void setName(String name) {
203                 this.name = name;
204         }
205
206         /**
207          * @return the active
208          */
209         public boolean isActive() {
210                 return active;
211         }
212
213         /**
214          * @param active
215          *            the active to set
216          */
217         public void setActive(boolean active) {
218                 this.active = active;
219         }
220
221         /**
222          * @return the priority
223          */
224         public Integer getPriority() {
225                 return priority;
226         }
227
228         /**
229          * @param priority
230          *            the priority to set
231          */
232         public void setPriority(Integer priority) {
233                 this.priority = priority;
234         }
235
236         /**
237          * @return the roleFunctions
238          */
239         public SortedSet<CentralRoleFunction> getRoleFunctions() {
240                 return roleFunctions;
241         }
242
243         /**
244          * @param roleFunctions
245          *            the roleFunctions to set
246          */
247         public void setRoleFunctions(SortedSet<CentralRoleFunction> roleFunctions) {
248                 this.roleFunctions = roleFunctions;
249         }
250
251         /**
252          * @return the childRoles
253          */
254         public SortedSet<CentralRole> getChildRoles() {
255                 return childRoles;
256         }
257
258         /**
259          * @param childRoles
260          *            the childRoles to set
261          */
262         public void setChildRoles(SortedSet<CentralRole> childRoles) {
263                 this.childRoles = childRoles;
264         }
265
266         /**
267          * @return the parentRoles
268          */
269         public SortedSet<CentralRole> getParentRoles() {
270                 return parentRoles;
271         }
272
273         /**
274          * @param parentRoles
275          *            the parentRoles to set
276          */
277         public void setParentRoles(SortedSet<CentralRole> parentRoles) {
278                 this.parentRoles = parentRoles;
279         }
280
281 }