Subversion Repositories SmartDukaan

Rev

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

Rev 25726 Rev 26817
Line 55... Line 55...
55
	@Convert(converter = LocalDateTimeAttributeConverter.class)
55
	@Convert(converter = LocalDateTimeAttributeConverter.class)
56
	@Column(name = "cancelled_timestamp")
56
	@Column(name = "cancelled_timestamp")
57
	private LocalDateTime cancelledTimestamp;	
57
	private LocalDateTime cancelledTimestamp;	
58
	
58
	
59
	
59
	
-
 
60
	//@Convert(converter = LocalDateTimeAttributeConverter.class)
-
 
61
	//@Column(name = "billing_timestamp")
-
 
62
	@Transient
-
 
63
	private LocalDateTime billingTimestamp;	
-
 
64
	
-
 
65
	
60
	@Transient
66
	@Transient
61
	private FofoOrderItem orderItem;
67
	private FofoOrderItem orderItem;
62
	
68
	
63
	
69
	
64
	@Transient
70
	@Transient
Line 140... Line 146...
140
	public String getFormattedDate(){
146
	public String getFormattedDate(){
141
    	DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm");
147
    	DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy HH:mm");
142
		return this.createTimestamp.format(formatter);
148
		return this.createTimestamp.format(formatter);
143
    }
149
    }
144
	
150
	
-
 
151
	
-
 
152
	
145
	@Override
153
	@Override
146
	public int hashCode() {
154
	public int hashCode() {
147
		final int prime = 31;
155
		final int prime = 31;
148
		int result = 1;
156
		int result = 1;
-
 
157
		result = prime * result + ((billingTimestamp == null) ? 0 : billingTimestamp.hashCode());
-
 
158
		result = prime * result + ((cancelledTimestamp == null) ? 0 : cancelledTimestamp.hashCode());
-
 
159
		result = prime * result + Float.floatToIntBits(cashback);
-
 
160
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
161
		result = prime * result + customerAddressId;
-
 
162
		result = prime * result + ((customerGstNumber == null) ? 0 : customerGstNumber.hashCode());
-
 
163
		result = prime * result + customerId;
-
 
164
		result = prime * result + ((dateOfBirth == null) ? 0 : dateOfBirth.hashCode());
-
 
165
		result = prime * result + fofoId;
149
		result = prime * result + id;
166
		result = prime * result + id;
-
 
167
		result = prime * result + ((invoiceNumber == null) ? 0 : invoiceNumber.hashCode());
-
 
168
		result = prime * result + ((orderItem == null) ? 0 : orderItem.hashCode());
-
 
169
		result = prime * result + Float.floatToIntBits(totalAmount);
150
		return result;
170
		return result;
151
	}
171
	}
152
	
172
	
153
	@Override
173
	@Override
154
	public boolean equals(Object obj) {
174
	public boolean equals(Object obj) {
Line 157... Line 177...
157
		if (obj == null)
177
		if (obj == null)
158
			return false;
178
			return false;
159
		if (getClass() != obj.getClass())
179
		if (getClass() != obj.getClass())
160
			return false;
180
			return false;
161
		FofoOrder other = (FofoOrder) obj;
181
		FofoOrder other = (FofoOrder) obj;
-
 
182
		if (billingTimestamp == null) {
-
 
183
			if (other.billingTimestamp != null)
-
 
184
				return false;
-
 
185
		} else if (!billingTimestamp.equals(other.billingTimestamp))
-
 
186
			return false;
-
 
187
		if (cancelledTimestamp == null) {
-
 
188
			if (other.cancelledTimestamp != null)
-
 
189
				return false;
-
 
190
		} else if (!cancelledTimestamp.equals(other.cancelledTimestamp))
-
 
191
			return false;
-
 
192
		if (Float.floatToIntBits(cashback) != Float.floatToIntBits(other.cashback))
-
 
193
			return false;
-
 
194
		if (createTimestamp == null) {
-
 
195
			if (other.createTimestamp != null)
-
 
196
				return false;
-
 
197
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
198
			return false;
-
 
199
		if (customerAddressId != other.customerAddressId)
-
 
200
			return false;
-
 
201
		if (customerGstNumber == null) {
-
 
202
			if (other.customerGstNumber != null)
-
 
203
				return false;
-
 
204
		} else if (!customerGstNumber.equals(other.customerGstNumber))
-
 
205
			return false;
-
 
206
		if (customerId != other.customerId)
-
 
207
			return false;
-
 
208
		if (dateOfBirth == null) {
-
 
209
			if (other.dateOfBirth != null)
-
 
210
				return false;
-
 
211
		} else if (!dateOfBirth.equals(other.dateOfBirth))
-
 
212
			return false;
-
 
213
		if (fofoId != other.fofoId)
-
 
214
			return false;
162
		if (id != other.id)
215
		if (id != other.id)
163
			return false;
216
			return false;
-
 
217
		if (invoiceNumber == null) {
-
 
218
			if (other.invoiceNumber != null)
-
 
219
				return false;
-
 
220
		} else if (!invoiceNumber.equals(other.invoiceNumber))
-
 
221
			return false;
-
 
222
		if (orderItem == null) {
-
 
223
			if (other.orderItem != null)
-
 
224
				return false;
-
 
225
		} else if (!orderItem.equals(other.orderItem))
-
 
226
			return false;
-
 
227
		if (Float.floatToIntBits(totalAmount) != Float.floatToIntBits(other.totalAmount))
-
 
228
			return false;
164
		return true;
229
		return true;
165
	}
230
	}
166
	
231
	
167
	@Override
232
	@Override
168
	public String toString() {
233
	public String toString() {
169
		return "FofoOrder [id=" + id + ", fofoId=" + fofoId + ", customerId=" + customerId + ", customerAddressId="
234
		return "FofoOrder [id=" + id + ", fofoId=" + fofoId + ", customerId=" + customerId + ", customerAddressId="
170
				+ customerAddressId + ", customerGstNumber=" + customerGstNumber + ", totalAmount=" + totalAmount
235
				+ customerAddressId + ", customerGstNumber=" + customerGstNumber + ", totalAmount=" + totalAmount
171
				+ ", invoiceNumber=" + invoiceNumber + ", cashback=" + cashback + ", createTimestamp=" + createTimestamp
236
				+ ", invoiceNumber=" + invoiceNumber + ", cashback=" + cashback + ", createTimestamp=" + createTimestamp
172
				+ ", cancelledTimestamp=" + cancelledTimestamp + ", orderItem=" + orderItem + ", dateOfBirth="
237
				+ ", cancelledTimestamp=" + cancelledTimestamp + ", billingTimestamp=" + billingTimestamp
173
				+ dateOfBirth + "]";
238
				+ ", orderItem=" + orderItem + ", dateOfBirth=" + dateOfBirth + "]";
174
	}
239
	}
175
	
240
	
176
}
241
}