Subversion Repositories SmartDukaan

Rev

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