Subversion Repositories SmartDukaan

Rev

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

Rev 33399 Rev 33436
Line 3... Line 3...
3
import java.time.LocalDateTime;
3
import java.time.LocalDateTime;
4
import java.util.Arrays;
4
import java.util.Arrays;
5
import java.util.List;
5
import java.util.List;
6
import java.util.Objects;
6
import java.util.Objects;
7
 
7
 
-
 
8
import com.spice.profitmandi.common.model.PendingOrderItemPolicyPlan;
8
import com.spice.profitmandi.dao.cart.CartItemMessage;
9
import com.spice.profitmandi.dao.cart.CartItemMessage;
-
 
10
 
9
import com.spice.profitmandi.service.inventory.BulkPricing;
11
import com.spice.profitmandi.service.inventory.BulkPricing;
10
 
12
 
11
public class CartItemResponseModel {
13
public class CartItemResponseModel {
12
	private String imageUrl;
14
	private String imageUrl;
13
	private String dealText;
15
	private String dealText;
Line 18... Line 20...
18
	private int packQuantity;
20
	private int packQuantity;
19
	private int minBuyQuantity;
21
	private int minBuyQuantity;
20
	private BulkPricing[] bulkPricing;
22
	private BulkPricing[] bulkPricing;
21
	private String categoryName;
23
	private String categoryName;
22
	private double sellingPrice;
24
	private double sellingPrice;
23
	private double extendedWarrantyPrice;
25
	private PendingOrderItemPolicyPlan pendingOrderItemPolicyPlan;
24
	private String title;
26
	private String title;
25
	private List<CartItemMessage> cartItemMessages;
27
	private List<CartItemMessage> cartItemMessages;
26
	private String color;
28
	private String color;
27
	private long quantity;
29
	private long quantity;
28
	private long catalogItemId;
30
	private long catalogItemId;
Line 33... Line 35...
33
	@Override
35
	@Override
34
	public boolean equals(Object o) {
36
	public boolean equals(Object o) {
35
		if (this == o) return true;
37
		if (this == o) return true;
36
		if (o == null || getClass() != o.getClass()) return false;
38
		if (o == null || getClass() != o.getClass()) return false;
37
		CartItemResponseModel that = (CartItemResponseModel) o;
39
		CartItemResponseModel that = (CartItemResponseModel) o;
38
		return itemId == that.itemId && maxQuantity == that.maxQuantity && estimate == that.estimate && quantityStep == that.quantityStep && packQuantity == that.packQuantity && minBuyQuantity == that.minBuyQuantity && Double.compare(that.sellingPrice, sellingPrice) == 0 && Double.compare(that.extendedWarrantyPrice, extendedWarrantyPrice) == 0 && quantity == that.quantity && catalogItemId == that.catalogItemId && availability == that.availability && Objects.equals(imageUrl, that.imageUrl) && Objects.equals(dealText, that.dealText) && Arrays.equals(bulkPricing, that.bulkPricing) && Objects.equals(categoryName, that.categoryName) && Objects.equals(title, that.title) && Objects.equals(cartItemMessages, that.cartItemMessages) && Objects.equals(color, that.color) && Objects.equals(promiseDelivery, that.promiseDelivery);
40
		return itemId == that.itemId && maxQuantity == that.maxQuantity && estimate == that.estimate && quantityStep == that.quantityStep && packQuantity == that.packQuantity && minBuyQuantity == that.minBuyQuantity && Double.compare(sellingPrice, that.sellingPrice) == 0 && quantity == that.quantity && catalogItemId == that.catalogItemId && availability == that.availability && Objects.equals(imageUrl, that.imageUrl) && Objects.equals(dealText, that.dealText) && Arrays.equals(bulkPricing, that.bulkPricing) && Objects.equals(categoryName, that.categoryName) && Objects.equals(pendingOrderItemPolicyPlan, that.pendingOrderItemPolicyPlan) && Objects.equals(title, that.title) && Objects.equals(cartItemMessages, that.cartItemMessages) && Objects.equals(color, that.color) && Objects.equals(promiseDelivery, that.promiseDelivery);
39
	}
41
	}
40
 
42
 
41
	@Override
43
	@Override
42
	public int hashCode() {
44
	public int hashCode() {
43
		int result = Objects.hash(imageUrl, dealText, itemId, maxQuantity, estimate, quantityStep, packQuantity, minBuyQuantity, categoryName, sellingPrice, extendedWarrantyPrice, title, cartItemMessages, color, quantity, catalogItemId, promiseDelivery, availability);
45
		int result = Objects.hash(imageUrl, dealText, itemId, maxQuantity, estimate, quantityStep, packQuantity, minBuyQuantity, categoryName, sellingPrice, pendingOrderItemPolicyPlan, title, cartItemMessages, color, quantity, catalogItemId, promiseDelivery, availability);
44
		result = 31 * result + Arrays.hashCode(bulkPricing);
46
		result = 31 * result + Arrays.hashCode(bulkPricing);
45
		return result;
47
		return result;
46
	}
48
	}
47
 
49
 
48
	@Override
50
	@Override
Line 57... Line 59...
57
				", packQuantity=" + packQuantity +
59
				", packQuantity=" + packQuantity +
58
				", minBuyQuantity=" + minBuyQuantity +
60
				", minBuyQuantity=" + minBuyQuantity +
59
				", bulkPricing=" + Arrays.toString(bulkPricing) +
61
				", bulkPricing=" + Arrays.toString(bulkPricing) +
60
				", categoryName='" + categoryName + '\'' +
62
				", categoryName='" + categoryName + '\'' +
61
				", sellingPrice=" + sellingPrice +
63
				", sellingPrice=" + sellingPrice +
62
				", extendedWarrantyPrice=" + extendedWarrantyPrice +
64
				", pendingOrderItemPolicyPlan=" + pendingOrderItemPolicyPlan +
63
				", title='" + title + '\'' +
65
				", title='" + title + '\'' +
64
				", cartItemMessages=" + cartItemMessages +
66
				", cartItemMessages=" + cartItemMessages +
65
				", color='" + color + '\'' +
67
				", color='" + color + '\'' +
66
				", quantity=" + quantity +
68
				", quantity=" + quantity +
67
				", catalogItemId=" + catalogItemId +
69
				", catalogItemId=" + catalogItemId +
68
				", promiseDelivery=" + promiseDelivery +
70
				", promiseDelivery=" + promiseDelivery +
69
				", shortQty=" + availability +
71
				", availability=" + availability +
70
				'}';
72
				'}';
71
	}
73
	}
72
 
74
 
73
	public int getAvailability() {
75
	public int getAvailability() {
74
		return availability;
76
		return availability;
Line 120... Line 122...
120
 
122
 
121
	public int getEstimate() {
123
	public int getEstimate() {
122
		return estimate;
124
		return estimate;
123
	}
125
	}
124
 
126
 
125
	public double getExtendedWarrantyPrice() {
-
 
126
		return extendedWarrantyPrice;
-
 
127
	}
-
 
128
 
-
 
129
	public void setExtendedWarrantyPrice(double extendedWarrantyPrice) {
-
 
130
		this.extendedWarrantyPrice = extendedWarrantyPrice;
-
 
131
	}
-
 
132
 
-
 
133
	public void setEstimate(int estimate) {
127
	public void setEstimate(int estimate) {
134
		this.estimate = estimate;
128
		this.estimate = estimate;
135
	}
129
	}
136
 
130
 
137
	public int getQuantityStep() {
131
	public int getQuantityStep() {
Line 220... Line 214...
220
 
214
 
221
	public void setCatalogItemId(long catalogItemId) {
215
	public void setCatalogItemId(long catalogItemId) {
222
		this.catalogItemId = catalogItemId;
216
		this.catalogItemId = catalogItemId;
223
	}
217
	}
224
 
218
 
-
 
219
	public PendingOrderItemPolicyPlan getPendingOrderItemPolicyPlan() {
-
 
220
		return pendingOrderItemPolicyPlan;
-
 
221
	}
-
 
222
 
-
 
223
	public void setPendingOrderItemPolicyPlan(PendingOrderItemPolicyPlan pendingOrderItemPolicyPlan) {
-
 
224
		this.pendingOrderItemPolicyPlan = pendingOrderItemPolicyPlan;
-
 
225
	}
225
}
226
}