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