Subversion Repositories SmartDukaan

Rev

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

Rev 34186 Rev 34287
Line 20... Line 20...
20
 
20
 
21
})
21
})
22
 
22
 
23
public class PendingOrderItem implements Serializable {
23
public class PendingOrderItem implements Serializable {
24
 
24
 
25
	public OrderStatus getStatus() {
-
 
26
		return status;
-
 
27
	}
-
 
28
 
-
 
29
	public String getItemName() {
-
 
30
		return itemName;
-
 
31
	}
-
 
32
 
-
 
33
	public void setItemName(String itemName) {
-
 
34
		this.itemName = itemName;
-
 
35
	}
-
 
36
 
-
 
37
	private static final long serialVersionUID = 1L;
25
	private static final long serialVersionUID = 1L;
38
 
26
 
39
	@Id
27
	@Id
40
	@Column(name = "id")
28
	@Column(name = "id")
41
	@GeneratedValue(strategy = GenerationType.IDENTITY)
29
	@GeneratedValue(strategy = GenerationType.IDENTITY)
Line 51... Line 39...
51
	private String remark;
39
	private String remark;
52
 
40
 
53
	@Column(name = "is_settled")
41
	@Column(name = "is_settled")
54
	private boolean isSettled;
42
	private boolean isSettled;
55
 
43
 
56
	public String getRemark() {
44
	@Column(name = "quantity")
57
		return remark;
45
	private int quantity;
58
	}
-
 
59
 
46
 
-
 
47
	@Column(name = "selling_price")
60
	public void setRemark(String remark) {
48
	private float sellingPrice;
-
 
49
 
61
		this.remark = remark;
50
	@Column(name = "status")
-
 
51
	@Enumerated(EnumType.STRING)
-
 
52
	private OrderStatus status;
-
 
53
 
-
 
54
	@Column(name = "status_description")
-
 
55
	private String statusDescription;
-
 
56
 
-
 
57
	@Column(name = "cancelled_timestamp")
-
 
58
	private LocalDateTime cancelledTimestamp;
-
 
59
 
-
 
60
	@Column(name = "billed_timestamp")
-
 
61
	private LocalDateTime billedTimestamp;
-
 
62
 
-
 
63
	@Column(name = "verified_timestamp")
-
 
64
	private LocalDateTime verifiedTimestamp;
-
 
65
 
-
 
66
	@Column(name = "delivered_timestamp")
-
 
67
	private LocalDateTime deliveredTimestamp;
-
 
68
 
-
 
69
	@Column(name = "claimed_timestamp")
-
 
70
	private LocalDateTime claimedTimestamp;
-
 
71
 
-
 
72
	@Column(name = "originalOrderId")
-
 
73
	private int originalOrderId;
-
 
74
 
-
 
75
	@Column(name = "scheduled_delivery_time")
-
 
76
	private LocalDateTime scheduledDeliveryTime;
62
	}
77
 
-
 
78
	@Convert(converter = LocalDateTimeAttributeConverter.class)
-
 
79
	@Column(name = "create_timestamp")
-
 
80
	private LocalDateTime createTimestamp = LocalDateTime.now();
63
 
81
 
64
	@Transient
82
	@Transient
65
	private String itemName;
83
	private String itemName;
66
 
84
 
67
	@Transient
85
	@Transient
68
	private int catalogId;
86
	private int catalogId;
69
 
87
 
70
	@Transient
88
	@Transient
71
	private String imgUrl;
89
	private String imgUrl;
72
 
90
 
-
 
91
	@Transient
-
 
92
	private PendingOrder pendingOrder;
-
 
93
 
-
 
94
	@Transient
-
 
95
	private FofoOrderItem fofoOrderItem;
-
 
96
 
-
 
97
	public OrderStatus getStatus() {
-
 
98
		return status;
-
 
99
	}
-
 
100
 
-
 
101
	public String getItemName() {
-
 
102
		return itemName;
-
 
103
	}
-
 
104
 
-
 
105
	public void setItemName(String itemName) {
-
 
106
		this.itemName = itemName;
-
 
107
	}
-
 
108
 
-
 
109
	public String getRemark() {
-
 
110
		return remark;
-
 
111
	}
-
 
112
 
-
 
113
	public void setRemark(String remark) {
-
 
114
		this.remark = remark;
-
 
115
	}
-
 
116
 
73
	public String getImgUrl() {
117
	public String getImgUrl() {
74
		return imgUrl;
118
		return imgUrl;
75
	}
119
	}
76
 
120
 
77
	public void setImgUrl(String imgUrl) {
121
	public void setImgUrl(String imgUrl) {
78
		this.imgUrl = imgUrl;
122
		this.imgUrl = imgUrl;
79
	}
123
	}
80
 
124
 
81
	@Column(name = "quantity")
-
 
82
	private int quantity;
-
 
83
 
-
 
84
	@Column(name = "selling_price")
-
 
85
	private float sellingPrice;
-
 
86
 
-
 
87
	@Transient
-
 
88
	private PendingOrder pendingOrder;
-
 
89
 
-
 
90
	public PendingOrder getPendingOrder() {
125
	public PendingOrder getPendingOrder() {
91
		return pendingOrder;
126
		return pendingOrder;
92
	}
127
	}
93
 
128
 
94
	public void setPendingOrder(PendingOrder pendingOrder) {
129
	public void setPendingOrder(PendingOrder pendingOrder) {
95
		this.pendingOrder = pendingOrder;
130
		this.pendingOrder = pendingOrder;
96
	}
131
	}
97
 
132
 
98
	@Column(name = "status")
-
 
99
	@Enumerated(EnumType.STRING)
-
 
100
	private OrderStatus status;
133
	public FofoOrderItem getFofoOrderItem() {
101
 
-
 
102
	@Column(name = "status_description")
-
 
103
	private String statusDescription;
134
		return fofoOrderItem;
104
 
-
 
105
	@Column(name = "cancelled_timestamp")
-
 
106
	private LocalDateTime cancelledTimestamp;
-
 
107
 
135
	}
108
	@Column(name = "billed_timestamp")
-
 
109
	private LocalDateTime billedTimestamp;
-
 
110
 
136
 
111
	@Column(name = "verified_timestamp")
137
	public void setFofoOrderItem(FofoOrderItem fofoOrderItem) {
112
	private LocalDateTime verifiedTimestamp;
138
		this.fofoOrderItem = fofoOrderItem;
-
 
139
	}
113
 
140
 
114
	public LocalDateTime getVerifiedTimestamp() {
141
	public LocalDateTime getVerifiedTimestamp() {
115
		return verifiedTimestamp;
142
		return verifiedTimestamp;
116
	}
143
	}
117
 
144
 
118
	public void setVerifiedTimestamp(LocalDateTime verifiedTimestamp) {
145
	public void setVerifiedTimestamp(LocalDateTime verifiedTimestamp) {
119
		this.verifiedTimestamp = verifiedTimestamp;
146
		this.verifiedTimestamp = verifiedTimestamp;
120
	}
147
	}
121
 
148
 
122
	@Column(name = "delivered_timestamp")
-
 
123
	private LocalDateTime deliveredTimestamp;
-
 
124
 
-
 
125
	@Column(name = "claimed_timestamp")
-
 
126
	private LocalDateTime claimedTimestamp;
-
 
127
 
-
 
128
	@Column(name = "originalOrderId")
-
 
129
	private int originalOrderId;
-
 
130
 
-
 
131
	public LocalDateTime getClaimedTimestamp() {
149
	public LocalDateTime getClaimedTimestamp() {
132
		return claimedTimestamp;
150
		return claimedTimestamp;
133
	}
151
	}
134
 
152
 
135
	public void setClaimedTimestamp(LocalDateTime claimedTimestamp) {
153
	public void setClaimedTimestamp(LocalDateTime claimedTimestamp) {
Line 186... Line 204...
186
 
204
 
187
	public void setOriginalOrderId(int originalOrderId) {
205
	public void setOriginalOrderId(int originalOrderId) {
188
		this.originalOrderId = originalOrderId;
206
		this.originalOrderId = originalOrderId;
189
	}
207
	}
190
 
208
 
191
	@Column(name = "scheduled_delivery_time")
-
 
192
	private LocalDateTime scheduledDeliveryTime;
-
 
193
 
-
 
194
	@Convert(converter = LocalDateTimeAttributeConverter.class)
-
 
195
	@Column(name = "create_timestamp")
-
 
196
	private LocalDateTime createTimestamp = LocalDateTime.now();
-
 
197
 
-
 
198
	@Override
-
 
199
	public boolean equals(Object o) {
-
 
200
		if (this == o) return true;
-
 
201
		if (o == null || getClass() != o.getClass()) return false;
-
 
202
		PendingOrderItem that = (PendingOrderItem) o;
-
 
203
		return id == that.id && orderId == that.orderId && itemId == that.itemId && isSettled == that.isSettled && quantity == that.quantity && Float.compare(sellingPrice, that.sellingPrice) == 0 && originalOrderId == that.originalOrderId && Objects.equals(remark, that.remark) && Objects.equals(itemName, that.itemName) && Objects.equals(imgUrl, that.imgUrl) && Objects.equals(pendingOrder, that.pendingOrder) && status == that.status && Objects.equals(statusDescription, that.statusDescription) && Objects.equals(cancelledTimestamp, that.cancelledTimestamp) && Objects.equals(billedTimestamp, that.billedTimestamp) && Objects.equals(verifiedTimestamp, that.verifiedTimestamp) && Objects.equals(deliveredTimestamp, that.deliveredTimestamp) && Objects.equals(claimedTimestamp, that.claimedTimestamp) && Objects.equals(scheduledDeliveryTime, that.scheduledDeliveryTime) && Objects.equals(createTimestamp, that.createTimestamp);
-
 
204
	}
-
 
205
 
-
 
206
	@Override
-
 
207
	public int hashCode() {
-
 
208
		return Objects.hash(id, orderId, itemId, remark, isSettled, itemName, imgUrl, quantity, sellingPrice, pendingOrder, status, statusDescription, cancelledTimestamp, billedTimestamp, verifiedTimestamp, deliveredTimestamp, claimedTimestamp, originalOrderId, scheduledDeliveryTime, createTimestamp);
-
 
209
	}
-
 
210
 
-
 
211
	public LocalDateTime getScheduledDeliveryTime() {
209
	public LocalDateTime getScheduledDeliveryTime() {
212
		return scheduledDeliveryTime;
210
		return scheduledDeliveryTime;
213
	}
211
	}
214
 
212
 
215
	public void setScheduledDeliveryTime(LocalDateTime scheduledDeliveryTime) {
213
	public void setScheduledDeliveryTime(LocalDateTime scheduledDeliveryTime) {
Line 275... Line 273...
275
	public void setCatalogId(int catalogId) {
273
	public void setCatalogId(int catalogId) {
276
		this.catalogId = catalogId;
274
		this.catalogId = catalogId;
277
	}
275
	}
278
 
276
 
279
	@Override
277
	@Override
-
 
278
	public boolean equals(Object o) {
-
 
279
		if (this == o) return true;
-
 
280
		if (o == null || getClass() != o.getClass()) return false;
-
 
281
		PendingOrderItem that = (PendingOrderItem) o;
-
 
282
		return id == that.id && orderId == that.orderId && itemId == that.itemId && isSettled == that.isSettled && quantity == that.quantity && Float.compare(sellingPrice, that.sellingPrice) == 0 && originalOrderId == that.originalOrderId && Objects.equals(remark, that.remark) && Objects.equals(itemName, that.itemName) && Objects.equals(imgUrl, that.imgUrl) && Objects.equals(pendingOrder, that.pendingOrder) && status == that.status && Objects.equals(statusDescription, that.statusDescription) && Objects.equals(cancelledTimestamp, that.cancelledTimestamp) && Objects.equals(billedTimestamp, that.billedTimestamp) && Objects.equals(verifiedTimestamp, that.verifiedTimestamp) && Objects.equals(deliveredTimestamp, that.deliveredTimestamp) && Objects.equals(claimedTimestamp, that.claimedTimestamp) && Objects.equals(scheduledDeliveryTime, that.scheduledDeliveryTime) && Objects.equals(createTimestamp, that.createTimestamp);
-
 
283
	}
-
 
284
 
-
 
285
	@Override
-
 
286
	public int hashCode() {
-
 
287
		return Objects.hash(id, orderId, itemId, remark, isSettled, itemName, imgUrl, quantity, sellingPrice, pendingOrder, status, statusDescription, cancelledTimestamp, billedTimestamp, verifiedTimestamp, deliveredTimestamp, claimedTimestamp, originalOrderId, scheduledDeliveryTime, createTimestamp);
-
 
288
	}
-
 
289
 
-
 
290
	@Override
280
	public String toString() {
291
	public String toString() {
281
		return "PendingOrderItem{" +
292
		return "PendingOrderItem{" +
282
				"id=" + id +
293
				"id=" + id +
283
				", orderId=" + orderId +
294
				", orderId=" + orderId +
284
				", itemId=" + itemId +
295
				", itemId=" + itemId +