1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.kuali.kfs.module.bc.businessobject;
21
22 import java.util.LinkedHashMap;
23
24 import org.kuali.kfs.coa.businessobject.Chart;
25 import org.kuali.kfs.coa.businessobject.Organization;
26 import org.kuali.kfs.module.bc.document.service.BudgetConstructionOrganizationReportsService;
27 import org.kuali.kfs.sys.context.SpringContext;
28 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
29
30
31
32
33 public class BudgetConstructionPullup extends PersistableBusinessObjectBase {
34
35 private String chartOfAccountsCode;
36 private String organizationCode;
37 private String reportsToChartOfAccountsCode;
38 private String reportsToOrganizationCode;
39 private Integer pullFlag;
40 private String principalId;
41
42 public boolean isLeaf;
43
44 private Chart chartOfAccounts;
45 private Organization organization;
46 private Organization reportsToOrganization;
47 private Chart reportsToChartOfAccounts;
48
49
50
51
52 public BudgetConstructionPullup() {
53 pullFlag = new Integer(0);
54 }
55
56
57
58
59
60
61 public String getChartOfAccountsCode() {
62 return chartOfAccountsCode;
63 }
64
65
66
67
68
69
70 public void setChartOfAccountsCode(String chartOfAccountsCode) {
71 this.chartOfAccountsCode = chartOfAccountsCode;
72 }
73
74
75
76
77
78
79
80 public String getOrganizationCode() {
81 return organizationCode;
82 }
83
84
85
86
87
88
89 public void setOrganizationCode(String organizationCode) {
90 this.organizationCode = organizationCode;
91 }
92
93
94
95
96
97
98
99 public String getReportsToChartOfAccountsCode() {
100 return reportsToChartOfAccountsCode;
101 }
102
103
104
105
106
107
108 public void setReportsToChartOfAccountsCode(String reportsToChartOfAccountsCode) {
109 this.reportsToChartOfAccountsCode = reportsToChartOfAccountsCode;
110 }
111
112
113
114
115
116
117
118 public String getReportsToOrganizationCode() {
119 return reportsToOrganizationCode;
120 }
121
122
123
124
125
126
127 public void setReportsToOrganizationCode(String reportsToOrganizationCode) {
128 this.reportsToOrganizationCode = reportsToOrganizationCode;
129 }
130
131
132
133
134
135
136
137 public Integer getPullFlag() {
138 return pullFlag;
139 }
140
141
142
143
144
145
146 public void setPullFlag(Integer pullFlag) {
147 this.pullFlag = pullFlag;
148 }
149
150
151
152
153
154
155
156 public String getPrincipalId() {
157 return principalId;
158 }
159
160
161
162
163
164
165 public void setPrincipalId(String principalId) {
166 this.principalId = principalId;
167 }
168
169
170
171
172
173
174 public boolean isLeaf() {
175 return SpringContext.getBean(BudgetConstructionOrganizationReportsService.class).isLeafOrg(this.chartOfAccountsCode, this.organizationCode);
176 }
177
178
179
180
181
182
183 public Chart getChartOfAccounts() {
184 return chartOfAccounts;
185 }
186
187
188
189
190
191
192
193 public void setChartOfAccounts(Chart chartOfAccounts) {
194 this.chartOfAccounts = chartOfAccounts;
195 }
196
197
198
199
200
201
202 public Organization getOrganization() {
203 return organization;
204 }
205
206
207
208
209
210
211
212 public void setOrganization(Organization organization) {
213 this.organization = organization;
214 }
215
216
217
218
219
220
221 public Organization getReportsToOrganization() {
222 return reportsToOrganization;
223 }
224
225
226
227
228
229
230
231 public void setReportsToOrganization(Organization reportsToOrganization) {
232 this.reportsToOrganization = reportsToOrganization;
233 }
234
235
236
237
238
239
240 public Chart getReportsToChartOfAccounts() {
241 return reportsToChartOfAccounts;
242 }
243
244
245
246
247
248
249
250 public void setReportsToChartOfAccounts(Chart reportsToChartOfAccounts) {
251 this.reportsToChartOfAccounts = reportsToChartOfAccounts;
252 }
253
254
255
256
257
258 public boolean equals(Object obj) {
259 boolean isEqual = true;
260 if (obj == null || !(obj instanceof BudgetConstructionPullup)) {
261 isEqual = false;
262 }
263 else {
264 if (!this.toString().equals(obj.toString())) {
265 isEqual = false;
266 }
267 }
268
269 return isEqual;
270 }
271
272
273
274
275 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
276 LinkedHashMap m = new LinkedHashMap();
277 m.put("principalId", this.principalId);
278 m.put("chartOfAccountsCode", this.chartOfAccountsCode);
279 m.put("organizationCode", this.organizationCode);
280 return m;
281 }
282 }
283