1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.ole.vnd.businessobject;
18
19 import java.util.LinkedHashMap;
20
21 import org.apache.commons.lang.builder.EqualsBuilder;
22 import org.apache.log4j.Logger;
23 import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
24 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
25 import org.kuali.rice.krad.util.ObjectUtils;
26
27
28
29
30
31
32 public class VendorSupplierDiversity extends PersistableBusinessObjectBase implements VendorRoutingComparable, MutableInactivatable {
33 private static Logger LOG = Logger.getLogger(VendorSupplierDiversity.class);
34
35 private Integer vendorHeaderGeneratedIdentifier;
36 private String vendorSupplierDiversityCode;
37 private boolean active;
38
39 private VendorHeader vendorHeader;
40 private SupplierDiversity vendorSupplierDiversity;
41
42
43
44
45
46 public VendorSupplierDiversity() {
47
48 }
49
50 public Integer getVendorHeaderGeneratedIdentifier() {
51
52 return vendorHeaderGeneratedIdentifier;
53 }
54
55 public void setVendorHeaderGeneratedIdentifier(Integer vendorHeaderGeneratedIdentifier) {
56 this.vendorHeaderGeneratedIdentifier = vendorHeaderGeneratedIdentifier;
57 }
58
59 public String getVendorSupplierDiversityCode() {
60
61 return vendorSupplierDiversityCode;
62 }
63
64 public void setVendorSupplierDiversityCode(String vendorSupplierDiversityCode) {
65 this.vendorSupplierDiversityCode = vendorSupplierDiversityCode;
66 }
67
68 public boolean isActive() {
69
70 return active;
71 }
72
73 public void setActive(boolean active) {
74 this.active = active;
75 }
76
77 public VendorHeader getVendorHeader() {
78
79 return vendorHeader;
80 }
81
82
83
84
85
86
87
88 public void setVendorHeader(VendorHeader vendorHeader) {
89 this.vendorHeader = vendorHeader;
90 }
91
92 public SupplierDiversity getVendorSupplierDiversity() {
93
94 return vendorSupplierDiversity;
95 }
96
97
98
99
100
101
102
103 public void setVendorSupplierDiversity(SupplierDiversity vendorSupplierDiversity) {
104 this.vendorSupplierDiversity = vendorSupplierDiversity;
105 }
106
107
108
109
110 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
111 LinkedHashMap m = new LinkedHashMap();
112
113 if (this.vendorHeaderGeneratedIdentifier != null) {
114 m.put("vendorHeaderGeneratedIdentifier", this.vendorHeaderGeneratedIdentifier.toString());
115 }
116 m.put("vendorSupplierDiversityCode", this.vendorSupplierDiversityCode);
117
118 return m;
119 }
120
121
122
123
124 public boolean isEqualForRouting(Object toCompare) {
125 LOG.debug("Entering isEqualForRouting.");
126 if ((ObjectUtils.isNull(toCompare)) || !(toCompare instanceof VendorSupplierDiversity)) {
127
128 return false;
129 }
130 else {
131 VendorSupplierDiversity vsd = (VendorSupplierDiversity) toCompare;
132
133 return new EqualsBuilder().append(this.getVendorHeaderGeneratedIdentifier(), vsd.getVendorHeaderGeneratedIdentifier()).append(this.getVendorSupplierDiversityCode(), vsd.getVendorSupplierDiversityCode()).isEquals();
134 }
135 }
136
137 }