Subversion Repositories SmartDukaan

Rev

Rev 25880 | Go to most recent revision | Details | Last modification | View Log | RSS feed

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