| 24421 |
amit.gupta |
1 |
package com.spice.profitmandi.dao.entity.user;
|
|
|
2 |
|
| 24423 |
amit.gupta |
3 |
import java.io.Serializable;
|
| 24421 |
amit.gupta |
4 |
import java.time.LocalDateTime;
|
|
|
5 |
|
|
|
6 |
import javax.persistence.Column;
|
|
|
7 |
import javax.persistence.Entity;
|
|
|
8 |
import javax.persistence.Id;
|
|
|
9 |
import javax.persistence.Table;
|
|
|
10 |
|
|
|
11 |
/**
|
|
|
12 |
* This class basically contains cart details
|
|
|
13 |
*
|
|
|
14 |
* @author ashikali
|
|
|
15 |
*
|
|
|
16 |
*/
|
|
|
17 |
@Entity
|
|
|
18 |
@Table(name="user.line", schema = "user")
|
|
|
19 |
|
| 24423 |
amit.gupta |
20 |
public class CartLine implements Serializable {
|
| 24421 |
amit.gupta |
21 |
@Id
|
|
|
22 |
@Column(name="cart_id")
|
|
|
23 |
private int cartId;
|
|
|
24 |
@Id
|
|
|
25 |
@Column(name="item_id")
|
|
|
26 |
private int itemId;
|
|
|
27 |
|
|
|
28 |
@Column(name="quantity")
|
|
|
29 |
private int quantity;
|
|
|
30 |
|
|
|
31 |
@Column(name="line_status")
|
|
|
32 |
private int lineStatus;
|
|
|
33 |
|
|
|
34 |
@Column(name="estimate")
|
|
|
35 |
private int estimate;
|
|
|
36 |
|
|
|
37 |
@Column(name="created_on")
|
|
|
38 |
private LocalDateTime createTimestamp;
|
|
|
39 |
|
|
|
40 |
@Column(name="updated_on")
|
|
|
41 |
private LocalDateTime updateTimestapm;
|
|
|
42 |
|
|
|
43 |
@Column(name="actual_price")
|
|
|
44 |
private float actualPrice;
|
|
|
45 |
|
|
|
46 |
@Column(name="discounted_price")
|
|
|
47 |
private float discountedPrice;
|
|
|
48 |
|
|
|
49 |
@Column(name="insurer")
|
|
|
50 |
private int insurer;
|
|
|
51 |
|
|
|
52 |
@Column(name="insuranceAmount")
|
|
|
53 |
private float insuranceAmount;
|
|
|
54 |
|
|
|
55 |
@Column(name="dataProtectionInsurer")
|
|
|
56 |
private int dataProtectionInsurer;
|
|
|
57 |
|
|
|
58 |
@Column(name="dataProtectionAmount")
|
|
|
59 |
private float dataProtectionAmount;
|
|
|
60 |
|
|
|
61 |
@Column(name="dealText")
|
|
|
62 |
private String dealText;
|
|
|
63 |
|
|
|
64 |
@Override
|
|
|
65 |
public String toString() {
|
|
|
66 |
return "CartLine [cartId=" + cartId + ", itemId=" + itemId + ", quantity=" + quantity + ", lineStatus="
|
|
|
67 |
+ lineStatus + ", estimate=" + estimate + ", createTimestamp=" + createTimestamp + ", updateTimestapm="
|
|
|
68 |
+ updateTimestapm + ", actualPrice=" + actualPrice + ", discountedPrice=" + discountedPrice
|
|
|
69 |
+ ", insurer=" + insurer + ", insuranceAmount=" + insuranceAmount + ", dataProtectionInsurer="
|
|
|
70 |
+ dataProtectionInsurer + ", dataProtectionAmount=" + dataProtectionAmount + ", dealText=" + dealText
|
|
|
71 |
+ "]";
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
public int getCartId() {
|
|
|
75 |
return cartId;
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
public void setCartId(int cartId) {
|
|
|
79 |
this.cartId = cartId;
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
public int getItemId() {
|
|
|
83 |
return itemId;
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
public void setItemId(int itemId) {
|
|
|
87 |
this.itemId = itemId;
|
|
|
88 |
}
|
|
|
89 |
|
|
|
90 |
public int getQuantity() {
|
|
|
91 |
return quantity;
|
|
|
92 |
}
|
|
|
93 |
|
|
|
94 |
public void setQuantity(int quantity) {
|
|
|
95 |
this.quantity = quantity;
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
public int getLineStatus() {
|
|
|
99 |
return lineStatus;
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
public void setLineStatus(int lineStatus) {
|
|
|
103 |
this.lineStatus = lineStatus;
|
|
|
104 |
}
|
|
|
105 |
|
|
|
106 |
public int getEstimate() {
|
|
|
107 |
return estimate;
|
|
|
108 |
}
|
|
|
109 |
|
|
|
110 |
public void setEstimate(int estimate) {
|
|
|
111 |
this.estimate = estimate;
|
|
|
112 |
}
|
|
|
113 |
|
|
|
114 |
public LocalDateTime getCreateTimestamp() {
|
|
|
115 |
return createTimestamp;
|
|
|
116 |
}
|
|
|
117 |
|
|
|
118 |
public void setCreateTimestamp(LocalDateTime createTimestamp) {
|
|
|
119 |
this.createTimestamp = createTimestamp;
|
|
|
120 |
}
|
|
|
121 |
|
|
|
122 |
public LocalDateTime getUpdateTimestapm() {
|
|
|
123 |
return updateTimestapm;
|
|
|
124 |
}
|
|
|
125 |
|
|
|
126 |
public void setUpdateTimestapm(LocalDateTime updateTimestapm) {
|
|
|
127 |
this.updateTimestapm = updateTimestapm;
|
|
|
128 |
}
|
|
|
129 |
|
|
|
130 |
public float getActualPrice() {
|
|
|
131 |
return actualPrice;
|
|
|
132 |
}
|
|
|
133 |
|
|
|
134 |
public void setActualPrice(float actualPrice) {
|
|
|
135 |
this.actualPrice = actualPrice;
|
|
|
136 |
}
|
|
|
137 |
|
|
|
138 |
public float getDiscountedPrice() {
|
|
|
139 |
return discountedPrice;
|
|
|
140 |
}
|
|
|
141 |
|
|
|
142 |
public void setDiscountedPrice(float discountedPrice) {
|
|
|
143 |
this.discountedPrice = discountedPrice;
|
|
|
144 |
}
|
|
|
145 |
|
|
|
146 |
public int getInsurer() {
|
|
|
147 |
return insurer;
|
|
|
148 |
}
|
|
|
149 |
|
|
|
150 |
public void setInsurer(int insurer) {
|
|
|
151 |
this.insurer = insurer;
|
|
|
152 |
}
|
|
|
153 |
|
|
|
154 |
public float getInsuranceAmount() {
|
|
|
155 |
return insuranceAmount;
|
|
|
156 |
}
|
|
|
157 |
|
|
|
158 |
public void setInsuranceAmount(float insuranceAmount) {
|
|
|
159 |
this.insuranceAmount = insuranceAmount;
|
|
|
160 |
}
|
|
|
161 |
|
|
|
162 |
public int getDataProtectionInsurer() {
|
|
|
163 |
return dataProtectionInsurer;
|
|
|
164 |
}
|
|
|
165 |
|
|
|
166 |
public void setDataProtectionInsurer(int dataProtectionInsurer) {
|
|
|
167 |
this.dataProtectionInsurer = dataProtectionInsurer;
|
|
|
168 |
}
|
|
|
169 |
|
|
|
170 |
public float getDataProtectionAmount() {
|
|
|
171 |
return dataProtectionAmount;
|
|
|
172 |
}
|
|
|
173 |
|
|
|
174 |
public void setDataProtectionAmount(float dataProtectionAmount) {
|
|
|
175 |
this.dataProtectionAmount = dataProtectionAmount;
|
|
|
176 |
}
|
|
|
177 |
|
|
|
178 |
public String getDealText() {
|
|
|
179 |
return dealText;
|
|
|
180 |
}
|
|
|
181 |
|
|
|
182 |
public void setDealText(String dealText) {
|
|
|
183 |
this.dealText = dealText;
|
|
|
184 |
}
|
|
|
185 |
|
|
|
186 |
@Override
|
|
|
187 |
public int hashCode() {
|
|
|
188 |
final int prime = 31;
|
|
|
189 |
int result = 1;
|
|
|
190 |
result = prime * result + Float.floatToIntBits(actualPrice);
|
|
|
191 |
result = prime * result + cartId;
|
|
|
192 |
result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
|
|
|
193 |
result = prime * result + Float.floatToIntBits(dataProtectionAmount);
|
|
|
194 |
result = prime * result + dataProtectionInsurer;
|
|
|
195 |
result = prime * result + ((dealText == null) ? 0 : dealText.hashCode());
|
|
|
196 |
result = prime * result + Float.floatToIntBits(discountedPrice);
|
|
|
197 |
result = prime * result + estimate;
|
|
|
198 |
result = prime * result + Float.floatToIntBits(insuranceAmount);
|
|
|
199 |
result = prime * result + insurer;
|
|
|
200 |
result = prime * result + itemId;
|
|
|
201 |
result = prime * result + lineStatus;
|
|
|
202 |
result = prime * result + quantity;
|
|
|
203 |
result = prime * result + ((updateTimestapm == null) ? 0 : updateTimestapm.hashCode());
|
|
|
204 |
return result;
|
|
|
205 |
}
|
|
|
206 |
|
|
|
207 |
@Override
|
|
|
208 |
public boolean equals(Object obj) {
|
|
|
209 |
if (this == obj)
|
|
|
210 |
return true;
|
|
|
211 |
if (obj == null)
|
|
|
212 |
return false;
|
|
|
213 |
if (getClass() != obj.getClass())
|
|
|
214 |
return false;
|
|
|
215 |
CartLine other = (CartLine) obj;
|
|
|
216 |
if (Float.floatToIntBits(actualPrice) != Float.floatToIntBits(other.actualPrice))
|
|
|
217 |
return false;
|
|
|
218 |
if (cartId != other.cartId)
|
|
|
219 |
return false;
|
|
|
220 |
if (createTimestamp == null) {
|
|
|
221 |
if (other.createTimestamp != null)
|
|
|
222 |
return false;
|
|
|
223 |
} else if (!createTimestamp.equals(other.createTimestamp))
|
|
|
224 |
return false;
|
|
|
225 |
if (Float.floatToIntBits(dataProtectionAmount) != Float.floatToIntBits(other.dataProtectionAmount))
|
|
|
226 |
return false;
|
|
|
227 |
if (dataProtectionInsurer != other.dataProtectionInsurer)
|
|
|
228 |
return false;
|
|
|
229 |
if (dealText == null) {
|
|
|
230 |
if (other.dealText != null)
|
|
|
231 |
return false;
|
|
|
232 |
} else if (!dealText.equals(other.dealText))
|
|
|
233 |
return false;
|
|
|
234 |
if (Float.floatToIntBits(discountedPrice) != Float.floatToIntBits(other.discountedPrice))
|
|
|
235 |
return false;
|
|
|
236 |
if (estimate != other.estimate)
|
|
|
237 |
return false;
|
|
|
238 |
if (Float.floatToIntBits(insuranceAmount) != Float.floatToIntBits(other.insuranceAmount))
|
|
|
239 |
return false;
|
|
|
240 |
if (insurer != other.insurer)
|
|
|
241 |
return false;
|
|
|
242 |
if (itemId != other.itemId)
|
|
|
243 |
return false;
|
|
|
244 |
if (lineStatus != other.lineStatus)
|
|
|
245 |
return false;
|
|
|
246 |
if (quantity != other.quantity)
|
|
|
247 |
return false;
|
|
|
248 |
if (updateTimestapm == null) {
|
|
|
249 |
if (other.updateTimestapm != null)
|
|
|
250 |
return false;
|
|
|
251 |
} else if (!updateTimestapm.equals(other.updateTimestapm))
|
|
|
252 |
return false;
|
|
|
253 |
return true;
|
|
|
254 |
}
|
|
|
255 |
|
|
|
256 |
|
|
|
257 |
}
|