Subversion Repositories SmartDukaan

Rev

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

Rev 26817 Rev 26924
Line 41... Line 41...
41
	@Column(name = "item_id")
41
	@Column(name = "item_id")
42
	private int itemId;
42
	private int itemId;
43
	
43
	
44
	@Transient
44
	@Transient
45
	private String itemName;
45
	private String itemName;
-
 
46
	
-
 
47
	@Transient
-
 
48
	private String imgUrl;
-
 
49
	
-
 
50
	
-
 
51
 
-
 
52
	public String getImgUrl() {
-
 
53
		return imgUrl;
-
 
54
	}
-
 
55
 
-
 
56
	public void setImgUrl(String imgUrl) {
-
 
57
		this.imgUrl = imgUrl;
-
 
58
	}
46
 
59
 
47
	@Column(name = "quantity")
60
	@Column(name = "quantity")
48
	private int quantity;
61
	private int quantity;
49
 
62
 
50
	@Column(name = "selling_price")
63
	@Column(name = "selling_price")
51
	private float sellingPrice;
64
	private float sellingPrice;
52
 
65
 
53
	@Column(name = "status")
66
	@Column(name = "status")
54
	private String status;
67
	private String status;
-
 
68
	
-
 
69
	@Column(name = "scheduled_delivery_time")
-
 
70
	private LocalDateTime scheduledDeliveryTime;
55
 
71
 
56
	@Convert(converter = LocalDateTimeAttributeConverter.class)
72
	@Convert(converter = LocalDateTimeAttributeConverter.class)
57
	@Column(name = "create_timestamp")
73
	@Column(name = "create_timestamp")
58
	private LocalDateTime createTimestamp = LocalDateTime.now();
74
	private LocalDateTime createTimestamp = LocalDateTime.now();
59
 
75
 
60
	public String getStatus() {
76
	public String getStatus() {
61
		return status;
77
		return status;
62
	}
78
	}
-
 
79
	
-
 
80
	
-
 
81
	
-
 
82
 
-
 
83
	@Override
-
 
84
	public int hashCode() {
-
 
85
		final int prime = 31;
-
 
86
		int result = 1;
-
 
87
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
88
		result = prime * result + id;
-
 
89
		result = prime * result + ((imgUrl == null) ? 0 : imgUrl.hashCode());
-
 
90
		result = prime * result + itemId;
-
 
91
		result = prime * result + ((itemName == null) ? 0 : itemName.hashCode());
-
 
92
		result = prime * result + orderId;
-
 
93
		result = prime * result + quantity;
-
 
94
		result = prime * result + ((scheduledDeliveryTime == null) ? 0 : scheduledDeliveryTime.hashCode());
-
 
95
		result = prime * result + Float.floatToIntBits(sellingPrice);
-
 
96
		result = prime * result + ((status == null) ? 0 : status.hashCode());
-
 
97
		return result;
-
 
98
	}
-
 
99
 
-
 
100
	@Override
-
 
101
	public boolean equals(Object obj) {
-
 
102
		if (this == obj)
-
 
103
			return true;
-
 
104
		if (obj == null)
-
 
105
			return false;
-
 
106
		if (getClass() != obj.getClass())
-
 
107
			return false;
-
 
108
		PendingOrderItem other = (PendingOrderItem) obj;
-
 
109
		if (createTimestamp == null) {
-
 
110
			if (other.createTimestamp != null)
-
 
111
				return false;
-
 
112
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
113
			return false;
-
 
114
		if (id != other.id)
-
 
115
			return false;
-
 
116
		if (imgUrl == null) {
-
 
117
			if (other.imgUrl != null)
-
 
118
				return false;
-
 
119
		} else if (!imgUrl.equals(other.imgUrl))
-
 
120
			return false;
-
 
121
		if (itemId != other.itemId)
-
 
122
			return false;
-
 
123
		if (itemName == null) {
-
 
124
			if (other.itemName != null)
-
 
125
				return false;
-
 
126
		} else if (!itemName.equals(other.itemName))
-
 
127
			return false;
-
 
128
		if (orderId != other.orderId)
-
 
129
			return false;
-
 
130
		if (quantity != other.quantity)
-
 
131
			return false;
-
 
132
		if (scheduledDeliveryTime == null) {
-
 
133
			if (other.scheduledDeliveryTime != null)
-
 
134
				return false;
-
 
135
		} else if (!scheduledDeliveryTime.equals(other.scheduledDeliveryTime))
-
 
136
			return false;
-
 
137
		if (Float.floatToIntBits(sellingPrice) != Float.floatToIntBits(other.sellingPrice))
-
 
138
			return false;
-
 
139
		if (status == null) {
-
 
140
			if (other.status != null)
-
 
141
				return false;
-
 
142
		} else if (!status.equals(other.status))
-
 
143
			return false;
-
 
144
		return true;
-
 
145
	}
-
 
146
 
-
 
147
	public LocalDateTime getScheduledDeliveryTime() {
-
 
148
		return scheduledDeliveryTime;
-
 
149
	}
-
 
150
 
-
 
151
	public void setScheduledDeliveryTime(LocalDateTime scheduledDeliveryTime) {
-
 
152
		this.scheduledDeliveryTime = scheduledDeliveryTime;
-
 
153
	}
63
 
154
 
64
	public void setStatus(String status) {
155
	public void setStatus(String status) {
65
		this.status = status;
156
		this.status = status;
66
	}
157
	}
67
 
158
 
Line 117... Line 208...
117
		return serialVersionUID;
208
		return serialVersionUID;
118
	}
209
	}
119
 
210
 
120
	@Override
211
	@Override
121
	public String toString() {
212
	public String toString() {
122
		return "PendingOrderItem [id=" + id + ", orderId=" + orderId + ", itemId=" + itemId + ", quantity=" + quantity
213
		return "PendingOrderItem [id=" + id + ", orderId=" + orderId + ", itemId=" + itemId + ", itemName=" + itemName
-
 
214
				+ ", imgUrl=" + imgUrl + ", quantity=" + quantity + ", sellingPrice=" + sellingPrice + ", status="
123
				+ ", sellingPrice=" + sellingPrice + ", status=" + status + ", createTimestamp=" + createTimestamp
215
				+ status + ", scheduledDeliveryTime=" + scheduledDeliveryTime + ", createTimestamp=" + createTimestamp
124
				+ "]";
216
				+ "]";
125
	}
217
	}
126
 
218
 
127
}
219
}