Subversion Repositories SmartDukaan

Rev

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

Rev 25874 Rev 25880
Line 1... Line 1...
1
package com.spice.profitmandi.service.inventory;
1
package com.spice.profitmandi.service.inventory;
2
 
2
 
3
import java.util.HashMap;
-
 
4
import java.util.List;
3
import java.util.List;
5
import java.util.Map;
-
 
6
 
4
 
7
public class Bucket {
5
public class Bucket {
8
		private int id;
6
	private int id;
9
		private String title;
7
	private String title;
10
		private String shortDescription;
8
	private String shortDescription;
11
 
-
 
12
 
9
 
13
		private String imageUrl;
10
	private String imageUrl;
14
		private float totalAmount;
11
	private float totalAmount;
15
		private int totalQuantity;
12
	private int totalQuantity;
16
		
13
 
17
		List<ItemQuantityPojo> itemAvailabilityPojos;
14
	List<ItemQuantityPojo> itemAvailabilityPojos;
18
		
-
 
19
		public static final Map<Integer, Map<Integer, Integer>> bucketList = new HashMap<>();
15
	List<FofoCatalogResponse> fofoCatalogResponses;
20
		
-
 
21
 
16
 
22
		public int getId() {
17
	public int getId() {
23
			return id;
18
		return id;
24
		}
19
	}
25
 
-
 
26
 
20
 
27
		public void setId(int id) {
21
	public void setId(int id) {
28
			this.id = id;
22
		this.id = id;
29
		}
23
	}
30
 
-
 
31
 
24
 
32
		public String getTitle() {
25
	public String getTitle() {
33
			return title;
26
		return title;
34
		}
27
	}
35
 
-
 
36
 
28
 
37
		public void setTitle(String title) {
29
	public void setTitle(String title) {
38
			this.title = title;
30
		this.title = title;
39
		}
31
	}
40
 
-
 
41
 
32
 
42
		public String getShortDescription() {
33
	public String getShortDescription() {
43
			return shortDescription;
34
		return shortDescription;
44
		}
35
	}
45
 
-
 
46
 
36
 
47
		public void setShortDescription(String shortDescription) {
37
	public void setShortDescription(String shortDescription) {
48
			this.shortDescription = shortDescription;
38
		this.shortDescription = shortDescription;
49
		}
39
	}
50
 
-
 
51
 
40
 
52
		public String getImageUrl() {
41
	public String getImageUrl() {
53
			return imageUrl;
42
		return imageUrl;
54
		}
43
	}
55
 
-
 
56
 
44
 
57
		public void setImageUrl(String imageUrl) {
45
	public void setImageUrl(String imageUrl) {
58
			this.imageUrl = imageUrl;
46
		this.imageUrl = imageUrl;
59
		}
47
	}
60
 
-
 
61
		
-
 
62
 
48
 
63
		@Override
49
	@Override
64
		public int hashCode() {
50
	public int hashCode() {
65
			final int prime = 31;
51
		final int prime = 31;
66
			int result = 1;
52
		int result = 1;
67
			result = prime * result + id;
53
		result = prime * result + id;
68
			result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
54
		result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
69
			result = prime * result + ((shortDescription == null) ? 0 : shortDescription.hashCode());
55
		result = prime * result + ((shortDescription == null) ? 0 : shortDescription.hashCode());
70
			result = prime * result + ((title == null) ? 0 : title.hashCode());
56
		result = prime * result + ((title == null) ? 0 : title.hashCode());
71
			result = prime * result + Float.floatToIntBits(totalAmount);
57
		result = prime * result + Float.floatToIntBits(totalAmount);
72
			result = prime * result + totalQuantity;
58
		result = prime * result + totalQuantity;
73
			return result;
59
		return result;
74
		}
60
	}
75
 
-
 
76
 
61
 
77
		@Override
62
	@Override
78
		public boolean equals(Object obj) {
63
	public boolean equals(Object obj) {
79
			if (this == obj)
64
		if (this == obj)
80
				return true;
-
 
81
			if (obj == null)
-
 
82
				return false;
-
 
83
			if (getClass() != obj.getClass())
-
 
84
				return false;
-
 
85
			Bucket other = (Bucket) obj;
-
 
86
			if (id != other.id)
-
 
87
				return false;
-
 
88
			if (imageUrl == null) {
-
 
89
				if (other.imageUrl != null)
-
 
90
					return false;
-
 
91
			} else if (!imageUrl.equals(other.imageUrl))
-
 
92
				return false;
-
 
93
			if (shortDescription == null) {
-
 
94
				if (other.shortDescription != null)
-
 
95
					return false;
-
 
96
			} else if (!shortDescription.equals(other.shortDescription))
-
 
97
				return false;
-
 
98
			if (title == null) {
-
 
99
				if (other.title != null)
-
 
100
					return false;
-
 
101
			} else if (!title.equals(other.title))
-
 
102
				return false;
-
 
103
			if (Float.floatToIntBits(totalAmount) != Float.floatToIntBits(other.totalAmount))
-
 
104
				return false;
-
 
105
			if (totalQuantity != other.totalQuantity)
-
 
106
				return false;
-
 
107
			return true;
65
			return true;
-
 
66
		if (obj == null)
-
 
67
			return false;
-
 
68
		if (getClass() != obj.getClass())
-
 
69
			return false;
-
 
70
		Bucket other = (Bucket) obj;
-
 
71
		if (id != other.id)
-
 
72
			return false;
-
 
73
		if (imageUrl == null) {
-
 
74
			if (other.imageUrl != null)
-
 
75
				return false;
-
 
76
		} else if (!imageUrl.equals(other.imageUrl))
-
 
77
			return false;
-
 
78
		if (shortDescription == null) {
-
 
79
			if (other.shortDescription != null)
-
 
80
				return false;
-
 
81
		} else if (!shortDescription.equals(other.shortDescription))
-
 
82
			return false;
-
 
83
		if (title == null) {
-
 
84
			if (other.title != null)
-
 
85
				return false;
-
 
86
		} else if (!title.equals(other.title))
-
 
87
			return false;
-
 
88
		if (Float.floatToIntBits(totalAmount) != Float.floatToIntBits(other.totalAmount))
-
 
89
			return false;
-
 
90
		if (totalQuantity != other.totalQuantity)
-
 
91
			return false;
108
		}
92
		return true;
109
 
93
	}
110
 
94
 
111
		public float getTotalAmount() {
95
	public float getTotalAmount() {
112
			return totalAmount;
96
		return totalAmount;
113
		}
97
	}
114
 
-
 
115
 
98
 
116
		public void setTotalAmount(float totalAmount) {
99
	public void setTotalAmount(float totalAmount) {
117
			this.totalAmount = totalAmount;
100
		this.totalAmount = totalAmount;
118
		}
101
	}
119
 
-
 
120
 
102
 
121
		public int getTotalQuantity() {
103
	public int getTotalQuantity() {
122
			return totalQuantity;
104
		return totalQuantity;
123
		}
105
	}
124
 
-
 
125
 
106
 
126
		public void setTotalQuantity(int totalQuantity) {
107
	public void setTotalQuantity(int totalQuantity) {
127
			this.totalQuantity = totalQuantity;
108
		this.totalQuantity = totalQuantity;
128
		}
109
	}
129
 
-
 
130
 
110
 
131
		@Override
111
	@Override
132
		public String toString() {
112
	public String toString() {
133
			return "Bucket [id=" + id + ", title=" + title + ", shortDescription=" + shortDescription + ", imageUrl="
113
		return "Bucket [id=" + id + ", title=" + title + ", shortDescription=" + shortDescription + ", imageUrl="
134
					+ imageUrl + ", totalAmount=" + totalAmount + ", totalValue=" + totalQuantity + "]";
114
				+ imageUrl + ", totalAmount=" + totalAmount + ", totalValue=" + totalQuantity + "]";
135
		}
115
	}
136
}
116
}