1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.kuali.ole.pdp.businessobject;
21
22 import java.sql.Date;
23 import java.util.HashMap;
24 import java.util.Map;
25
26 import org.apache.commons.lang.StringUtils;
27 import org.kuali.ole.sys.businessobject.Bank;
28 import org.kuali.ole.sys.context.SpringContext;
29 import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
30 import org.kuali.rice.core.api.util.type.KualiInteger;
31 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
32 import org.kuali.rice.krad.service.KualiModuleService;
33 import org.kuali.rice.krad.service.ModuleService;
34 import org.kuali.rice.location.api.LocationConstants;
35 import org.kuali.rice.location.framework.campus.CampusEbo;
36
37 public class DisbursementNumberRange extends PersistableBusinessObjectBase implements MutableInactivatable {
38
39 protected String physCampusProcCode;
40 protected KualiInteger beginDisbursementNbr;
41 protected KualiInteger lastAssignedDisbNbr;
42 protected KualiInteger endDisbursementNbr;
43 protected Date disbNbrRangeStartDt;
44 protected String bankCode;
45 protected String disbursementTypeCode;
46 protected boolean active;
47
48 protected CampusEbo campus;
49 protected Bank bank;
50 protected DisbursementType disbursementType;
51
52 public DisbursementNumberRange() {
53 super();
54 }
55
56
57
58
59 public Bank getBank() {
60 return bank;
61 }
62
63
64
65
66
67
68 public String getBankCode() {
69 return bankCode;
70 }
71
72
73
74
75
76
77 public void setBankCode(String bankCode) {
78 this.bankCode = bankCode;
79 }
80
81
82
83
84
85 public KualiInteger getBeginDisbursementNbr() {
86 return beginDisbursementNbr;
87 }
88
89
90
91
92
93 public KualiInteger getEndDisbursementNbr() {
94 return endDisbursementNbr;
95 }
96
97
98
99
100
101 public KualiInteger getLastAssignedDisbNbr() {
102 return lastAssignedDisbNbr;
103 }
104
105
106
107
108
109 public String getPhysCampusProcCode() {
110 return physCampusProcCode;
111 }
112
113
114
115
116 @Deprecated
117 public void setBank(Bank bank) {
118 this.bank = bank;
119 }
120
121
122
123
124 public void setBeginDisbursementNbr(KualiInteger integer) {
125 beginDisbursementNbr = integer;
126 }
127
128
129
130
131 public void setEndDisbursementNbr(KualiInteger integer) {
132 endDisbursementNbr = integer;
133 }
134
135
136
137
138 public void setLastAssignedDisbNbr(KualiInteger integer) {
139 lastAssignedDisbNbr = integer;
140 }
141
142
143
144
145 public void setPhysCampusProcCode(String string) {
146 physCampusProcCode = string;
147 }
148
149
150
151
152
153
154 public String getDisbursementTypeCode() {
155 return disbursementTypeCode;
156 }
157
158
159
160
161
162
163 public void setDisbursementTypeCode(String disbursementTypeCode) {
164 this.disbursementTypeCode = disbursementTypeCode;
165 }
166
167
168
169
170
171
172 public DisbursementType getDisbursementType() {
173 return disbursementType;
174 }
175
176
177
178
179
180
181 public void setDisbursementType(DisbursementType disbursementType) {
182 this.disbursementType = disbursementType;
183 }
184
185
186
187
188
189
190 public CampusEbo getCampus() {
191 if ( StringUtils.isBlank(physCampusProcCode) ) {
192 campus = null;
193 } else {
194 if ( campus == null || !StringUtils.equals( campus.getCode(),physCampusProcCode) ) {
195 ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CampusEbo.class);
196 if ( moduleService != null ) {
197 Map<String,Object> keys = new HashMap<String, Object>(1);
198 keys.put(LocationConstants.PrimaryKeyConstants.CODE, physCampusProcCode);
199 campus = moduleService.getExternalizableBusinessObject(CampusEbo.class, keys);
200 } else {
201 throw new RuntimeException( "CONFIGURATION ERROR: No responsible module found for EBO class. Unable to proceed." );
202 }
203 }
204 }
205 return campus;
206 }
207
208
209
210
211
212
213 public void setCampus(CampusEbo campus) {
214 this.campus = campus;
215 }
216
217
218
219
220 @Override
221 public boolean isActive() {
222 return active;
223 }
224
225
226
227
228 @Override
229 public void setActive(boolean active) {
230 this.active = active;
231 }
232
233
234
235
236
237
238 public Date getDisbNbrRangeStartDt() {
239 return disbNbrRangeStartDt;
240 }
241
242
243
244
245
246
247 public void setDisbNbrRangeStartDt(Date disbNbrRangeStartDt) {
248 this.disbNbrRangeStartDt = disbNbrRangeStartDt;
249 }
250
251 }