Subversion Repositories SmartDukaan

Rev

Rev 31568 | Rev 31571 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
26733 amit.gupta 1
package com.spice.profitmandi.dao.entity.dtr;
2
 
3
import java.io.Serializable;
26745 amit.gupta 4
import java.util.List;
31447 tejbeer 5
import java.util.Objects;
26733 amit.gupta 6
 
7
import javax.persistence.Column;
8
import javax.persistence.Entity;
31447 tejbeer 9
import javax.persistence.EnumType;
10
import javax.persistence.Enumerated;
26733 amit.gupta 11
import javax.persistence.GeneratedValue;
12
import javax.persistence.GenerationType;
13
import javax.persistence.Id;
14
import javax.persistence.Table;
26745 amit.gupta 15
import javax.persistence.Transient;
26733 amit.gupta 16
 
17
import com.fasterxml.jackson.annotation.JsonProperty;
31568 tejbeer 18
import com.spice.profitmandi.dao.enumuration.dtr.WebListingSource;
31447 tejbeer 19
import com.spice.profitmandi.dao.enumuration.dtr.WebListingType;
26745 amit.gupta 20
import com.spice.profitmandi.service.inventory.FofoCatalogResponse;
26733 amit.gupta 21
 
22
@Entity
28301 tejbeer 23
@Table(name = "dtr.web_listing", schema = "dtr")
24
public class WebListing implements Serializable {
25
 
26733 amit.gupta 26
	private static final long serialVersionUID = 1L;
27
	@Id
28301 tejbeer 28
	@Column(name = "id", columnDefinition = "int(10) unsigned")
26733 amit.gupta 29
	@GeneratedValue(strategy = GenerationType.IDENTITY)
28301 tejbeer 30
	@JsonProperty(defaultValue = "0")
26733 amit.gupta 31
	private int id;
28301 tejbeer 32
 
26733 amit.gupta 33
	@Column
34
	private String title;
28301 tejbeer 35
 
26733 amit.gupta 36
	@Column
28301 tejbeer 37
	@JsonProperty(defaultValue = "0")
26733 amit.gupta 38
	private int rank;
28301 tejbeer 39
 
26733 amit.gupta 40
	@Column
41
	private String url;
28301 tejbeer 42
 
26733 amit.gupta 43
	@Column
28301 tejbeer 44
	private String bannerUrl;
45
 
46
	@Column
28566 tejbeer 47
	private String headerUrl;
48
 
49
	@Column
28301 tejbeer 50
	@JsonProperty(defaultValue = "true")
51
	private boolean active = true;
52
 
31447 tejbeer 53
	@Column
54
	@Enumerated(EnumType.STRING)
31568 tejbeer 55
	private WebListingSource targetSource;
31447 tejbeer 56
 
31568 tejbeer 57
	@Column
58
	@Enumerated(EnumType.STRING)
59
	private WebListingType type;
60
 
31570 tejbeer 61
	@Column
62
	private String solrQuery;
63
 
26745 amit.gupta 64
	@Transient
65
	private List<FofoCatalogResponse> fofoCatalogResponses;
26733 amit.gupta 66
 
28301 tejbeer 67
	public String getBannerUrl() {
68
		return bannerUrl;
69
	}
70
 
31570 tejbeer 71
	public WebListingSource getTargetSource() {
72
		return targetSource;
73
	}
74
 
75
	public void setTargetSource(WebListingSource targetSource) {
76
		this.targetSource = targetSource;
77
	}
78
 
28301 tejbeer 79
	public void setBannerUrl(String bannerUrl) {
80
		this.bannerUrl = bannerUrl;
81
	}
82
 
26733 amit.gupta 83
	public int getId() {
84
		return id;
85
	}
86
 
87
	public void setId(int id) {
88
		this.id = id;
89
	}
90
 
91
	public String getTitle() {
92
		return title;
93
	}
94
 
95
	public void setTitle(String title) {
96
		this.title = title;
97
	}
98
 
99
	public int getRank() {
100
		return rank;
101
	}
102
 
103
	public void setRank(int rank) {
104
		this.rank = rank;
105
	}
106
 
107
	public boolean isActive() {
108
		return active;
109
	}
110
 
31568 tejbeer 111
	public WebListingType getType() {
112
		return type;
113
	}
114
 
115
	public void setType(WebListingType type) {
116
		this.type = type;
117
	}
118
 
26733 amit.gupta 119
	public void setActive(boolean active) {
120
		this.active = active;
121
	}
28301 tejbeer 122
 
26733 amit.gupta 123
	public String getUrl() {
124
		return url;
125
	}
126
 
127
	public void setUrl(String url) {
128
		this.url = url;
129
	}
130
 
28566 tejbeer 131
	public String getHeaderUrl() {
132
		return headerUrl;
133
	}
134
 
135
	public void setHeaderUrl(String headerUrl) {
136
		this.headerUrl = headerUrl;
137
	}
138
 
26733 amit.gupta 139
	@Override
28566 tejbeer 140
	public String toString() {
31447 tejbeer 141
		return "WebListing [id=" + id + ", title=" + title + ", rank=" + rank + ", url=" + url + ", bannerUrl="
142
				+ bannerUrl + ", headerUrl=" + headerUrl + ", active=" + active + ", targetSource=" + targetSource
31570 tejbeer 143
				+ ", type=" + type + ", solrQuery=" + solrQuery + "]";
28566 tejbeer 144
	}
145
 
146
	@Override
26733 amit.gupta 147
	public int hashCode() {
31570 tejbeer 148
		return Objects.hash(active, bannerUrl, headerUrl, id, rank, solrQuery, targetSource, title, type, url);
26733 amit.gupta 149
	}
150
 
26745 amit.gupta 151
	public List<FofoCatalogResponse> getFofoCatalogResponses() {
152
		return fofoCatalogResponses;
153
	}
154
 
155
	public void setFofoCatalogResponses(List<FofoCatalogResponse> fofoCatalogResponses) {
156
		this.fofoCatalogResponses = fofoCatalogResponses;
157
	}
158
 
26733 amit.gupta 159
	@Override
160
	public boolean equals(Object obj) {
161
		if (this == obj)
162
			return true;
163
		if (obj == null)
164
			return false;
165
		if (getClass() != obj.getClass())
166
			return false;
167
		WebListing other = (WebListing) obj;
31447 tejbeer 168
		return active == other.active && Objects.equals(bannerUrl, other.bannerUrl)
169
				&& Objects.equals(headerUrl, other.headerUrl) && id == other.id && rank == other.rank
31570 tejbeer 170
				&& Objects.equals(solrQuery, other.solrQuery) && targetSource == other.targetSource
171
				&& Objects.equals(title, other.title) && type == other.type && Objects.equals(url, other.url);
26733 amit.gupta 172
	}
28301 tejbeer 173
 
26733 amit.gupta 174
}