6f7861b990177d4ad018fc32b81b2b5b73755685
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / CentralApp.java
1 /*-
2  * ============LICENSE_START==========================================
3  * ONAP Portal
4  * ===================================================================
5  * Copyright © 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.openecomp.portalapp.portal.transport;
39
40 import java.util.Arrays;
41 import java.util.Date;
42
43 public class CentralApp {
44         public Long id;
45         public Date created;
46         public Date modified;
47         public Long createdId;
48         public Long modifiedId;
49         public Long rowNum;
50         public String name; // app_name
51         public String imageUrl; // app_image_url
52         public String description; // app_description
53         public String notes; // app_notes
54         public String url; // app_url
55         public String alternateUrl; // app_alternate_url
56         public String restEndpoint; // app_rest_endpoint
57         public String mlAppName; // ml_app_name
58         public String mlAppAdminId; // ml_app_admin_id;
59         public String motsId; // mots_id
60         public String appPassword; // app_password
61         public String open;
62         public String enabled;
63         public byte[] thumbnail;
64         public String username; // app_username
65         public String uebKey; // ueb_key
66         public String uebSecret; // ueb_secret
67         public String uebTopicName; // ueb_topic_name
68
69         public CentralApp(Long id, Date created, Date modified, Long createdId, Long modifiedId, Long rowNum, String name,
70                         String imageUrl, String description, String notes, String url, String alternateUrl, String restEndpoint,
71                         String mlAppName, String mlAppAdminId, String motsId, String appPassword, String open, String enabled,
72                         byte[] thumbnail, String username, String uebKey, String uebSecret, String uebTopicName) {
73                 super();
74                 this.id = id;
75                 this.created = created;
76                 this.modified = modified;
77                 this.createdId = createdId;
78                 this.modifiedId = modifiedId;
79                 this.rowNum = rowNum;
80                 this.name = name;
81                 this.imageUrl = imageUrl;
82                 this.description = description;
83                 this.notes = notes;
84                 this.url = url;
85                 this.alternateUrl = alternateUrl;
86                 this.restEndpoint = restEndpoint;
87                 this.mlAppName = mlAppName;
88                 this.mlAppAdminId = mlAppAdminId;
89                 this.motsId = motsId;
90                 this.appPassword = appPassword;
91                 this.open = open;
92                 this.enabled = enabled;
93                 this.thumbnail = thumbnail;
94                 this.username = username;
95                 this.uebKey = uebKey;
96                 this.uebSecret = uebSecret;
97                 this.uebTopicName = uebTopicName;
98         }
99
100         public Long getId() {
101                 return id;
102         }
103
104         public void setId(Long id) {
105                 this.id = id;
106         }
107
108         public Date getCreated() {
109                 return created;
110         }
111
112         public void setCreated(Date created) {
113                 this.created = created;
114         }
115
116         public Date getModified() {
117                 return modified;
118         }
119
120         public void setModified(Date modified) {
121                 this.modified = modified;
122         }
123
124         public Long getCreatedId() {
125                 return createdId;
126         }
127
128         public void setCreatedId(Long createdId) {
129                 this.createdId = createdId;
130         }
131
132         public Long getModifiedId() {
133                 return modifiedId;
134         }
135
136         public void setModifiedId(Long modifiedId) {
137                 this.modifiedId = modifiedId;
138         }
139
140         public Long getRowNum() {
141                 return rowNum;
142         }
143
144         public void setRowNum(Long rowNum) {
145                 this.rowNum = rowNum;
146         }
147
148         public String getName() {
149                 return name;
150         }
151
152         public void setName(String name) {
153                 this.name = name;
154         }
155
156         public String getImageUrl() {
157                 return imageUrl;
158         }
159
160         public void setImageUrl(String imageUrl) {
161                 this.imageUrl = imageUrl;
162         }
163
164         public String getDescription() {
165                 return description;
166         }
167
168         public void setDescription(String description) {
169                 this.description = description;
170         }
171
172         public String getNotes() {
173                 return notes;
174         }
175
176         public void setNotes(String notes) {
177                 this.notes = notes;
178         }
179
180         public String getUrl() {
181                 return url;
182         }
183
184         public void setUrl(String url) {
185                 this.url = url;
186         }
187
188         public String getAlternateUrl() {
189                 return alternateUrl;
190         }
191
192         public void setAlternateUrl(String alternateUrl) {
193                 this.alternateUrl = alternateUrl;
194         }
195
196         public String getRestEndpoint() {
197                 return restEndpoint;
198         }
199
200         public void setRestEndpoint(String restEndpoint) {
201                 this.restEndpoint = restEndpoint;
202         }
203
204         public String getMlAppName() {
205                 return mlAppName;
206         }
207
208         public void setMlAppName(String mlAppName) {
209                 this.mlAppName = mlAppName;
210         }
211
212         public String getMlAppAdminId() {
213                 return mlAppAdminId;
214         }
215
216         public void setMlAppAdminId(String mlAppAdminId) {
217                 this.mlAppAdminId = mlAppAdminId;
218         }
219
220         public String getMotsId() {
221                 return motsId;
222         }
223
224         public void setMotsId(String motsId) {
225                 this.motsId = motsId;
226         }
227
228         public String getAppPassword() {
229                 return appPassword;
230         }
231
232         public void setAppPassword(String appPassword) {
233                 this.appPassword = appPassword;
234         }
235
236         public String getOpen() {
237                 return open;
238         }
239
240         public void setOpen(String open) {
241                 this.open = open;
242         }
243
244         public String getEnabled() {
245                 return enabled;
246         }
247
248         public void setEnabled(String enabled) {
249                 this.enabled = enabled;
250         }
251
252         public byte[] getThumbnail() {
253                 return thumbnail;
254         }
255
256         public void setThumbnail(byte[] thumbnail) {
257                 this.thumbnail = thumbnail;
258         }
259
260         public String getUsername() {
261                 return username;
262         }
263
264         public void setUsername(String username) {
265                 this.username = username;
266         }
267
268         public String getUebKey() {
269                 return uebKey;
270         }
271
272         public void setUebKey(String uebKey) {
273                 this.uebKey = uebKey;
274         }
275
276         public String getUebSecret() {
277                 return uebSecret;
278         }
279
280         public void setUebSecret(String uebSecret) {
281                 this.uebSecret = uebSecret;
282         }
283
284         public String getUebTopicName() {
285                 return uebTopicName;
286         }
287
288         public void setUebTopicName(String uebTopicName) {
289                 this.uebTopicName = uebTopicName;
290         }
291
292         @Override
293         public int hashCode() {
294                 final int prime = 31;
295                 int result = 1;
296                 result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode());
297                 result = prime * result + ((appPassword == null) ? 0 : appPassword.hashCode());
298                 result = prime * result + ((created == null) ? 0 : created.hashCode());
299                 result = prime * result + ((createdId == null) ? 0 : createdId.hashCode());
300                 result = prime * result + ((description == null) ? 0 : description.hashCode());
301                 result = prime * result + ((enabled == null) ? 0 : enabled.hashCode());
302                 result = prime * result + ((id == null) ? 0 : id.hashCode());
303                 result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
304                 result = prime * result + ((mlAppAdminId == null) ? 0 : mlAppAdminId.hashCode());
305                 result = prime * result + ((mlAppName == null) ? 0 : mlAppName.hashCode());
306                 result = prime * result + ((modified == null) ? 0 : modified.hashCode());
307                 result = prime * result + ((modifiedId == null) ? 0 : modifiedId.hashCode());
308                 result = prime * result + ((motsId == null) ? 0 : motsId.hashCode());
309                 result = prime * result + ((name == null) ? 0 : name.hashCode());
310                 result = prime * result + ((notes == null) ? 0 : notes.hashCode());
311                 result = prime * result + ((open == null) ? 0 : open.hashCode());
312                 result = prime * result + ((restEndpoint == null) ? 0 : restEndpoint.hashCode());
313                 result = prime * result + ((rowNum == null) ? 0 : rowNum.hashCode());
314                 result = prime * result + Arrays.hashCode(thumbnail);
315                 result = prime * result + ((uebKey == null) ? 0 : uebKey.hashCode());
316                 result = prime * result + ((uebSecret == null) ? 0 : uebSecret.hashCode());
317                 result = prime * result + ((uebTopicName == null) ? 0 : uebTopicName.hashCode());
318                 result = prime * result + ((url == null) ? 0 : url.hashCode());
319                 result = prime * result + ((username == null) ? 0 : username.hashCode());
320                 return result;
321         }
322
323         @Override
324         public boolean equals(Object obj) {
325                 if (this == obj)
326                         return true;
327                 if (obj == null)
328                         return false;
329                 if (getClass() != obj.getClass())
330                         return false;
331                 CentralApp other = (CentralApp) obj;
332                 if (alternateUrl == null) {
333                         if (other.alternateUrl != null)
334                                 return false;
335                 } else if (!alternateUrl.equals(other.alternateUrl))
336                         return false;
337                 if (appPassword == null) {
338                         if (other.appPassword != null)
339                                 return false;
340                 } else if (!appPassword.equals(other.appPassword))
341                         return false;
342                 if (created == null) {
343                         if (other.created != null)
344                                 return false;
345                 } else if (!created.equals(other.created))
346                         return false;
347                 if (createdId == null) {
348                         if (other.createdId != null)
349                                 return false;
350                 } else if (!createdId.equals(other.createdId))
351                         return false;
352                 if (description == null) {
353                         if (other.description != null)
354                                 return false;
355                 } else if (!description.equals(other.description))
356                         return false;
357                 if (enabled == null) {
358                         if (other.enabled != null)
359                                 return false;
360                 } else if (!enabled.equals(other.enabled))
361                         return false;
362                 if (id == null) {
363                         if (other.id != null)
364                                 return false;
365                 } else if (!id.equals(other.id))
366                         return false;
367                 if (imageUrl == null) {
368                         if (other.imageUrl != null)
369                                 return false;
370                 } else if (!imageUrl.equals(other.imageUrl))
371                         return false;
372                 if (mlAppAdminId == null) {
373                         if (other.mlAppAdminId != null)
374                                 return false;
375                 } else if (!mlAppAdminId.equals(other.mlAppAdminId))
376                         return false;
377                 if (mlAppName == null) {
378                         if (other.mlAppName != null)
379                                 return false;
380                 } else if (!mlAppName.equals(other.mlAppName))
381                         return false;
382                 if (modified == null) {
383                         if (other.modified != null)
384                                 return false;
385                 } else if (!modified.equals(other.modified))
386                         return false;
387                 if (modifiedId == null) {
388                         if (other.modifiedId != null)
389                                 return false;
390                 } else if (!modifiedId.equals(other.modifiedId))
391                         return false;
392                 if (motsId == null) {
393                         if (other.motsId != null)
394                                 return false;
395                 } else if (!motsId.equals(other.motsId))
396                         return false;
397                 if (name == null) {
398                         if (other.name != null)
399                                 return false;
400                 } else if (!name.equals(other.name))
401                         return false;
402                 if (notes == null) {
403                         if (other.notes != null)
404                                 return false;
405                 } else if (!notes.equals(other.notes))
406                         return false;
407                 if (open == null) {
408                         if (other.open != null)
409                                 return false;
410                 } else if (!open.equals(other.open))
411                         return false;
412                 if (restEndpoint == null) {
413                         if (other.restEndpoint != null)
414                                 return false;
415                 } else if (!restEndpoint.equals(other.restEndpoint))
416                         return false;
417                 if (rowNum == null) {
418                         if (other.rowNum != null)
419                                 return false;
420                 } else if (!rowNum.equals(other.rowNum))
421                         return false;
422                 if (!Arrays.equals(thumbnail, other.thumbnail))
423                         return false;
424                 if (uebKey == null) {
425                         if (other.uebKey != null)
426                                 return false;
427                 } else if (!uebKey.equals(other.uebKey))
428                         return false;
429                 if (uebSecret == null) {
430                         if (other.uebSecret != null)
431                                 return false;
432                 } else if (!uebSecret.equals(other.uebSecret))
433                         return false;
434                 if (uebTopicName == null) {
435                         if (other.uebTopicName != null)
436                                 return false;
437                 } else if (!uebTopicName.equals(other.uebTopicName))
438                         return false;
439                 if (url == null) {
440                         if (other.url != null)
441                                 return false;
442                 } else if (!url.equals(other.url))
443                         return false;
444                 if (username == null) {
445                         if (other.username != null)
446                                 return false;
447                 } else if (!username.equals(other.username))
448                         return false;
449                 return true;
450         }
451
452 }