Subversion Repositories SmartDukaan

Rev

Rev 21675 | Rev 22858 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21675 ashik.ali 1
 
2
package com.spice.profitmandi.common.model;
3
 
4
 
5
public class CustomAddress {
6
 
7
    private String name;
8
    private String line1;
9
    private String line2;
10
    private String landmark;
11
    private String city;
12
    private String state;
13
    private String pinCode;
14
    private String country;
15
    private String phoneNumber;
16
 
17
    public String getName() {
18
        return name;
19
    }
20
 
21
    public void setName(String name) {
22
        this.name = name;
23
    }
24
 
25
    public String getLine1() {
26
        return line1;
27
    }
28
 
29
    public void setLine1(String line1) {
30
        this.line1 = line1;
31
    }
32
 
33
    public String getLine2() {
34
        return line2;
35
    }
36
 
37
    public void setLine2(String line2) {
38
        this.line2 = line2;
39
    }
40
 
41
    public String getLandmark() {
42
        return landmark;
43
    }
44
 
45
    public void setLandmark(String landmark) {
46
        this.landmark = landmark;
47
    }
48
 
49
    public String getCity() {
50
        return city;
51
    }
52
 
53
    public void setCity(String city) {
54
        this.city = city;
55
    }
56
 
57
    public String getState() {
58
        return state;
59
    }
60
 
61
    public void setState(String state) {
62
        this.state = state;
63
    }
64
 
65
    public String getPinCode() {
66
        return pinCode;
67
    }
68
 
69
    public void setPinCode(String pinCode) {
70
        this.pinCode = pinCode;
71
    }
72
 
73
    public String getCountry() {
74
        return country;
75
    }
76
 
77
    public void setCountry(String country) {
78
        this.country = country;
79
    }
80
 
81
    public String getPhoneNumber() {
82
        return phoneNumber;
83
    }
84
 
85
    public void setPhoneNumber(String phoneNumber) {
86
        this.phoneNumber = phoneNumber;
87
    }
21923 ashik.ali 88
 
89
 
21675 ashik.ali 90
 
91
	@Override
21923 ashik.ali 92
	public int hashCode() {
93
		final int prime = 31;
94
		int result = 1;
95
		result = prime * result + ((city == null) ? 0 : city.hashCode());
96
		result = prime * result + ((country == null) ? 0 : country.hashCode());
97
		result = prime * result + ((landmark == null) ? 0 : landmark.hashCode());
98
		result = prime * result + ((line1 == null) ? 0 : line1.hashCode());
99
		result = prime * result + ((line2 == null) ? 0 : line2.hashCode());
100
		result = prime * result + ((name == null) ? 0 : name.hashCode());
101
		result = prime * result + ((phoneNumber == null) ? 0 : phoneNumber.hashCode());
102
		result = prime * result + ((pinCode == null) ? 0 : pinCode.hashCode());
103
		result = prime * result + ((state == null) ? 0 : state.hashCode());
104
		return result;
105
	}
106
 
107
	@Override
108
	public boolean equals(Object obj) {
109
		if (this == obj)
110
			return true;
111
		if (obj == null)
112
			return false;
113
		if (getClass() != obj.getClass())
114
			return false;
115
		CustomAddress other = (CustomAddress) obj;
116
		if (city == null) {
117
			if (other.city != null)
118
				return false;
119
		} else if (!city.equals(other.city))
120
			return false;
121
		if (country == null) {
122
			if (other.country != null)
123
				return false;
124
		} else if (!country.equals(other.country))
125
			return false;
126
		if (landmark == null) {
127
			if (other.landmark != null)
128
				return false;
129
		} else if (!landmark.equals(other.landmark))
130
			return false;
131
		if (line1 == null) {
132
			if (other.line1 != null)
133
				return false;
134
		} else if (!line1.equals(other.line1))
135
			return false;
136
		if (line2 == null) {
137
			if (other.line2 != null)
138
				return false;
139
		} else if (!line2.equals(other.line2))
140
			return false;
141
		if (name == null) {
142
			if (other.name != null)
143
				return false;
144
		} else if (!name.equals(other.name))
145
			return false;
146
		if (phoneNumber == null) {
147
			if (other.phoneNumber != null)
148
				return false;
149
		} else if (!phoneNumber.equals(other.phoneNumber))
150
			return false;
151
		if (pinCode == null) {
152
			if (other.pinCode != null)
153
				return false;
154
		} else if (!pinCode.equals(other.pinCode))
155
			return false;
156
		if (state == null) {
157
			if (other.state != null)
158
				return false;
159
		} else if (!state.equals(other.state))
160
			return false;
161
		return true;
162
	}
163
 
164
	@Override
21675 ashik.ali 165
	public String toString() {
166
		return "CustomAddress [name=" + name + ", line1=" + line1 + ", line2=" + line2 + ", landmark=" + landmark
167
				+ ", city=" + city + ", state=" + state + ", pinCode=" + pinCode + ", country=" + country
168
				+ ", phoneNumber=" + phoneNumber + "]";
169
	}
170
 
171
 
172
 
173
}