Subversion Repositories SmartDukaan

Rev

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

Rev 31860 Rev 34183
Line 21... Line 21...
21
/**
21
/**
22
 * @author amit
22
 * @author amit
23
 *
23
 *
24
 */
24
 */
25
@Entity
25
@Entity
26
@Table(name = "fofo.pending_order")
26
@Table(name = "transaction.loan_transaction")
27
public class LoanTransaction implements Serializable {
27
public class LoanTransaction implements Serializable {
28
 
28
 
29
	/**
-
 
30
	 * 
-
 
31
	 */
-
 
32
	private static final long serialVersionUID = 1L;
-
 
33
	@Id
29
	@Id
34
	@Column(name = "id")
30
	@Column(name = "loan_id")
35
	@GeneratedValue(strategy = GenerationType.IDENTITY)
-
 
36
	private int id;
31
	private int loanId;
37
 
32
 
38
	@Column(name = "fofo_id")
-
 
39
	private int fofoId;
-
 
40
 
-
 
41
	@Column(name = "customer_id")
-
 
42
	private int customerId;
-
 
43
 
-
 
44
	@Column(name = "pay_method")
-
 
45
	private String payMethod;
-
 
46
 
-
 
47
	@Column(name = "customer_gst_number")
-
 
48
	private String customerGstNumber;
-
 
49
 
-
 
50
	@Column(name = "customer_address_id")
-
 
51
	private int customerAddressId;
-
 
52
 
-
 
53
	@Column(name = "status")
-
 
54
	@Enumerated(EnumType.STRING)
-
 
55
	private OrderStatus status;
-
 
56
 
-
 
57
	public OrderStatus getStatus() {
-
 
58
		return status;
-
 
59
	}
-
 
60
 
-
 
61
	public void setStatus(OrderStatus status) {
-
 
62
		this.status = status;
-
 
63
	}
33
	@Id
64
 
-
 
65
	@Transient
-
 
66
	private Customer customer;
-
 
67
 
-
 
68
	@Convert(converter = LocalDateTimeAttributeConverter.class)
-
 
69
	@Column(name = "create_timestamp")
-
 
70
	private LocalDateTime createTimestamp = LocalDateTime.now();
-
 
71
 
-
 
72
	@Column(name = "total_amount")
34
	@Column(name = "transaction_id")
73
	private double totalAmount;
35
	private int transactionId;
74
	@Column(name = "cancelled_amount")
-
 
75
	private double cancelledAmount;
-
 
76
	@Column(name = "refunded_amount")
-
 
77
	private double refundedAmount;
-
 
78
	@Column(name = "paid_amount")
-
 
79
	private double paidAmount;
-
 
80
	@Column(name = "billed_amount")
-
 
81
	private double billedAmount;
-
 
82
 
-
 
83
	@Transient
-
 
84
	private List<PendingOrderItem> pendingOrderItems;
-
 
85
 
-
 
86
	public List<PendingOrderItem> getPendingOrderItems() {
-
 
87
		return pendingOrderItems;
-
 
88
	}
-
 
89
 
-
 
90
	public void setPendingOrderItems(List<PendingOrderItem> pendingOrderItems) {
-
 
91
		this.pendingOrderItems = pendingOrderItems;
-
 
92
	}
-
 
93
 
-
 
94
	@Override
-
 
95
	public String toString() {
-
 
96
		return "PendingOrder [id=" + id + ", fofoId=" + fofoId + ", customerId=" + customerId + ", payMethod="
-
 
97
				+ payMethod + ", customerGstNumber=" + customerGstNumber + ", customerAddressId=" + customerAddressId
-
 
98
				+ ", status=" + status + ", customer=" + customer + ", createTimestamp=" + createTimestamp
-
 
99
				+ ", totalAmount=" + totalAmount + ", cancelledAmount=" + cancelledAmount + ", refundedAmount="
-
 
100
				+ refundedAmount + ", paidAmount=" + paidAmount + ", billedAmount=" + billedAmount
-
 
101
				+ ", pendingOrderItems=" + pendingOrderItems + "]";
-
 
102
	}
-
 
103
 
-
 
104
	public int getId() {
-
 
105
		return id;
-
 
106
	}
-
 
107
 
-
 
108
	public Customer getCustomer() {
-
 
109
		return customer;
-
 
110
	}
-
 
111
 
-
 
112
	public void setCustomer(Customer customer) {
-
 
113
		this.customer = customer;
-
 
114
	}
-
 
115
 
-
 
116
	public void setId(int id) {
-
 
117
		this.id = id;
-
 
118
	}
-
 
119
 
-
 
120
	public int getFofoId() {
-
 
121
		return fofoId;
-
 
122
	}
-
 
123
 
-
 
124
	public String getPayMethod() {
-
 
125
		return payMethod;
-
 
126
	}
-
 
127
 
-
 
128
	public void setPayMethod(String payMethod) {
-
 
129
		this.payMethod = payMethod;
-
 
130
	}
-
 
131
 
-
 
132
	public void setFofoId(int fofoId) {
-
 
133
		this.fofoId = fofoId;
-
 
134
	}
-
 
135
 
-
 
136
	public int getCustomerId() {
-
 
137
		return customerId;
-
 
138
	}
-
 
139
 
-
 
140
	public void setCustomerId(int customerId) {
-
 
141
		this.customerId = customerId;
-
 
142
	}
-
 
143
 
-
 
144
	public String getCustomerGstNumber() {
-
 
145
		return customerGstNumber;
-
 
146
	}
-
 
147
 
-
 
148
	public void setCustomerGstNumber(String customerGstNumber) {
-
 
149
		this.customerGstNumber = customerGstNumber;
-
 
150
	}
-
 
151
 
-
 
152
	public int getCustomerAddressId() {
-
 
153
		return customerAddressId;
-
 
154
	}
-
 
155
 
-
 
156
	public void setCustomerAddressId(int customerAddressId) {
-
 
157
		this.customerAddressId = customerAddressId;
-
 
158
	}
-
 
159
 
-
 
160
	public LocalDateTime getCreateTimestamp() {
-
 
161
		return createTimestamp;
-
 
162
	}
-
 
163
 
-
 
164
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
-
 
165
		this.createTimestamp = createTimestamp;
-
 
166
	}
-
 
167
 
-
 
168
	public double getTotalAmount() {
-
 
169
		return totalAmount;
-
 
170
	}
-
 
171
 
-
 
172
	public void setTotalAmount(double totalAmount) {
-
 
173
		this.totalAmount = totalAmount;
-
 
174
	}
-
 
175
 
-
 
176
	public double getCancelledAmount() {
-
 
177
		return cancelledAmount;
-
 
178
	}
-
 
179
 
-
 
180
	public void setCancelledAmount(double cancelledAmount) {
-
 
181
		this.cancelledAmount = cancelledAmount;
-
 
182
	}
-
 
183
 
-
 
184
	public double getRefundedAmount() {
-
 
185
		return refundedAmount;
-
 
186
	}
-
 
187
 
-
 
188
	public void setRefundedAmount(double refundedAmount) {
-
 
189
		this.refundedAmount = refundedAmount;
-
 
190
	}
-
 
191
 
-
 
192
	public double getPaidAmount() {
-
 
193
		return paidAmount;
-
 
194
	}
-
 
195
 
-
 
196
	public void setPaidAmount(double paidAmount) {
-
 
197
		this.paidAmount = paidAmount;
-
 
198
	}
-
 
199
 
-
 
200
	public double getBilledAmount() {
-
 
201
		return billedAmount;
-
 
202
	}
-
 
203
 
-
 
204
	public void setBilledAmount(double billedAmount) {
-
 
205
		this.billedAmount = billedAmount;
-
 
206
	}
-
 
207
 
-
 
208
	public static long getSerialversionuid() {
-
 
209
		return serialVersionUID;
-
 
210
	}
-
 
211
 
-
 
212
	@Override
-
 
213
	public int hashCode() {
-
 
214
		final int prime = 31;
-
 
215
		int result = 1;
-
 
216
		long temp;
-
 
217
		temp = Double.doubleToLongBits(billedAmount);
-
 
218
		result = prime * result + (int) (temp ^ (temp >>> 32));
-
 
219
		temp = Double.doubleToLongBits(cancelledAmount);
-
 
220
		result = prime * result + (int) (temp ^ (temp >>> 32));
-
 
221
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
222
		result = prime * result + ((customer == null) ? 0 : customer.hashCode());
-
 
223
		result = prime * result + customerAddressId;
-
 
224
		result = prime * result + ((customerGstNumber == null) ? 0 : customerGstNumber.hashCode());
-
 
225
		result = prime * result + customerId;
-
 
226
		result = prime * result + fofoId;
-
 
227
		result = prime * result + id;
-
 
228
		temp = Double.doubleToLongBits(paidAmount);
-
 
229
		result = prime * result + (int) (temp ^ (temp >>> 32));
-
 
230
		result = prime * result + ((payMethod == null) ? 0 : payMethod.hashCode());
-
 
231
		result = prime * result + ((pendingOrderItems == null) ? 0 : pendingOrderItems.hashCode());
-
 
232
		temp = Double.doubleToLongBits(refundedAmount);
-
 
233
		result = prime * result + (int) (temp ^ (temp >>> 32));
-
 
234
		result = prime * result + ((status == null) ? 0 : status.hashCode());
-
 
235
		temp = Double.doubleToLongBits(totalAmount);
-
 
236
		result = prime * result + (int) (temp ^ (temp >>> 32));
-
 
237
		return result;
-
 
238
	}
-
 
239
 
-
 
240
	@Override
-
 
241
	public boolean equals(Object obj) {
-
 
242
		if (this == obj)
-
 
243
			return true;
-
 
244
		if (obj == null)
-
 
245
			return false;
-
 
246
		if (getClass() != obj.getClass())
-
 
247
			return false;
-
 
248
		LoanTransaction other = (LoanTransaction) obj;
-
 
249
		if (Double.doubleToLongBits(billedAmount) != Double.doubleToLongBits(other.billedAmount))
-
 
250
			return false;
-
 
251
		if (Double.doubleToLongBits(cancelledAmount) != Double.doubleToLongBits(other.cancelledAmount))
-
 
252
			return false;
-
 
253
		if (createTimestamp == null) {
-
 
254
			if (other.createTimestamp != null)
-
 
255
				return false;
-
 
256
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
257
			return false;
-
 
258
		if (customer == null) {
-
 
259
			if (other.customer != null)
-
 
260
				return false;
-
 
261
		} else if (!customer.equals(other.customer))
-
 
262
			return false;
-
 
263
		if (customerAddressId != other.customerAddressId)
-
 
264
			return false;
-
 
265
		if (customerGstNumber == null) {
-
 
266
			if (other.customerGstNumber != null)
-
 
267
				return false;
-
 
268
		} else if (!customerGstNumber.equals(other.customerGstNumber))
-
 
269
			return false;
-
 
270
		if (customerId != other.customerId)
-
 
271
			return false;
-
 
272
		if (fofoId != other.fofoId)
-
 
273
			return false;
-
 
274
		if (id != other.id)
-
 
275
			return false;
-
 
276
		if (Double.doubleToLongBits(paidAmount) != Double.doubleToLongBits(other.paidAmount))
-
 
277
			return false;
-
 
278
		if (payMethod == null) {
-
 
279
			if (other.payMethod != null)
-
 
280
				return false;
-
 
281
		} else if (!payMethod.equals(other.payMethod))
-
 
282
			return false;
-
 
283
		if (pendingOrderItems == null) {
-
 
284
			if (other.pendingOrderItems != null)
-
 
285
				return false;
-
 
286
		} else if (!pendingOrderItems.equals(other.pendingOrderItems))
-
 
287
			return false;
-
 
288
		if (Double.doubleToLongBits(refundedAmount) != Double.doubleToLongBits(other.refundedAmount))
-
 
289
			return false;
-
 
290
		if (status != other.status)
-
 
291
			return false;
-
 
292
		if (Double.doubleToLongBits(totalAmount) != Double.doubleToLongBits(other.totalAmount))
-
 
293
			return false;
-
 
294
		return true;
-
 
295
	}
-
 
296
 
36
 
297
}
37
}