Subversion Repositories SmartDukaan

Rev

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

Rev 21917 Rev 21924
Line 104... Line 104...
104
		return catalogItemId;
104
		return catalogItemId;
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
	
-
 
110
	@Override
-
 
111
	public int hashCode() {
-
 
112
		final int prime = 31;
-
 
113
		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;
-
 
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;
-
 
123
	}
-
 
124
	@Override
-
 
125
	public boolean equals(Object obj) {
-
 
126
		if (this == obj)
-
 
127
			return true;
-
 
128
		if (obj == null)
-
 
129
			return false;
-
 
130
		if (getClass() != obj.getClass())
-
 
131
			return false;
-
 
132
		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)
-
 
151
			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;
-
 
165
	}
109
	@Override
166
	@Override
110
	public String toString() {
167
	public String toString() {
111
		return "Item [id=" + id + ", brand=" + brand + ", modelName=" + modelName + ", modelNumber=" + modelNumber
168
		return "Item [id=" + id + ", brand=" + brand + ", modelName=" + modelName + ", modelNumber=" + modelNumber
112
				+ ", color=" + color + ", type=" + type + ", hsnCode="+ hsnCode + ", catalogItemId=" + catalogItemId + "]";
169
				+ ", color=" + color + ", type=" + type + ", hsnCode="+ hsnCode + ", catalogItemId=" + catalogItemId + "]";
113
	}
170
	}