2 * ================================================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ================================================================================
20 package org.openecomp.portalapp.portal.ecomp.model;
22 import javax.persistence.Entity;
23 import javax.persistence.Id;
25 import org.openecomp.portalsdk.core.domain.support.DomainVo;
26 import com.fasterxml.jackson.annotation.JsonInclude;
29 * This model of an application catalog entry has some EPApp fields plus
30 * additional fields to indicate access(ible) and select(ed) statuses.
33 @JsonInclude(JsonInclude.Include.NON_NULL)
34 public class AppCatalogItem extends DomainVo {
36 private static final long serialVersionUID = 6619663784935017846L;
41 private String mlAppName;
42 private String imageUrl;
43 private String description;
46 private String alternateUrl;
47 private Boolean restricted;
49 private Boolean access;
50 private Boolean select;
51 private Boolean pending;
57 public void setId(Long id) {
61 public String getName() {
65 public void setName(String name) {
69 public String getMlAppName() {
73 public void setMlAppName(String mlAppName) {
74 this.mlAppName = mlAppName;
77 public String getImageUrl() {
81 public void setImageUrl(String imageUrl) {
82 this.imageUrl = imageUrl;
85 public String getDescription() {
89 public void setDescription(String description) {
90 this.description = description;
93 public String getNotes() {
97 public void setNotes(String notes) {
101 public String getUrl() {
105 public void setUrl(String url) {
109 public String getAlternateUrl() {
113 public void setAlternateUrl(String alternateUrl) {
114 this.alternateUrl = alternateUrl;
117 public Boolean getRestricted() {
121 public void setRestricted(Boolean restricted) {
122 this.restricted = restricted;
125 public Boolean getOpen() {
129 public void setOpen(Boolean open) {
133 public Boolean getAccess() {
137 public void setAccess(Boolean access) {
138 this.access = access;
141 public Boolean getSelect() {
145 public void setSelect(Boolean select) {
146 this.select = select;
149 public Boolean getPending() {
153 public void setPending(Boolean pending) {
154 this.pending = pending;
157 public static long getSerialversionuid() {
158 return serialVersionUID;
162 public String toString() {
163 return "AppCatalogItem [id=" + id + ", name=" + name + ", access=" + access + ", select=" + select
164 + ", pending=" + pending + "]";
168 public int hashCode() {
169 final int prime = 31;
171 result = prime * result + ((access == null) ? 0 : access.hashCode());
172 result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode());
173 result = prime * result + ((description == null) ? 0 : description.hashCode());
174 result = prime * result + ((id == null) ? 0 : id.hashCode());
175 result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
176 result = prime * result + ((name == null) ? 0 : name.hashCode());
177 result = prime * result + ((notes == null) ? 0 : notes.hashCode());
178 result = prime * result + ((open == null) ? 0 : open.hashCode());
179 result = prime * result + ((pending == null) ? 0 : pending.hashCode());
180 result = prime * result + ((restricted == null) ? 0 : restricted.hashCode());
181 result = prime * result + ((select == null) ? 0 : select.hashCode());
182 result = prime * result + ((url == null) ? 0 : url.hashCode());
187 public boolean equals(Object obj) {
192 if (getClass() != obj.getClass())
194 AppCatalogItem other = (AppCatalogItem) obj;
195 if (access == null) {
196 if (other.access != null)
198 } else if (!access.equals(other.access))
200 if (alternateUrl == null) {
201 if (other.alternateUrl != null)
203 } else if (!alternateUrl.equals(other.alternateUrl))
205 if (description == null) {
206 if (other.description != null)
208 } else if (!description.equals(other.description))
211 if (other.id != null)
213 } else if (!id.equals(other.id))
215 if (imageUrl == null) {
216 if (other.imageUrl != null)
218 } else if (!imageUrl.equals(other.imageUrl))
221 if (other.name != null)
223 } else if (!name.equals(other.name))
226 if (other.notes != null)
228 } else if (!notes.equals(other.notes))
231 if (other.open != null)
233 } else if (!open.equals(other.open))
235 if (pending == null) {
236 if (other.pending != null)
238 } else if (!pending.equals(other.pending))
240 if (restricted == null) {
241 if (other.restricted != null)
243 } else if (!restricted.equals(other.restricted))
245 if (select == null) {
246 if (other.select != null)
248 } else if (!select.equals(other.select))
251 if (other.url != null)
253 } else if (!url.equals(other.url))