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