Subversion Repositories SmartDukaan

Rev

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