1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.ole.module.cg.businessobject;
18
19 import java.util.LinkedHashMap;
20
21 import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
22 import org.kuali.rice.core.api.util.type.KualiDecimal;
23 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
24 import org.kuali.rice.krad.util.ObjectUtils;
25
26
27
28
29 public class ProposalSubcontractor extends PersistableBusinessObjectBase implements MutableInactivatable {
30
31 private String proposalSubcontractorNumber;
32 private Long proposalNumber;
33 private String subcontractorNumber;
34 private KualiDecimal proposalSubcontractorAmount;
35 private String proposalSubcontractorDescription;
36 private boolean active = true;
37
38 private SubContractor subcontractor;
39
40
41
42
43 public ProposalSubcontractor() {
44
45 }
46
47
48
49
50
51
52 public String getProposalSubcontractorNumber() {
53 return proposalSubcontractorNumber;
54 }
55
56
57
58
59
60
61 public void setProposalSubcontractorNumber(String proposalSubcontractorNumber) {
62 this.proposalSubcontractorNumber = proposalSubcontractorNumber;
63 }
64
65
66
67
68
69
70
71 public Long getProposalNumber() {
72 return proposalNumber;
73 }
74
75
76
77
78
79
80 public void setProposalNumber(Long proposalNumber) {
81 this.proposalNumber = proposalNumber;
82 }
83
84
85
86
87
88
89
90 public String getSubcontractorNumber() {
91 return subcontractorNumber;
92 }
93
94
95
96
97
98
99 public void setSubcontractorNumber(String subcontractorNumber) {
100 this.subcontractorNumber = subcontractorNumber;
101 }
102
103
104
105
106
107
108
109 public KualiDecimal getProposalSubcontractorAmount() {
110 return proposalSubcontractorAmount;
111 }
112
113
114
115
116
117
118 public void setProposalSubcontractorAmount(KualiDecimal proposalSubcontractorAmount) {
119 this.proposalSubcontractorAmount = proposalSubcontractorAmount;
120 }
121
122
123
124
125
126
127 public String getProposalSubcontractorDescription() {
128 return proposalSubcontractorDescription;
129 }
130
131
132
133
134
135
136 public void setProposalSubcontractorDescription(String proposalSubcontractorDescription) {
137 this.proposalSubcontractorDescription = proposalSubcontractorDescription;
138 }
139
140
141
142
143
144
145 public boolean isActive() {
146 return active;
147 }
148
149
150
151
152
153
154 public void setActive(boolean active) {
155 this.active = active;
156 }
157
158
159
160
161 public SubContractor getSubcontractor() {
162 return subcontractor;
163 }
164
165
166
167
168
169 public void setSubcontractor(SubContractor subcontractor) {
170 this.subcontractor = subcontractor;
171 }
172
173
174
175
176 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
177 LinkedHashMap m = new LinkedHashMap();
178 m.put("proposalSubcontractorNumber", this.proposalSubcontractorNumber);
179 if (this.proposalNumber != null) {
180 m.put("proposalNumber", this.proposalNumber.toString());
181 }
182 m.put("subcontractorNumber", this.subcontractorNumber);
183 return m;
184 }
185
186
187
188
189
190
191 @Override
192 public String toString() {
193
194 String name = ObjectUtils.isNull(getSubcontractor()) ? "nonexistent" : getSubcontractor().getSubcontractorName();
195 String description = getProposalSubcontractorDescription() == null ? "" : " " + getProposalSubcontractorDescription();
196 return name + " " + getProposalSubcontractorAmount() + description;
197 }
198 }