2 * ================================================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ================================================================================
\r
20 package org.openecomp.portalapp.portal.ecomp.model;
\r
22 import javax.persistence.Entity;
\r
23 import javax.persistence.Id;
\r
25 import org.openecomp.portalsdk.core.domain.support.DomainVo;
\r
26 import com.fasterxml.jackson.annotation.JsonInclude;
\r
29 * This model of an application catalog entry has some EPApp fields plus
\r
30 * additional fields to indicate access(ible) and select(ed) statuses.
\r
33 @JsonInclude(JsonInclude.Include.NON_NULL)
\r
34 public class AppCatalogItem extends DomainVo {
\r
36 private static final long serialVersionUID = 6619663784935017846L;
\r
40 private String name;
\r
41 private String imageUrl;
\r
42 private String description;
\r
43 private String notes;
\r
45 private String alternateUrl;
\r
46 private Boolean restricted;
\r
47 private Boolean open;
\r
48 private Boolean access;
\r
49 private Boolean select;
\r
50 private Boolean pending;
\r
52 public Long getId() {
\r
56 public void setId(Long id) {
\r
60 public String getName() {
\r
64 public void setName(String name) {
\r
68 public String getImageUrl() {
\r
72 public void setImageUrl(String imageUrl) {
\r
73 this.imageUrl = imageUrl;
\r
76 public String getDescription() {
\r
80 public void setDescription(String description) {
\r
81 this.description = description;
\r
84 public String getNotes() {
\r
88 public void setNotes(String notes) {
\r
92 public String getUrl() {
\r
96 public void setUrl(String url) {
\r
100 public String getAlternateUrl() {
\r
101 return alternateUrl;
\r
104 public void setAlternateUrl(String alternateUrl) {
\r
105 this.alternateUrl = alternateUrl;
\r
108 public Boolean getRestricted() {
\r
112 public void setRestricted(Boolean restricted) {
\r
113 this.restricted = restricted;
\r
116 public Boolean getOpen() {
\r
120 public void setOpen(Boolean open) {
\r
124 public Boolean getAccess() {
\r
128 public void setAccess(Boolean access) {
\r
129 this.access = access;
\r
132 public Boolean getSelect() {
\r
136 public void setSelect(Boolean select) {
\r
137 this.select = select;
\r
140 public Boolean getPending() {
\r
144 public void setPending(Boolean pending) {
\r
145 this.pending = pending;
\r
148 public static long getSerialversionuid() {
\r
149 return serialVersionUID;
\r
153 public String toString() {
\r
154 return "AppCatalogItem [id=" + id + ", name=" + name + ", access=" + access + ", select=" + select
\r
155 + ", pending=" + pending + "]";
\r
159 public int hashCode() {
\r
160 final int prime = 31;
\r
162 result = prime * result + ((access == null) ? 0 : access.hashCode());
\r
163 result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode());
\r
164 result = prime * result + ((description == null) ? 0 : description.hashCode());
\r
165 result = prime * result + ((id == null) ? 0 : id.hashCode());
\r
166 result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
\r
167 result = prime * result + ((name == null) ? 0 : name.hashCode());
\r
168 result = prime * result + ((notes == null) ? 0 : notes.hashCode());
\r
169 result = prime * result + ((open == null) ? 0 : open.hashCode());
\r
170 result = prime * result + ((pending == null) ? 0 : pending.hashCode());
\r
171 result = prime * result + ((restricted == null) ? 0 : restricted.hashCode());
\r
172 result = prime * result + ((select == null) ? 0 : select.hashCode());
\r
173 result = prime * result + ((url == null) ? 0 : url.hashCode());
\r
178 public boolean equals(Object obj) {
\r
183 if (getClass() != obj.getClass())
\r
185 AppCatalogItem other = (AppCatalogItem) obj;
\r
186 if (access == null) {
\r
187 if (other.access != null)
\r
189 } else if (!access.equals(other.access))
\r
191 if (alternateUrl == null) {
\r
192 if (other.alternateUrl != null)
\r
194 } else if (!alternateUrl.equals(other.alternateUrl))
\r
196 if (description == null) {
\r
197 if (other.description != null)
\r
199 } else if (!description.equals(other.description))
\r
202 if (other.id != null)
\r
204 } else if (!id.equals(other.id))
\r
206 if (imageUrl == null) {
\r
207 if (other.imageUrl != null)
\r
209 } else if (!imageUrl.equals(other.imageUrl))
\r
211 if (name == null) {
\r
212 if (other.name != null)
\r
214 } else if (!name.equals(other.name))
\r
216 if (notes == null) {
\r
217 if (other.notes != null)
\r
219 } else if (!notes.equals(other.notes))
\r
221 if (open == null) {
\r
222 if (other.open != null)
\r
224 } else if (!open.equals(other.open))
\r
226 if (pending == null) {
\r
227 if (other.pending != null)
\r
229 } else if (!pending.equals(other.pending))
\r
231 if (restricted == null) {
\r
232 if (other.restricted != null)
\r
234 } else if (!restricted.equals(other.restricted))
\r
236 if (select == null) {
\r
237 if (other.select != null)
\r
239 } else if (!select.equals(other.select))
\r
242 if (other.url != null)
\r
244 } else if (!url.equals(other.url))
\r