Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
26522 amit.gupta 1
package com.spice.profitmandi.dao.cart;
2
 
3
import java.util.List;
4
 
5
public class CartModel {
6
	private List<CartItemModel> itemModels; 
7
	private boolean isUpdated;
8
	@Override
9
	public String toString() {
10
		return "CartModel [itemModels=" + itemModels + ", isUpdated=" + isUpdated + "]";
11
	}
12
	@Override
13
	public int hashCode() {
14
		final int prime = 31;
15
		int result = 1;
16
		result = prime * result + (isUpdated ? 1231 : 1237);
17
		result = prime * result + ((itemModels == null) ? 0 : itemModels.hashCode());
18
		return result;
19
	}
20
	@Override
21
	public boolean equals(Object obj) {
22
		if (this == obj)
23
			return true;
24
		if (obj == null)
25
			return false;
26
		if (getClass() != obj.getClass())
27
			return false;
28
		CartModel other = (CartModel) obj;
29
		if (isUpdated != other.isUpdated)
30
			return false;
31
		if (itemModels == null) {
32
			if (other.itemModels != null)
33
				return false;
34
		} else if (!itemModels.equals(other.itemModels))
35
			return false;
36
		return true;
37
	}
38
	public List<CartItemModel> getItemModels() {
39
		return itemModels;
40
	}
41
	public void setItemModels(List<CartItemModel> itemModels) {
42
		this.itemModels = itemModels;
43
	}
44
	public boolean isUpdated() {
45
		return isUpdated;
46
	}
47
	public void setUpdated(boolean isUpdated) {
48
		this.isUpdated = isUpdated;
49
	}
50
 
51
 
52
 
53
 
54
}