2 * ============LICENSE_START==========================================
4 * ===================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ===================================================================
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
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
26 * https://creativecommons.org/licenses/by/4.0/
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.
34 * ============LICENSE_END============================================
38 package org.onap.portalapp.portal.ecomp.model;
40 import javax.persistence.Entity;
41 import javax.persistence.Id;
43 import org.onap.portalsdk.core.domain.support.DomainVo;
44 import com.fasterxml.jackson.annotation.JsonInclude;
47 * This model of an application catalog entry has some EPApp fields plus
48 * additional fields to indicate access(ible) and select(ed) statuses.
51 @JsonInclude(JsonInclude.Include.NON_NULL)
52 public class AppCatalogItem extends DomainVo {
54 private static final long serialVersionUID = 6619663784935017846L;
59 private String mlAppName;
60 private String imageUrl;
61 private String description;
64 private String alternateUrl;
65 private Boolean restricted;
67 private Boolean access;
68 private Boolean select;
69 private Boolean pending;
75 public void setId(Long id) {
79 public String getName() {
83 public void setName(String name) {
87 public String getMlAppName() {
91 public void setMlAppName(String mlAppName) {
92 this.mlAppName = mlAppName;
95 public String getImageUrl() {
99 public void setImageUrl(String imageUrl) {
100 this.imageUrl = imageUrl;
103 public String getDescription() {
107 public void setDescription(String description) {
108 this.description = description;
111 public String getNotes() {
115 public void setNotes(String notes) {
119 public String getUrl() {
123 public void setUrl(String url) {
127 public String getAlternateUrl() {
131 public void setAlternateUrl(String alternateUrl) {
132 this.alternateUrl = alternateUrl;
135 public Boolean getRestricted() {
139 public void setRestricted(Boolean restricted) {
140 this.restricted = restricted;
143 public Boolean getOpen() {
147 public void setOpen(Boolean open) {
151 public Boolean getAccess() {
155 public void setAccess(Boolean access) {
156 this.access = access;
159 public Boolean getSelect() {
163 public void setSelect(Boolean select) {
164 this.select = select;
167 public Boolean getPending() {
171 public void setPending(Boolean pending) {
172 this.pending = pending;
175 public static long getSerialversionuid() {
176 return serialVersionUID;
180 public String toString() {
181 return "AppCatalogItem [id=" + id + ", name=" + name + ", access=" + access + ", select=" + select
182 + ", pending=" + pending + "]";
186 public int hashCode() {
187 final int prime = 31;
189 result = prime * result + ((access == null) ? 0 : access.hashCode());
190 result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode());
191 result = prime * result + ((description == null) ? 0 : description.hashCode());
192 result = prime * result + ((id == null) ? 0 : id.hashCode());
193 result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
194 result = prime * result + ((name == null) ? 0 : name.hashCode());
195 result = prime * result + ((notes == null) ? 0 : notes.hashCode());
196 result = prime * result + ((open == null) ? 0 : open.hashCode());
197 result = prime * result + ((pending == null) ? 0 : pending.hashCode());
198 result = prime * result + ((restricted == null) ? 0 : restricted.hashCode());
199 result = prime * result + ((select == null) ? 0 : select.hashCode());
200 result = prime * result + ((url == null) ? 0 : url.hashCode());
205 public boolean equals(Object obj) {
210 if (getClass() != obj.getClass())
212 AppCatalogItem other = (AppCatalogItem) obj;
213 if (access == null) {
214 if (other.access != null)
216 } else if (!access.equals(other.access))
218 if (alternateUrl == null) {
219 if (other.alternateUrl != null)
221 } else if (!alternateUrl.equals(other.alternateUrl))
223 if (description == null) {
224 if (other.description != null)
226 } else if (!description.equals(other.description))
229 if (other.id != null)
231 } else if (!id.equals(other.id))
233 if (imageUrl == null) {
234 if (other.imageUrl != null)
236 } else if (!imageUrl.equals(other.imageUrl))
239 if (other.name != null)
241 } else if (!name.equals(other.name))
244 if (other.notes != null)
246 } else if (!notes.equals(other.notes))
249 if (other.open != null)
251 } else if (!open.equals(other.open))
253 if (pending == null) {
254 if (other.pending != null)
256 } else if (!pending.equals(other.pending))
258 if (restricted == null) {
259 if (other.restricted != null)
261 } else if (!restricted.equals(other.restricted))
263 if (select == null) {
264 if (other.select != null)
266 } else if (!select.equals(other.select))
269 if (other.url != null)
271 } else if (!url.equals(other.url))