Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
26715 amit.gupta 1
package com.spice.profitmandi.dao.entity.fofo;
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
 
12
@Entity
13
@Table(name = "fofo.pincode_partner", schema = "fofo")
14
public class PincodePartner implements Serializable {
15
 
16
	private static final long serialVersionUID = 1L;
17
 
18
	@Id
19
	@Column(name = "id", unique = true, updatable = false)
20
	@GeneratedValue(strategy = GenerationType.IDENTITY)
21
	private int id;
22
 
23
	@Column(name = "fofo_id")
24
	private int fofoId;
25
 
26
	@Column(name = "pincode")
27
	private String pincode;
28
 
29
	@Override
30
	public String toString() {
31
		return "PincodePartner [id=" + id + ", fofoId=" + fofoId + ", pincode=" + pincode + "]";
32
	}
33
 
34
	public int getId() {
35
		return id;
36
	}
37
 
38
	public void setId(int id) {
39
		this.id = id;
40
	}
41
 
42
	public int getFofoId() {
43
		return fofoId;
44
	}
45
 
46
	public void setFofoId(int fofoId) {
47
		this.fofoId = fofoId;
48
	}
49
 
50
	@Override
51
	public int hashCode() {
52
		final int prime = 31;
53
		int result = 1;
54
		result = prime * result + fofoId;
55
		result = prime * result + id;
56
		result = prime * result + ((pincode == null) ? 0 : pincode.hashCode());
57
		return result;
58
	}
59
 
60
	@Override
61
	public boolean equals(Object obj) {
62
		if (this == obj)
63
			return true;
64
		if (obj == null)
65
			return false;
66
		if (getClass() != obj.getClass())
67
			return false;
68
		PincodePartner other = (PincodePartner) obj;
69
		if (fofoId != other.fofoId)
70
			return false;
71
		if (id != other.id)
72
			return false;
73
		if (pincode == null) {
74
			if (other.pincode != null)
75
				return false;
76
		} else if (!pincode.equals(other.pincode))
77
			return false;
78
		return true;
79
	}
80
 
81
 
82
}