Subversion Repositories SmartDukaan

Rev

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