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 ShippingInfo {
21 public static final String LINE_ID_SHIPPING_INFO = "SIN";
22
23 private String shipperId;
24
25 private String shippingTypeId;
26
27 private String shippingInfo;
28
29 public String getShipperId() {
30 return shipperId;
31 }
32
33 public void setShipperId(String shipperId) {
34 this.shipperId = shipperId;
35 }
36
37 public String getShippingInfo() {
38 return shippingInfo;
39 }
40
41 public void setShippingInfo(String shippingInfo) {
42 this.shippingInfo = shippingInfo;
43 }
44
45 public String getShippingTypeId() {
46 return shippingTypeId;
47 }
48
49 public void setShippingTypeId(String shippingTypeId) {
50 this.shippingTypeId = shippingTypeId;
51 }
52
53 @Override
54 public int hashCode() {
55 final int prime = 31;
56 int result = 1;
57 result = prime * result + ((shipperId == null) ? 0 : shipperId.hashCode());
58 result = prime * result + ((shippingInfo == null) ? 0 : shippingInfo.hashCode());
59 result = prime * result + ((shippingTypeId == null) ? 0 : shippingTypeId.hashCode());
60 return result;
61 }
62
63 @Override
64 public boolean equals(Object obj) {
65 if (this == obj)
66 return true;
67 if (obj == null)
68 return false;
69 if (getClass() != obj.getClass())
70 return false;
71 ShippingInfo other = (ShippingInfo) obj;
72 if (shipperId == null) {
73 if (other.shipperId != null)
74 return false;
75 }
76 else if (!shipperId.equals(other.shipperId))
77 return false;
78 if (shippingInfo == null) {
79 if (other.shippingInfo != null)
80 return false;
81 }
82 else if (!shippingInfo.equals(other.shippingInfo))
83 return false;
84 if (shippingTypeId == null) {
85 if (other.shippingTypeId != null)
86 return false;
87 }
88 else if (!shippingTypeId.equals(other.shippingTypeId))
89 return false;
90 return true;
91 }
92
93 }