Subversion Repositories SmartDukaan

Rev

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

Rev 21924 Rev 22009
Line 105... Line 105...
105
	}
105
	}
106
	public void setCatalogItemId(int catalogItemId) {
106
	public void setCatalogItemId(int catalogItemId) {
107
		this.catalogItemId = catalogItemId;
107
		this.catalogItemId = catalogItemId;
108
	}
108
	}
109
	
109
	
-
 
110
	
110
	@Override
111
	@Override
111
	public int hashCode() {
112
	public int hashCode() {
112
		final int prime = 31;
113
		final int prime = 31;
113
		int result = 1;
114
		int result = 1;
114
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
-
 
115
		result = prime * result + catalogItemId;
-
 
116
		result = prime * result + ((color == null) ? 0 : color.hashCode());
-
 
117
		result = prime * result + ((hsnCode == null) ? 0 : hsnCode.hashCode());
-
 
118
		result = prime * result + id;
115
		result = prime * result + id;
119
		result = prime * result + ((modelName == null) ? 0 : modelName.hashCode());
-
 
120
		result = prime * result + ((modelNumber == null) ? 0 : modelNumber.hashCode());
-
 
121
		result = prime * result + ((type == null) ? 0 : type.hashCode());
-
 
122
		return result;
116
		return result;
123
	}
117
	}
124
	@Override
118
	@Override
125
	public boolean equals(Object obj) {
119
	public boolean equals(Object obj) {
126
		if (this == obj)
120
		if (this == obj)
Line 128... Line 122...
128
		if (obj == null)
122
		if (obj == null)
129
			return false;
123
			return false;
130
		if (getClass() != obj.getClass())
124
		if (getClass() != obj.getClass())
131
			return false;
125
			return false;
132
		Item other = (Item) obj;
126
		Item other = (Item) obj;
133
		if (brand == null) {
-
 
134
			if (other.brand != null)
-
 
135
				return false;
-
 
136
		} else if (!brand.equals(other.brand))
-
 
137
			return false;
-
 
138
		if (catalogItemId != other.catalogItemId)
-
 
139
			return false;
-
 
140
		if (color == null) {
-
 
141
			if (other.color != null)
-
 
142
				return false;
-
 
143
		} else if (!color.equals(other.color))
-
 
144
			return false;
-
 
145
		if (hsnCode == null) {
-
 
146
			if (other.hsnCode != null)
-
 
147
				return false;
-
 
148
		} else if (!hsnCode.equals(other.hsnCode))
-
 
149
			return false;
-
 
150
		if (id != other.id)
127
		if (id != other.id)
151
			return false;
128
			return false;
152
		if (modelName == null) {
-
 
153
			if (other.modelName != null)
-
 
154
				return false;
-
 
155
		} else if (!modelName.equals(other.modelName))
-
 
156
			return false;
-
 
157
		if (modelNumber == null) {
-
 
158
			if (other.modelNumber != null)
-
 
159
				return false;
-
 
160
		} else if (!modelNumber.equals(other.modelNumber))
-
 
161
			return false;
-
 
162
		if (type != other.type)
-
 
163
			return false;
-
 
164
		return true;
129
		return true;
165
	}
130
	}
166
	@Override
131
	@Override
167
	public String toString() {
132
	public String toString() {
168
		return "Item [id=" + id + ", brand=" + brand + ", modelName=" + modelName + ", modelNumber=" + modelNumber
133
		return "Item [id=" + id + ", brand=" + brand + ", modelName=" + modelName + ", modelNumber=" + modelNumber