Subversion Repositories SmartDukaan

Rev

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

Rev 21714 Rev 21924
Line 200... Line 200...
200
		return item;
200
		return item;
201
	}
201
	}
202
	public void setItem(Item item) {
202
	public void setItem(Item item) {
203
		this.item = item;
203
		this.item = item;
204
	}
204
	}
-
 
205
	
-
 
206
	
-
 
207
 
-
 
208
	@Override
-
 
209
	public int hashCode() {
-
 
210
		final int prime = 31;
-
 
211
		int result = 1;
-
 
212
		result = prime * result + badQuantity;
-
 
213
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
214
		result = prime * result + fofoId;
-
 
215
		result = prime * result + goodQuantity;
-
 
216
		result = prime * result + id;
-
 
217
		result = prime * result + initialQuantity;
-
 
218
		result = prime * result + ((item == null) ? 0 : item.hashCode());
-
 
219
		result = prime * result + itemId;
-
 
220
		result = prime * result + ((lastScanType == null) ? 0 : lastScanType.hashCode());
-
 
221
		result = prime * result + Float.floatToIntBits(priceDropAmount);
-
 
222
		result = prime * result + purchaseId;
-
 
223
		result = prime * result + ((serialNumber == null) ? 0 : serialNumber.hashCode());
-
 
224
		result = prime * result + Float.floatToIntBits(unitPrice);
-
 
225
		result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
-
 
226
		return result;
-
 
227
	}
-
 
228
 
-
 
229
	@Override
-
 
230
	public boolean equals(Object obj) {
-
 
231
		if (this == obj)
-
 
232
			return true;
-
 
233
		if (obj == null)
-
 
234
			return false;
-
 
235
		if (getClass() != obj.getClass())
-
 
236
			return false;
-
 
237
		InventoryItem other = (InventoryItem) obj;
-
 
238
		if (badQuantity != other.badQuantity)
-
 
239
			return false;
-
 
240
		if (createTimestamp == null) {
-
 
241
			if (other.createTimestamp != null)
-
 
242
				return false;
-
 
243
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
244
			return false;
-
 
245
		if (fofoId != other.fofoId)
-
 
246
			return false;
-
 
247
		if (goodQuantity != other.goodQuantity)
-
 
248
			return false;
-
 
249
		if (id != other.id)
-
 
250
			return false;
-
 
251
		if (initialQuantity != other.initialQuantity)
-
 
252
			return false;
-
 
253
		if (item == null) {
-
 
254
			if (other.item != null)
-
 
255
				return false;
-
 
256
		} else if (!item.equals(other.item))
-
 
257
			return false;
-
 
258
		if (itemId != other.itemId)
-
 
259
			return false;
-
 
260
		if (lastScanType != other.lastScanType)
-
 
261
			return false;
-
 
262
		if (Float.floatToIntBits(priceDropAmount) != Float.floatToIntBits(other.priceDropAmount))
-
 
263
			return false;
-
 
264
		if (purchaseId != other.purchaseId)
-
 
265
			return false;
-
 
266
		if (serialNumber == null) {
-
 
267
			if (other.serialNumber != null)
-
 
268
				return false;
-
 
269
		} else if (!serialNumber.equals(other.serialNumber))
-
 
270
			return false;
-
 
271
		if (Float.floatToIntBits(unitPrice) != Float.floatToIntBits(other.unitPrice))
-
 
272
			return false;
-
 
273
		if (updateTimestamp == null) {
-
 
274
			if (other.updateTimestamp != null)
-
 
275
				return false;
-
 
276
		} else if (!updateTimestamp.equals(other.updateTimestamp))
-
 
277
			return false;
-
 
278
		return true;
-
 
279
	}
205
 
280
 
206
	@Override
281
	@Override
207
	public String toString() {
282
	public String toString() {
208
		return "InventoryItem [id=" + id + ", itemId=" + itemId + ", fofoId=" + fofoId + ", serialNumber="
283
		return "InventoryItem [id=" + id + ", itemId=" + itemId + ", fofoId=" + fofoId + ", serialNumber="
209
				+ serialNumber + ", initialQuantity=" + initialQuantity + ", goodQuantity=" + goodQuantity
284
				+ serialNumber + ", initialQuantity=" + initialQuantity + ", goodQuantity=" + goodQuantity