Subversion Repositories SmartDukaan

Rev

Rev 21923 | Rev 22242 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21923 Rev 22215
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
3
import com.spice.profitmandi.common.model.CustomAddress;
-
 
4
 
-
 
5
public class CustomCustomer {
3
public class CustomCustomer {
-
 
4
	private String firstName;
6
	private String name;
5
	private String lastName;
-
 
6
	private String dateOfBirth;
7
	private String emailId;
7
	private String emailId;
8
	private String mobileNumber;
8
	private String mobileNumber;
9
	private int customerAddressId;
9
	private int customerAddressId;
10
	private CustomAddress address;
10
	private CustomAddress address;
11
	
11
	
-
 
12
	public String getFirstName() {
-
 
13
		return firstName;
-
 
14
	}
-
 
15
	public void setFirstName(String firstName) {
-
 
16
		this.firstName = firstName;
-
 
17
	}
12
	public String getName() {
18
	public String getLastName() {
13
		return name;
19
		return lastName;
-
 
20
	}
-
 
21
	public void setLastName(String lastName) {
-
 
22
		this.lastName = lastName;
14
	}
23
	}
-
 
24
	public String getDateOfBirth() {
-
 
25
		return dateOfBirth;
-
 
26
	}
15
	public void setName(String name) {
27
	public void setDateOfBirth(String dateOfBirth) {
16
		this.name = name;
28
		this.dateOfBirth = dateOfBirth;
17
	}
29
	}
18
	
30
	
19
	public String getEmailId() {
31
	public String getEmailId() {
20
		return emailId;
32
		return emailId;
21
	}
33
	}
Line 38... Line 50...
38
		return customerAddressId;
50
		return customerAddressId;
39
	}
51
	}
40
	public void setCustomerAddressId(int customerAddressId) {
52
	public void setCustomerAddressId(int customerAddressId) {
41
		this.customerAddressId = customerAddressId;
53
		this.customerAddressId = customerAddressId;
42
	}
54
	}
43
	
-
 
44
	
-
 
45
	@Override
55
	@Override
46
	public int hashCode() {
56
	public int hashCode() {
47
		final int prime = 31;
57
		final int prime = 31;
48
		int result = 1;
58
		int result = 1;
49
		result = prime * result + ((address == null) ? 0 : address.hashCode());
59
		result = prime * result + ((address == null) ? 0 : address.hashCode());
50
		result = prime * result + customerAddressId;
60
		result = prime * result + customerAddressId;
-
 
61
		result = prime * result + ((dateOfBirth == null) ? 0 : dateOfBirth.hashCode());
51
		result = prime * result + ((emailId == null) ? 0 : emailId.hashCode());
62
		result = prime * result + ((emailId == null) ? 0 : emailId.hashCode());
-
 
63
		result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
-
 
64
		result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
52
		result = prime * result + ((mobileNumber == null) ? 0 : mobileNumber.hashCode());
65
		result = prime * result + ((mobileNumber == null) ? 0 : mobileNumber.hashCode());
53
		result = prime * result + ((name == null) ? 0 : name.hashCode());
-
 
54
		return result;
66
		return result;
55
	}
67
	}
56
	@Override
68
	@Override
57
	public boolean equals(Object obj) {
69
	public boolean equals(Object obj) {
58
		if (this == obj)
70
		if (this == obj)
Line 67... Line 79...
67
				return false;
79
				return false;
68
		} else if (!address.equals(other.address))
80
		} else if (!address.equals(other.address))
69
			return false;
81
			return false;
70
		if (customerAddressId != other.customerAddressId)
82
		if (customerAddressId != other.customerAddressId)
71
			return false;
83
			return false;
-
 
84
		if (dateOfBirth == null) {
-
 
85
			if (other.dateOfBirth != null)
-
 
86
				return false;
-
 
87
		} else if (!dateOfBirth.equals(other.dateOfBirth))
-
 
88
			return false;
72
		if (emailId == null) {
89
		if (emailId == null) {
73
			if (other.emailId != null)
90
			if (other.emailId != null)
74
				return false;
91
				return false;
75
		} else if (!emailId.equals(other.emailId))
92
		} else if (!emailId.equals(other.emailId))
76
			return false;
93
			return false;
-
 
94
		if (firstName == null) {
-
 
95
			if (other.firstName != null)
-
 
96
				return false;
-
 
97
		} else if (!firstName.equals(other.firstName))
-
 
98
			return false;
-
 
99
		if (lastName == null) {
-
 
100
			if (other.lastName != null)
-
 
101
				return false;
-
 
102
		} else if (!lastName.equals(other.lastName))
-
 
103
			return false;
77
		if (mobileNumber == null) {
104
		if (mobileNumber == null) {
78
			if (other.mobileNumber != null)
105
			if (other.mobileNumber != null)
79
				return false;
106
				return false;
80
		} else if (!mobileNumber.equals(other.mobileNumber))
107
		} else if (!mobileNumber.equals(other.mobileNumber))
81
			return false;
108
			return false;
82
		if (name == null) {
-
 
83
			if (other.name != null)
-
 
84
				return false;
-
 
85
		} else if (!name.equals(other.name))
-
 
86
			return false;
-
 
87
		return true;
109
		return true;
88
	}
110
	}
89
	@Override
111
	@Override
90
	public String toString() {
112
	public String toString() {
91
		return "CustomCustomer [name=" + name + ", emailId=" + emailId + ", mobileNumber=" + mobileNumber + ", address="
113
		return "CustomCustomer [firstName=" + firstName + ", lastName=" + lastName + ", dateOfBirth=" + dateOfBirth
-
 
114
				+ ", emailId=" + emailId + ", mobileNumber=" + mobileNumber + ", customerAddressId=" + customerAddressId
92
				+ address + ", customerAddressId=" + customerAddressId + "]";
115
				+ ", address=" + address + "]";
93
	}
116
	}
94
	
117
	
-
 
118
	
95
}
119
}