Rev 31568 | Rev 31571 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.dtr;import java.io.Serializable;import java.util.List;import java.util.Objects;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.EnumType;import javax.persistence.Enumerated;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.Table;import javax.persistence.Transient;import com.fasterxml.jackson.annotation.JsonProperty;import com.spice.profitmandi.dao.enumuration.dtr.WebListingSource;import com.spice.profitmandi.dao.enumuration.dtr.WebListingType;import com.spice.profitmandi.service.inventory.FofoCatalogResponse;@Entity@Table(name = "dtr.web_listing", schema = "dtr")public class WebListing implements Serializable {private static final long serialVersionUID = 1L;@Id@Column(name = "id", columnDefinition = "int(10) unsigned")@GeneratedValue(strategy = GenerationType.IDENTITY)@JsonProperty(defaultValue = "0")private int id;@Columnprivate String title;@Column@JsonProperty(defaultValue = "0")private int rank;@Columnprivate String url;@Columnprivate String bannerUrl;@Columnprivate String headerUrl;@Column@JsonProperty(defaultValue = "true")private boolean active = true;@Column@Enumerated(EnumType.STRING)private WebListingSource targetSource;@Column@Enumerated(EnumType.STRING)private WebListingType type;@Columnprivate String solrQuery;@Transientprivate List<FofoCatalogResponse> fofoCatalogResponses;public String getBannerUrl() {return bannerUrl;}public WebListingSource getTargetSource() {return targetSource;}public void setTargetSource(WebListingSource targetSource) {this.targetSource = targetSource;}public void setBannerUrl(String bannerUrl) {this.bannerUrl = bannerUrl;}public int getId() {return id;}public void setId(int id) {this.id = id;}public String getTitle() {return title;}public void setTitle(String title) {this.title = title;}public int getRank() {return rank;}public void setRank(int rank) {this.rank = rank;}public boolean isActive() {return active;}public WebListingType getType() {return type;}public void setType(WebListingType type) {this.type = type;}public void setActive(boolean active) {this.active = active;}public String getUrl() {return url;}public void setUrl(String url) {this.url = url;}public String getHeaderUrl() {return headerUrl;}public void setHeaderUrl(String headerUrl) {this.headerUrl = headerUrl;}@Overridepublic String toString() {return "WebListing [id=" + id + ", title=" + title + ", rank=" + rank + ", url=" + url + ", bannerUrl="+ bannerUrl + ", headerUrl=" + headerUrl + ", active=" + active + ", targetSource=" + targetSource+ ", type=" + type + ", solrQuery=" + solrQuery + "]";}@Overridepublic int hashCode() {return Objects.hash(active, bannerUrl, headerUrl, id, rank, solrQuery, targetSource, title, type, url);}public List<FofoCatalogResponse> getFofoCatalogResponses() {return fofoCatalogResponses;}public void setFofoCatalogResponses(List<FofoCatalogResponse> fofoCatalogResponses) {this.fofoCatalogResponses = fofoCatalogResponses;}@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;WebListing other = (WebListing) obj;return active == other.active && Objects.equals(bannerUrl, other.bannerUrl)&& Objects.equals(headerUrl, other.headerUrl) && id == other.id && rank == other.rank&& Objects.equals(solrQuery, other.solrQuery) && targetSource == other.targetSource&& Objects.equals(title, other.title) && type == other.type && Objects.equals(url, other.url);}}