Subversion Repositories SmartDukaan

Rev

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

Rev 31447 Rev 31568
Line 13... Line 13...
13
import javax.persistence.Id;
13
import javax.persistence.Id;
14
import javax.persistence.Table;
14
import javax.persistence.Table;
15
import javax.persistence.Transient;
15
import javax.persistence.Transient;
16
 
16
 
17
import com.fasterxml.jackson.annotation.JsonProperty;
17
import com.fasterxml.jackson.annotation.JsonProperty;
-
 
18
import com.spice.profitmandi.dao.enumuration.dtr.WebListingSource;
18
import com.spice.profitmandi.dao.enumuration.dtr.WebListingType;
19
import com.spice.profitmandi.dao.enumuration.dtr.WebListingType;
19
import com.spice.profitmandi.service.inventory.FofoCatalogResponse;
20
import com.spice.profitmandi.service.inventory.FofoCatalogResponse;
20
 
21
 
21
@Entity
22
@Entity
22
@Table(name = "dtr.web_listing", schema = "dtr")
23
@Table(name = "dtr.web_listing", schema = "dtr")
Line 40... Line 41...
40
	private String url;
41
	private String url;
41
 
42
 
42
	@Column
43
	@Column
43
	private String bannerUrl;
44
	private String bannerUrl;
44
 
45
 
45
	public WebListingType getTargetSource() {
46
	public WebListingSource getTargetSource() {
46
		return targetSource;
47
		return targetSource;
47
	}
48
	}
48
 
49
 
49
	public void setTargetSource(WebListingType targetSource) {
50
	public void setTargetSource(WebListingSource targetSource) {
50
		this.targetSource = targetSource;
51
		this.targetSource = targetSource;
51
	}
52
	}
52
 
53
 
53
	@Column
54
	@Column
54
	private String headerUrl;
55
	private String headerUrl;
Line 57... Line 58...
57
	@JsonProperty(defaultValue = "true")
58
	@JsonProperty(defaultValue = "true")
58
	private boolean active = true;
59
	private boolean active = true;
59
 
60
 
60
	@Column
61
	@Column
61
	@Enumerated(EnumType.STRING)
62
	@Enumerated(EnumType.STRING)
62
	private WebListingType targetSource;
63
	private WebListingSource targetSource;
-
 
64
 
-
 
65
	@Column
-
 
66
	@Enumerated(EnumType.STRING)
-
 
67
	private WebListingType type;
63
 
68
 
64
	@Transient
69
	@Transient
65
	private List<FofoCatalogResponse> fofoCatalogResponses;
70
	private List<FofoCatalogResponse> fofoCatalogResponses;
66
 
71
 
67
	public String getBannerUrl() {
72
	public String getBannerUrl() {
Line 98... Line 103...
98
 
103
 
99
	public boolean isActive() {
104
	public boolean isActive() {
100
		return active;
105
		return active;
101
	}
106
	}
102
 
107
 
-
 
108
	public WebListingType getType() {
-
 
109
		return type;
-
 
110
	}
-
 
111
 
-
 
112
	public void setType(WebListingType type) {
-
 
113
		this.type = type;
-
 
114
	}
-
 
115
 
103
	public void setActive(boolean active) {
116
	public void setActive(boolean active) {
104
		this.active = active;
117
		this.active = active;
105
	}
118
	}
106
 
119
 
107
	public String getUrl() {
120
	public String getUrl() {
Line 122... Line 135...
122
 
135
 
123
	@Override
136
	@Override
124
	public String toString() {
137
	public String toString() {
125
		return "WebListing [id=" + id + ", title=" + title + ", rank=" + rank + ", url=" + url + ", bannerUrl="
138
		return "WebListing [id=" + id + ", title=" + title + ", rank=" + rank + ", url=" + url + ", bannerUrl="
126
				+ bannerUrl + ", headerUrl=" + headerUrl + ", active=" + active + ", targetSource=" + targetSource
139
				+ bannerUrl + ", headerUrl=" + headerUrl + ", active=" + active + ", targetSource=" + targetSource
127
				+ "]";
140
				+ ", type=" + type + "]";
128
	}
141
	}
129
 
142
 
130
	@Override
143
	@Override
131
	public int hashCode() {
144
	public int hashCode() {
132
		return Objects.hash(active, bannerUrl, fofoCatalogResponses, headerUrl, id, rank, targetSource, title, url);
145
		return Objects.hash(active, bannerUrl, headerUrl, id, rank, targetSource, title, type, url);
133
	}
146
	}
134
 
147
 
135
	public List<FofoCatalogResponse> getFofoCatalogResponses() {
148
	public List<FofoCatalogResponse> getFofoCatalogResponses() {
136
		return fofoCatalogResponses;
149
		return fofoCatalogResponses;
137
	}
150
	}
Line 148... Line 161...
148
			return false;
161
			return false;
149
		if (getClass() != obj.getClass())
162
		if (getClass() != obj.getClass())
150
			return false;
163
			return false;
151
		WebListing other = (WebListing) obj;
164
		WebListing other = (WebListing) obj;
152
		return active == other.active && Objects.equals(bannerUrl, other.bannerUrl)
165
		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
166
				&& Objects.equals(headerUrl, other.headerUrl) && id == other.id && rank == other.rank
155
				&& targetSource == other.targetSource && Objects.equals(title, other.title)
167
				&& targetSource == other.targetSource && Objects.equals(title, other.title) && type == other.type
156
				&& Objects.equals(url, other.url);
168
				&& Objects.equals(url, other.url);
157
	}
169
	}
158
 
170
 
159
}
171
}
160
172