Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
28590 tejbeer 1
package com.spice.profitmandi.dao.model;
2
 
3
public class InStockCatalogItemModel {
4
	private int catalogItemId;
5
	private String brand;
6
	private String modelName;
7
	private String modelNumber;
8
	private long qty;
9
	private long amount;
10
 
11
	public InStockCatalogItemModel(int catalogItemId, String brand, String modelName, String modelNumber, long qty,
12
			long amount) {
13
		super();
14
		this.catalogItemId = catalogItemId;
15
		this.brand = brand;
16
		this.modelName = modelName;
17
		this.modelNumber = modelNumber;
18
		this.qty = qty;
19
		this.amount = amount;
20
	}
21
 
22
	public int getCatalogItemId() {
23
		return catalogItemId;
24
	}
25
 
26
	public void setCatalogItemId(int catalogItemId) {
27
		this.catalogItemId = catalogItemId;
28
	}
29
 
30
	public String getBrand() {
31
		return brand;
32
	}
33
 
34
	public void setBrand(String brand) {
35
		this.brand = brand;
36
	}
37
 
38
	public String getModelName() {
39
		return modelName;
40
	}
41
 
42
	public void setModelName(String modelName) {
43
		this.modelName = modelName;
44
	}
45
 
46
	public String getModelNumber() {
47
		return modelNumber;
48
	}
49
 
50
	public void setModelNumber(String modelNumber) {
51
		this.modelNumber = modelNumber;
52
	}
53
 
54
	public long getQty() {
55
		return qty;
56
	}
57
 
58
	public void setQty(long qty) {
59
		this.qty = qty;
60
	}
61
 
62
	public long getAmount() {
63
		return amount;
64
	}
65
 
66
	public void setAmount(long amount) {
67
		this.amount = amount;
68
	}
69
 
70
	@Override
71
	public int hashCode() {
72
		final int prime = 31;
73
		int result = 1;
74
		result = prime * result + (int) (amount ^ (amount >>> 32));
75
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
76
		result = prime * result + catalogItemId;
77
		result = prime * result + ((modelName == null) ? 0 : modelName.hashCode());
78
		result = prime * result + ((modelNumber == null) ? 0 : modelNumber.hashCode());
79
		result = prime * result + (int) (qty ^ (qty >>> 32));
80
		return result;
81
	}
82
 
83
	@Override
84
	public boolean equals(Object obj) {
85
		if (this == obj)
86
			return true;
87
		if (obj == null)
88
			return false;
89
		if (getClass() != obj.getClass())
90
			return false;
91
		InStockCatalogItemModel other = (InStockCatalogItemModel) obj;
92
		if (amount != other.amount)
93
			return false;
94
		if (brand == null) {
95
			if (other.brand != null)
96
				return false;
97
		} else if (!brand.equals(other.brand))
98
			return false;
99
		if (catalogItemId != other.catalogItemId)
100
			return false;
101
		if (modelName == null) {
102
			if (other.modelName != null)
103
				return false;
104
		} else if (!modelName.equals(other.modelName))
105
			return false;
106
		if (modelNumber == null) {
107
			if (other.modelNumber != null)
108
				return false;
109
		} else if (!modelNumber.equals(other.modelNumber))
110
			return false;
111
		if (qty != other.qty)
112
			return false;
113
		return true;
114
	}
115
 
116
	@Override
117
	public String toString() {
118
		return "InStockCatalogItemModel [catalogItemId=" + catalogItemId + ", brand=" + brand + ", modelName="
119
				+ modelName + ", modelNumber=" + modelNumber + ", qty=" + qty + ", amount=" + amount + "]";
120
	}
121
 
122
}