X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fportalapp%2Fportal%2Fecomp%2Fmodel%2FAppCatalogItem.java;h=9cce4c0fe1828f197bc35b668474855ccdd79bd1;hb=627badaf69987c01811c477219fd943757a635f5;hp=ec20b4f3702deb2f87b81b3dc78c10eb83e2dc4b;hpb=ba838f2e13f1e8050c75e68bd3733d56d8f416d5;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCatalogItem.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCatalogItem.java index ec20b4f3..9cce4c0f 100644 --- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCatalogItem.java +++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCatalogItem.java @@ -1,249 +1,258 @@ -/*- - * ================================================================================ - * ECOMP Portal - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ================================================================================ - */ -package org.openecomp.portalapp.portal.ecomp.model; - -import javax.persistence.Entity; -import javax.persistence.Id; - -import org.openecomp.portalsdk.core.domain.support.DomainVo; -import com.fasterxml.jackson.annotation.JsonInclude; - -/** - * This model of an application catalog entry has some EPApp fields plus - * additional fields to indicate access(ible) and select(ed) statuses. - */ -@Entity -@JsonInclude(JsonInclude.Include.NON_NULL) -public class AppCatalogItem extends DomainVo { - - private static final long serialVersionUID = 6619663784935017846L; - - @Id - private Long id; - private String name; - private String imageUrl; - private String description; - private String notes; - private String url; - private String alternateUrl; - private Boolean restricted; - private Boolean open; - private Boolean access; - private Boolean select; - private Boolean pending; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getImageUrl() { - return imageUrl; - } - - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getNotes() { - return notes; - } - - public void setNotes(String notes) { - this.notes = notes; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getAlternateUrl() { - return alternateUrl; - } - - public void setAlternateUrl(String alternateUrl) { - this.alternateUrl = alternateUrl; - } - - public Boolean getRestricted() { - return restricted; - } - - public void setRestricted(Boolean restricted) { - this.restricted = restricted; - } - - public Boolean getOpen() { - return open; - } - - public void setOpen(Boolean open) { - this.open = open; - } - - public Boolean getAccess() { - return access; - } - - public void setAccess(Boolean access) { - this.access = access; - } - - public Boolean getSelect() { - return select; - } - - public void setSelect(Boolean select) { - this.select = select; - } - - public Boolean getPending() { - return pending; - } - - public void setPending(Boolean pending) { - this.pending = pending; - } - - public static long getSerialversionuid() { - return serialVersionUID; - } - - @Override - public String toString() { - return "AppCatalogItem [id=" + id + ", name=" + name + ", access=" + access + ", select=" + select - + ", pending=" + pending + "]"; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((access == null) ? 0 : access.hashCode()); - result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode()); - result = prime * result + ((description == null) ? 0 : description.hashCode()); - result = prime * result + ((id == null) ? 0 : id.hashCode()); - result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode()); - result = prime * result + ((name == null) ? 0 : name.hashCode()); - result = prime * result + ((notes == null) ? 0 : notes.hashCode()); - result = prime * result + ((open == null) ? 0 : open.hashCode()); - result = prime * result + ((pending == null) ? 0 : pending.hashCode()); - result = prime * result + ((restricted == null) ? 0 : restricted.hashCode()); - result = prime * result + ((select == null) ? 0 : select.hashCode()); - result = prime * result + ((url == null) ? 0 : url.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - AppCatalogItem other = (AppCatalogItem) obj; - if (access == null) { - if (other.access != null) - return false; - } else if (!access.equals(other.access)) - return false; - if (alternateUrl == null) { - if (other.alternateUrl != null) - return false; - } else if (!alternateUrl.equals(other.alternateUrl)) - return false; - if (description == null) { - if (other.description != null) - return false; - } else if (!description.equals(other.description)) - return false; - if (id == null) { - if (other.id != null) - return false; - } else if (!id.equals(other.id)) - return false; - if (imageUrl == null) { - if (other.imageUrl != null) - return false; - } else if (!imageUrl.equals(other.imageUrl)) - return false; - if (name == null) { - if (other.name != null) - return false; - } else if (!name.equals(other.name)) - return false; - if (notes == null) { - if (other.notes != null) - return false; - } else if (!notes.equals(other.notes)) - return false; - if (open == null) { - if (other.open != null) - return false; - } else if (!open.equals(other.open)) - return false; - if (pending == null) { - if (other.pending != null) - return false; - } else if (!pending.equals(other.pending)) - return false; - if (restricted == null) { - if (other.restricted != null) - return false; - } else if (!restricted.equals(other.restricted)) - return false; - if (select == null) { - if (other.select != null) - return false; - } else if (!select.equals(other.select)) - return false; - if (url == null) { - if (other.url != null) - return false; - } else if (!url.equals(other.url)) - return false; - return true; - } - -} +/*- + * ================================================================================ + * ECOMP Portal + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +package org.openecomp.portalapp.portal.ecomp.model; + +import javax.persistence.Entity; +import javax.persistence.Id; + +import org.openecomp.portalsdk.core.domain.support.DomainVo; +import com.fasterxml.jackson.annotation.JsonInclude; + +/** + * This model of an application catalog entry has some EPApp fields plus + * additional fields to indicate access(ible) and select(ed) statuses. + */ +@Entity +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AppCatalogItem extends DomainVo { + + private static final long serialVersionUID = 6619663784935017846L; + + @Id + private Long id; + private String name; + private String mlAppName; + private String imageUrl; + private String description; + private String notes; + private String url; + private String alternateUrl; + private Boolean restricted; + private Boolean open; + private Boolean access; + private Boolean select; + private Boolean pending; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getMlAppName() { + return mlAppName; + } + + public void setMlAppName(String mlAppName) { + this.mlAppName = mlAppName; + } + + public String getImageUrl() { + return imageUrl; + } + + public void setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getAlternateUrl() { + return alternateUrl; + } + + public void setAlternateUrl(String alternateUrl) { + this.alternateUrl = alternateUrl; + } + + public Boolean getRestricted() { + return restricted; + } + + public void setRestricted(Boolean restricted) { + this.restricted = restricted; + } + + public Boolean getOpen() { + return open; + } + + public void setOpen(Boolean open) { + this.open = open; + } + + public Boolean getAccess() { + return access; + } + + public void setAccess(Boolean access) { + this.access = access; + } + + public Boolean getSelect() { + return select; + } + + public void setSelect(Boolean select) { + this.select = select; + } + + public Boolean getPending() { + return pending; + } + + public void setPending(Boolean pending) { + this.pending = pending; + } + + public static long getSerialversionuid() { + return serialVersionUID; + } + + @Override + public String toString() { + return "AppCatalogItem [id=" + id + ", name=" + name + ", access=" + access + ", select=" + select + + ", pending=" + pending + "]"; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((access == null) ? 0 : access.hashCode()); + result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode()); + result = prime * result + ((description == null) ? 0 : description.hashCode()); + result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode()); + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + ((notes == null) ? 0 : notes.hashCode()); + result = prime * result + ((open == null) ? 0 : open.hashCode()); + result = prime * result + ((pending == null) ? 0 : pending.hashCode()); + result = prime * result + ((restricted == null) ? 0 : restricted.hashCode()); + result = prime * result + ((select == null) ? 0 : select.hashCode()); + result = prime * result + ((url == null) ? 0 : url.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + AppCatalogItem other = (AppCatalogItem) obj; + if (access == null) { + if (other.access != null) + return false; + } else if (!access.equals(other.access)) + return false; + if (alternateUrl == null) { + if (other.alternateUrl != null) + return false; + } else if (!alternateUrl.equals(other.alternateUrl)) + return false; + if (description == null) { + if (other.description != null) + return false; + } else if (!description.equals(other.description)) + return false; + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) + return false; + if (imageUrl == null) { + if (other.imageUrl != null) + return false; + } else if (!imageUrl.equals(other.imageUrl)) + return false; + if (name == null) { + if (other.name != null) + return false; + } else if (!name.equals(other.name)) + return false; + if (notes == null) { + if (other.notes != null) + return false; + } else if (!notes.equals(other.notes)) + return false; + if (open == null) { + if (other.open != null) + return false; + } else if (!open.equals(other.open)) + return false; + if (pending == null) { + if (other.pending != null) + return false; + } else if (!pending.equals(other.pending)) + return false; + if (restricted == null) { + if (other.restricted != null) + return false; + } else if (!restricted.equals(other.restricted)) + return false; + if (select == null) { + if (other.select != null) + return false; + } else if (!select.equals(other.select)) + return false; + if (url == null) { + if (other.url != null) + return false; + } else if (!url.equals(other.url)) + return false; + return true; + } + +}