1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.batch.sample.domain.order;
18
19
20 public class BillingInfo {
21 public static final String LINE_ID_BILLING_INFO = "BIN";
22
23 private String paymentId;
24
25 private String paymentDesc;
26
27 public String getPaymentDesc() {
28 return paymentDesc;
29 }
30
31 public void setPaymentDesc(String paymentDesc) {
32 this.paymentDesc = paymentDesc;
33 }
34
35 public String getPaymentId() {
36 return paymentId;
37 }
38
39 public void setPaymentId(String paymentId) {
40 this.paymentId = paymentId;
41 }
42
43 @Override
44 public String toString() {
45 return "BillingInfo [paymentDesc=" + paymentDesc + ", paymentId=" + paymentId + "]";
46 }
47
48 @Override
49 public int hashCode() {
50 final int prime = 31;
51 int result = 1;
52 result = prime * result + ((paymentDesc == null) ? 0 : paymentDesc.hashCode());
53 result = prime * result + ((paymentId == null) ? 0 : paymentId.hashCode());
54 return result;
55 }
56
57 @Override
58 public boolean equals(Object obj) {
59 if (this == obj)
60 return true;
61 if (obj == null)
62 return false;
63 if (getClass() != obj.getClass())
64 return false;
65 BillingInfo other = (BillingInfo) obj;
66 if (paymentDesc == null) {
67 if (other.paymentDesc != null)
68 return false;
69 }
70 else if (!paymentDesc.equals(other.paymentDesc))
71 return false;
72 if (paymentId == null) {
73 if (other.paymentId != null)
74 return false;
75 }
76 else if (!paymentId.equals(other.paymentId))
77 return false;
78 return true;
79 }
80
81 }