View Javadoc
1   /*
2    * Copyright 2007-2008 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.kuali.ole.fp.businessobject;
18  
19  import java.util.LinkedHashMap;
20  
21  import org.kuali.ole.fp.document.service.DisbursementVoucherPayeeService;
22  import org.kuali.ole.sys.OLEPropertyConstants;
23  import org.kuali.ole.sys.context.SpringContext;
24  import org.kuali.ole.vnd.businessobject.VendorDetail;
25  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
26  import org.kuali.rice.kim.api.identity.Person;
27  import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
28  
29  public class DisbursementPayee extends TransientBusinessObjectBase implements MutableInactivatable {
30      private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(DisbursementPayee.class);
31  
32      private String payeeIdNumber;
33      private String payeeTypeCode;
34      private String payeeTypeDescription;
35      private String payeeName;
36  
37      private String paymentReasonCode;
38      private String taxNumber;
39      private String employeeId;
40      private String firstName;
41      private String lastName;
42      private String vendorName;
43      private String vendorNumber;
44      private String address;
45      private boolean active;
46  
47      private String principalId;
48      private Person                         person;
49      protected VendorDetail                 vendorDetail;
50  
51      /**
52       * Constructs a DisbursementPayee.java.
53       */
54      public DisbursementPayee() {
55          super();
56      }
57  
58      /**
59       * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
60       */
61  
62      protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
63          LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();
64          map.put(OLEPropertyConstants.PAYEE_ID_NUMBER, this.payeeIdNumber);
65          map.put(OLEPropertyConstants.PAYEE_TYPE_CODE, this.payeeTypeCode);
66          map.put(OLEPropertyConstants.PAYEE_NAME, this.payeeName);
67  
68          return map;
69      }
70  
71      /**
72       * Gets the payeeIdNumber attribute.
73       *
74       * @return Returns the payeeIdNumber.
75       */
76      public String getPayeeIdNumber() {
77          return payeeIdNumber;
78      }
79  
80      /**
81       * Sets the payeeIdNumber attribute value.
82       *
83       * @param payeeIdNumber The payeeIdNumber to set.
84       */
85      public void setPayeeIdNumber(String payeeIdNumber) {
86          this.payeeIdNumber = payeeIdNumber;
87      }
88  
89      /**
90       * Gets the payeeTypeCode attribute.
91       *
92       * @return Returns the payeeTypeCode.
93       */
94      public String getPayeeTypeCode() {
95          return payeeTypeCode;
96      }
97  
98      /**
99       * Sets the payeeTypeCode attribute value.
100      *
101      * @param payeeTypeCode The payeeTypeCode to set.
102      */
103     public void setPayeeTypeCode(String payeeTypeCode) {
104         this.payeeTypeCode = payeeTypeCode;
105     }
106 
107     /**
108      * Gets the payeeName attribute.
109      *
110      * @return Returns the payeeName.
111      */
112     public String getPayeeName() {
113         return payeeName;
114     }
115 
116     /**
117      * Sets the payeeName attribute value.
118      *
119      * @param payeeName The payeeName to set.
120      */
121     public void setPayeeName(String payeeName) {
122         this.payeeName = payeeName;
123     }
124 
125     /**
126      * Gets the paymentReasonCode attribute.
127      *
128      * @return Returns the paymentReasonCode.
129      */
130     public String getPaymentReasonCode() {
131         return paymentReasonCode;
132     }
133 
134     /**
135      * Sets the paymentReasonCode attribute value.
136      *
137      * @param paymentReasonCode The paymentReasonCode to set.
138      */
139     public void setPaymentReasonCode(String paymentReasonCode) {
140         this.paymentReasonCode = paymentReasonCode;
141     }
142 
143     /**
144      * Gets the taxNumber attribute.
145      *
146      * @return Returns the taxNumber.
147      */
148     public String getTaxNumber() {
149         return taxNumber;
150     }
151 
152     /**
153      * Sets the taxNumber attribute value.
154      *
155      * @param taxNumber The taxNumber to set.
156      */
157     public void setTaxNumber(String taxNumber) {
158         this.taxNumber = taxNumber;
159     }
160 
161     /**
162      * Gets the employeeId attribute.
163      *
164      * @return Returns the employeeId.
165      */
166     public String getEmployeeId() {
167         return employeeId;
168     }
169 
170     /**
171      * Sets the employeeId attribute value.
172      *
173      * @param employeeId The employeeId to set.
174      */
175     public void setEmployeeId(String employeeId) {
176         this.employeeId = employeeId;
177     }
178 
179     /**
180      * Gets the vendorName attribute.
181      *
182      * @return Returns the vendorName.
183      */
184     public String getVendorName() {
185         return vendorName;
186     }
187 
188     /**
189      * Sets the vendorName attribute value.
190      *
191      * @param vendorName The vendorName to set.
192      */
193     public void setVendorName(String vendorName) {
194         this.vendorName = vendorName;
195     }
196 
197     /**
198      * Gets the address attribute.
199      *
200      * @return Returns the address.
201      */
202     public String getAddress() {
203         return address;
204     }
205 
206     /**
207      * Sets the address attribute value.
208      *
209      * @param address The address to set.
210      */
211     public void setAddress(String address) {
212         this.address = address;
213     }
214 
215     /**
216      * Gets the vendorNumber attribute.
217      *
218      * @return Returns the vendorNumber.
219      */
220     public String getVendorNumber() {
221         return vendorNumber;
222     }
223 
224     /**
225      * Sets the vendorNumber attribute value.
226      *
227      * @param vendorNumber The vendorNumber to set.
228      */
229     public void setVendorNumber(String vendorNumber) {
230         this.vendorNumber = vendorNumber;
231     }
232 
233     /**
234      * Gets the active attribute.
235      *
236      * @return Returns the active.
237      */
238     @Override
239     public boolean isActive() {
240         return active;
241     }
242 
243     /**
244      * Sets the active attribute value.
245      *
246      * @param active The active to set.
247      */
248     @Override
249     public void setActive(boolean active) {
250         this.active = active;
251     }
252 
253     /**
254      * Gets the firstName attribute.
255      *
256      * @return Returns the firstName.
257      */
258     public String getFirstName() {
259         return firstName;
260     }
261 
262     /**
263      * Sets the firstName attribute value.
264      *
265      * @param firstName The firstName to set.
266      */
267     public void setFirstName(String firstName) {
268         this.firstName = firstName;
269     }
270 
271     /**
272      * Gets the lastName attribute.
273      *
274      * @return Returns the lastName.
275      */
276     public String getLastName() {
277         return lastName;
278     }
279 
280     /**
281      * Sets the lastName attribute value.
282      *
283      * @param lastName The lastName to set.
284      */
285     public void setLastName(String lastName) {
286         this.lastName = lastName;
287     }
288 
289     /**
290      * Gets the payeeTypeDescription attribute.
291      *
292      * @return Returns the payeeTypeDescription.
293      */
294     public String getPayeeTypeDescription() {
295         DisbursementVoucherPayeeService payeeService = SpringContext.getBean(DisbursementVoucherPayeeService.class);
296 
297         return payeeService.getPayeeTypeDescription(payeeTypeCode);
298     }
299 
300     /**
301      * Sets the payeeTypeDescription attribute value.
302      *
303      * @param payeeTypeDescription The payeeTypeDescription to set.
304      */
305     public void setPayeeTypeDescription(String payeeTypeDescription) {
306         this.payeeTypeDescription = payeeTypeDescription;
307     }
308 
309     /**
310      * Gets the principalId attribute.
311      * @return Returns the principalId.
312      */
313     public String getPrincipalId() {
314         return principalId;
315     }
316 
317     /**
318      * Sets the principalId attribute value.
319      * @param principalId The principalId to set.
320      */
321     public void setPrincipalId(String principalId) {
322         this.principalId = principalId;
323     }
324 
325     /**
326      * Gets the person attribute.
327      * @return Returns the person.
328      */
329     public Person getPerson() {
330         return person;
331     }
332 
333     /**
334      * Sets the person attribute value.
335      * @param person The person to set.
336      */
337     public void setPerson(Person person) {
338         this.person = person;
339     }
340 
341     /**
342      * Gets the vendorDetail attribute.
343      * 
344      * @return Returns the vendorDetail.
345      */
346     public VendorDetail getVendorDetail() {
347         return vendorDetail;
348     }
349 
350     /**
351      * Sets the vendorDetail attribute value.
352      * 
353      * @param persvendorDetailon The vendorDetail to set.
354      */
355     public void setVendorDetail(VendorDetail vendorDetail) {
356         this.vendorDetail = vendorDetail;
357     }
358 
359 
360 }