Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
21633 ashik.ali 1
package com.spice.profitmandi.dao.model;
2
 
21640 kshitij.so 3
import in.shop2020.model.v1.catalog.ItemType;
4
 
21633 ashik.ali 5
public class ItemIdTypeQuantity {
6
	private int itemId;
21640 kshitij.so 7
	private ItemType type;
23467 amit.gupta 8
	private int quantity;
21633 ashik.ali 9
 
23467 amit.gupta 10
	public ItemIdTypeQuantity(int itemId, ItemType type, int quantity){
21633 ashik.ali 11
		this.itemId = itemId;
12
		this.type = type;
13
		this.quantity = quantity;
14
	}
15
 
16
	public int getItemId() {
17
		return itemId;
18
	}
19
	public void setItemId(int itemId) {
20
		this.itemId = itemId;
21
	}
23467 amit.gupta 22
	public int getQuantity() {
21633 ashik.ali 23
		return quantity;
24
	}
23467 amit.gupta 25
	public void setQuantity(int quantity) {
21633 ashik.ali 26
		this.quantity = quantity;
27
	}
21640 kshitij.so 28
	public ItemType getType() {
21633 ashik.ali 29
		return type;
30
	}
21640 kshitij.so 31
	public void setType(ItemType type) {
21633 ashik.ali 32
		this.type = type;
33
	}
21924 ashik.ali 34
 
35
	@Override
36
	public int hashCode() {
37
		final int prime = 31;
38
		int result = 1;
39
		result = prime * result + itemId;
40
		result = prime * result + Float.floatToIntBits(quantity);
41
		result = prime * result + ((type == null) ? 0 : type.hashCode());
42
		return result;
43
	}
44
 
45
	@Override
46
	public boolean equals(Object obj) {
47
		if (this == obj)
48
			return true;
49
		if (obj == null)
50
			return false;
51
		if (getClass() != obj.getClass())
52
			return false;
53
		ItemIdTypeQuantity other = (ItemIdTypeQuantity) obj;
54
		if (itemId != other.itemId)
55
			return false;
56
		if (Float.floatToIntBits(quantity) != Float.floatToIntBits(other.quantity))
57
			return false;
58
		if (type != other.type)
59
			return false;
60
		return true;
61
	}
62
 
63
	@Override
64
	public String toString() {
65
		return "ItemIdTypeQuantity [itemId=" + itemId + ", type=" + type + ", quantity=" + quantity + "]";
66
	}
67
 
68
 
21633 ashik.ali 69
}