Subversion Repositories SmartDukaan

Rev

Rev 22881 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22881 Rev 31601
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.logistics;
1
package com.spice.profitmandi.dao.entity.logistics;
2
 
2
 
3
import java.io.Serializable;
3
import java.io.Serializable;
-
 
4
import java.util.Objects;
4
 
5
 
5
import javax.persistence.Column;
6
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.Entity;
7
import javax.persistence.GeneratedValue;
8
import javax.persistence.GeneratedValue;
8
import javax.persistence.GenerationType;
9
import javax.persistence.GenerationType;
Line 26... Line 27...
26
	
27
	
27
	@Id
28
	@Id
28
	@Column(name="id", unique=true, updatable=false)
29
	@Column(name="id", unique=true, updatable=false)
29
	@GeneratedValue(strategy = GenerationType.IDENTITY)
30
	@GeneratedValue(strategy = GenerationType.IDENTITY)
30
	private int id;
31
	private int id;
31
	
32
 
32
	@Column(name="pincode")
33
	@Column(name="pincode")
33
	private int pinCode;
34
	private int pinCode;
-
 
35
 
-
 
36
	public String getCodeName() {
-
 
37
		return codeName;
34
	
38
	}
-
 
39
 
-
 
40
	@Override
-
 
41
	public String toString() {
-
 
42
		return "PostOffice{" +
-
 
43
				"id=" + id +
-
 
44
				", pinCode=" + pinCode +
-
 
45
				", codeName='" + codeName + '\'' +
-
 
46
				", city='" + city + '\'' +
-
 
47
				", district='" + district + '\'' +
-
 
48
				", state='" + state + '\'' +
-
 
49
				'}';
-
 
50
	}
-
 
51
 
-
 
52
	@Override
-
 
53
	public boolean equals(Object o) {
-
 
54
		if (this == o) return true;
-
 
55
		if (o == null || getClass() != o.getClass()) return false;
-
 
56
		PostOffice that = (PostOffice) o;
-
 
57
		return id == that.id && pinCode == that.pinCode && Objects.equals(codeName, that.codeName) && Objects.equals(city, that.city) && Objects.equals(district, that.district) && Objects.equals(state, that.state);
-
 
58
	}
-
 
59
 
-
 
60
	@Override
-
 
61
	public int hashCode() {
-
 
62
		return Objects.hash(id, pinCode, codeName, city, district, state);
-
 
63
	}
-
 
64
 
-
 
65
	public void setCodeName(String codeName) {
-
 
66
		this.codeName = codeName;
-
 
67
	}
-
 
68
 
-
 
69
	@Column(name="name")
-
 
70
	private String codeName;
-
 
71
 
35
	@Column(name = "taluk")
72
	@Column(name = "taluk")
36
	private String city;
73
	private String city;
37
	
74
	
38
	@Column(name = "district")
75
	@Column(name = "district")
39
	private String district;
76
	private String district;
Line 69... Line 106...
69
		return state;
106
		return state;
70
	}
107
	}
71
	public void setState(String state) {
108
	public void setState(String state) {
72
		this.state = state;
109
		this.state = state;
73
	}
110
	}
74
	
-
 
75
	
111
 
76
	@Override
-
 
77
	public int hashCode() {
-
 
78
		final int prime = 31;
-
 
79
		int result = 1;
-
 
80
		result = prime * result + id;
-
 
81
		return result;
-
 
82
	}
-
 
83
	@Override
-
 
84
	public boolean equals(Object obj) {
-
 
85
		if (this == obj)
-
 
86
			return true;
-
 
87
		if (obj == null)
-
 
88
			return false;
-
 
89
		if (getClass() != obj.getClass())
-
 
90
			return false;
-
 
91
		PostOffice other = (PostOffice) obj;
-
 
92
		if (id != other.id)
-
 
93
			return false;
-
 
94
		return true;
-
 
95
	}
-
 
96
	@Override
-
 
97
	public String toString() {
-
 
98
		return "PostOffice [id=" + id + ", pinCode=" + pinCode + ", city=" + city + ", district=" + district + ", state=" + state + "]";
-
 
99
	}
-
 
100
	
112
 
101
        
-
 
102
}
113
}
103
114