Subversion Repositories SmartDukaan

Rev

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