Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
26738 amit.gupta 1
package com.spice.profitmandi.dao.entity.dtr;
2
 
3
import java.io.Serializable;
4
 
5
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.GeneratedValue;
8
import javax.persistence.GenerationType;
9
import javax.persistence.Id;
10
import javax.persistence.Table;
11
import javax.persistence.Transient;
12
 
13
import com.fasterxml.jackson.annotation.JsonProperty;
14
 
15
/**
16
 * This class basically contains api details
17
 * 
18
 * @author ashikali
19
 *
20
 */
21
@Entity
22
@Table(name = "dtr.web_product_listing", schema = "dtr")
23
public class WebProductListing implements Serializable {
24
 
25
	private static final long serialVersionUID = 1L;
26
	@JsonProperty(defaultValue="0")
27
	@Id
28
	@GeneratedValue(strategy = GenerationType.IDENTITY)
29
	private int id;
30
 
31
	@Column(name = "web_listing_id")
32
	private int webListingId;
33
 
34
	@Column(name = "entity_id")
35
	private int entityId;
36
 
37
	@JsonProperty(defaultValue="0")
38
	@Column(name = "rank")
39
	private int rank;
40
 
41
	@Transient
42
	private String productName;
43
 
44
 
45
	public String getProductName() {
46
		return productName;
47
	}
48
 
49
	public void setProductName(String productName) {
50
		this.productName = productName;
51
	}
52
 
53
	public int getId() {
54
		return id;
55
	}
56
 
57
	public void setId(int id) {
58
		this.id = id;
59
	}
60
 
61
	public int getWebListingId() {
62
		return webListingId;
63
	}
64
 
65
	public void setWebListingId(int webListingId) {
66
		this.webListingId = webListingId;
67
	}
68
 
69
	public int getEntityId() {
70
		return entityId;
71
	}
72
 
73
	public void setEntityId(int entityId) {
74
		this.entityId = entityId;
75
	}
76
 
77
	public int getRank() {
78
		return rank;
79
	}
80
 
81
	public void setRank(int rank) {
82
		this.rank = rank;
83
	}
84
 
85
	@Override
86
	public String toString() {
87
		return "WebProductListing [id=" + id + ", webListingId=" + webListingId + ", entityId=" + entityId + ", rank="
88
				+ rank + "]";
89
	}
90
 
91
	@Override
92
	public int hashCode() {
93
		final int prime = 31;
94
		int result = 1;
95
		result = prime * result + entityId;
96
		result = prime * result + id;
97
		result = prime * result + rank;
98
		result = prime * result + webListingId;
99
		return result;
100
	}
101
 
102
	@Override
103
	public boolean equals(Object obj) {
104
		if (this == obj)
105
			return true;
106
		if (obj == null)
107
			return false;
108
		if (getClass() != obj.getClass())
109
			return false;
110
		WebProductListing other = (WebProductListing) obj;
111
		if (entityId != other.entityId)
112
			return false;
113
		if (id != other.id)
114
			return false;
115
		if (rank != other.rank)
116
			return false;
117
		if (webListingId != other.webListingId)
118
			return false;
119
		return true;
120
	}
121
 
122
 
123
 
124
}