Subversion Repositories SmartDukaan

Rev

Rev 28566 | Rev 31568 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28566 Rev 31447
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.dtr;
1
package com.spice.profitmandi.dao.entity.dtr;
2
 
2
 
3
import java.io.Serializable;
3
import java.io.Serializable;
4
import java.util.List;
4
import java.util.List;
-
 
5
import java.util.Objects;
5
 
6
 
6
import javax.persistence.Column;
7
import javax.persistence.Column;
7
import javax.persistence.Entity;
8
import javax.persistence.Entity;
-
 
9
import javax.persistence.EnumType;
-
 
10
import javax.persistence.Enumerated;
8
import javax.persistence.GeneratedValue;
11
import javax.persistence.GeneratedValue;
9
import javax.persistence.GenerationType;
12
import javax.persistence.GenerationType;
10
import javax.persistence.Id;
13
import javax.persistence.Id;
11
import javax.persistence.Table;
14
import javax.persistence.Table;
12
import javax.persistence.Transient;
15
import javax.persistence.Transient;
13
 
16
 
14
import com.fasterxml.jackson.annotation.JsonProperty;
17
import com.fasterxml.jackson.annotation.JsonProperty;
-
 
18
import com.spice.profitmandi.dao.enumuration.dtr.WebListingType;
15
import com.spice.profitmandi.service.inventory.FofoCatalogResponse;
19
import com.spice.profitmandi.service.inventory.FofoCatalogResponse;
16
 
20
 
17
@Entity
21
@Entity
18
@Table(name = "dtr.web_listing", schema = "dtr")
22
@Table(name = "dtr.web_listing", schema = "dtr")
19
public class WebListing implements Serializable {
23
public class WebListing implements Serializable {
Line 36... Line 40...
36
	private String url;
40
	private String url;
37
 
41
 
38
	@Column
42
	@Column
39
	private String bannerUrl;
43
	private String bannerUrl;
40
 
44
 
-
 
45
	public WebListingType getTargetSource() {
-
 
46
		return targetSource;
-
 
47
	}
-
 
48
 
-
 
49
	public void setTargetSource(WebListingType targetSource) {
-
 
50
		this.targetSource = targetSource;
-
 
51
	}
-
 
52
 
41
	@Column
53
	@Column
42
	private String headerUrl;
54
	private String headerUrl;
43
 
55
 
44
	@Column
56
	@Column
45
	@JsonProperty(defaultValue = "true")
57
	@JsonProperty(defaultValue = "true")
46
	private boolean active = true;
58
	private boolean active = true;
47
 
59
 
-
 
60
	@Column
-
 
61
	@Enumerated(EnumType.STRING)
-
 
62
	private WebListingType targetSource;
-
 
63
 
48
	@Transient
64
	@Transient
49
	private List<FofoCatalogResponse> fofoCatalogResponses;
65
	private List<FofoCatalogResponse> fofoCatalogResponses;
50
 
66
 
51
	public String getBannerUrl() {
67
	public String getBannerUrl() {
52
		return bannerUrl;
68
		return bannerUrl;
Line 104... Line 120...
104
		this.headerUrl = headerUrl;
120
		this.headerUrl = headerUrl;
105
	}
121
	}
106
 
122
 
107
	@Override
123
	@Override
108
	public String toString() {
124
	public String toString() {
109
		return "WebListing [id=" + id + ", title=" + title + ", rank=" + rank + ", url=" + url + ", active=" + active
125
		return "WebListing [id=" + id + ", title=" + title + ", rank=" + rank + ", url=" + url + ", bannerUrl="
-
 
126
				+ bannerUrl + ", headerUrl=" + headerUrl + ", active=" + active + ", targetSource=" + targetSource
110
				+ "]";
127
				+ "]";
111
	}
128
	}
112
 
129
 
113
	@Override
130
	@Override
114
	public int hashCode() {
131
	public int hashCode() {
115
		final int prime = 31;
-
 
116
		int result = 1;
-
 
117
		result = prime * result + (active ? 1231 : 1237);
-
 
118
		result = prime * result + ((bannerUrl == null) ? 0 : bannerUrl.hashCode());
-
 
119
		result = prime * result + ((fofoCatalogResponses == null) ? 0 : fofoCatalogResponses.hashCode());
132
		return Objects.hash(active, bannerUrl, fofoCatalogResponses, headerUrl, id, rank, targetSource, title, url);
120
		result = prime * result + ((headerUrl == null) ? 0 : headerUrl.hashCode());
-
 
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
	}
133
	}
127
 
134
 
128
	public List<FofoCatalogResponse> getFofoCatalogResponses() {
135
	public List<FofoCatalogResponse> getFofoCatalogResponses() {
129
		return fofoCatalogResponses;
136
		return fofoCatalogResponses;
130
	}
137
	}
Line 140... Line 147...
140
		if (obj == null)
147
		if (obj == null)
141
			return false;
148
			return false;
142
		if (getClass() != obj.getClass())
149
		if (getClass() != obj.getClass())
143
			return false;
150
			return false;
144
		WebListing other = (WebListing) obj;
151
		WebListing other = (WebListing) obj;
145
		if (active != other.active)
-
 
146
			return false;
-
 
147
		if (bannerUrl == null) {
-
 
148
			if (other.bannerUrl != null)
-
 
149
				return false;
-
 
150
		} else if (!bannerUrl.equals(other.bannerUrl))
152
		return active == other.active && Objects.equals(bannerUrl, other.bannerUrl)
151
			return false;
-
 
152
		if (fofoCatalogResponses == null) {
-
 
153
			if (other.fofoCatalogResponses != null)
-
 
154
				return false;
-
 
155
		} else if (!fofoCatalogResponses.equals(other.fofoCatalogResponses))
153
				&& Objects.equals(fofoCatalogResponses, other.fofoCatalogResponses)
156
			return false;
-
 
157
		if (headerUrl == null) {
-
 
158
			if (other.headerUrl != null)
-
 
159
				return false;
-
 
160
		} else if (!headerUrl.equals(other.headerUrl))
154
				&& Objects.equals(headerUrl, other.headerUrl) && id == other.id && rank == other.rank
161
			return false;
-
 
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))
155
				&& targetSource == other.targetSource && Objects.equals(title, other.title)
170
			return false;
-
 
171
		if (url == null) {
-
 
172
			if (other.url != null)
-
 
173
				return false;
-
 
174
		} else if (!url.equals(other.url))
156
				&& Objects.equals(url, other.url);
175
			return false;
-
 
176
		return true;
-
 
177
	}
157
	}
178
 
158
 
179
}
159
}
180
160