View Javadoc
1   /*
2    * Copyright 2005 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.sys.OLEPropertyConstants;
22  import org.kuali.rice.core.api.util.type.KualiDecimal;
23  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
24  
25  /**
26   * This class is used to represent a disbursement voucher non-employee expense, often associated with a trip or a service rendered.
27   */
28  public class DisbursementVoucherNonEmployeeExpense extends PersistableBusinessObjectBase {
29  
30      private String documentNumber;
31      private Integer financialDocumentLineNumber;
32      private String disbVchrExpenseCode;
33      private String disbVchrExpenseCompanyName;
34      private KualiDecimal disbVchrExpenseAmount;
35  
36      private TravelExpenseTypeCode disbVchrExpense;
37      private TravelCompanyCode disbVchrExpenseCompany;
38      private DisbursementVoucherNonEmployeeTravel disbursementVoucherNonEmployeeTravel;
39  
40      private boolean isPrepaid;
41  
42      /**
43       * Default no-arg constructor.
44       */
45      public DisbursementVoucherNonEmployeeExpense() {
46          this.setFinancialDocumentLineNumber(1);
47      }
48  
49      /**
50       * Gets the documentNumber attribute.
51       *
52       * @return Returns the documentNumber
53       */
54      public String getDocumentNumber() {
55          return documentNumber;
56      }
57  
58  
59      /**
60       * Sets the documentNumber attribute.
61       *
62       * @param documentNumber The documentNumber to set.
63       */
64      public void setDocumentNumber(String documentNumber) {
65          this.documentNumber = documentNumber;
66      }
67  
68      /**
69       * Gets the financialDocumentLineNumber attribute.
70       *
71       * @return Returns the financialDocumentLineNumber
72       */
73      public Integer getFinancialDocumentLineNumber() {
74          return financialDocumentLineNumber;
75      }
76  
77  
78      /**
79       * Sets the financialDocumentLineNumber attribute.
80       *
81       * @param financialDocumentLineNumber The financialDocumentLineNumber to set.
82       */
83      public void setFinancialDocumentLineNumber(Integer financialDocumentLineNumber) {
84          this.financialDocumentLineNumber = financialDocumentLineNumber;
85      }
86  
87      /**
88       * Gets the disbVchrExpenseCode attribute.
89       *
90       * @return Returns the disbVchrExpenseCode
91       */
92      public String getDisbVchrExpenseCode() {
93          return disbVchrExpenseCode;
94      }
95  
96      /**
97       * Dummy field so we can have different select options.
98       *
99       * @return String
100      */
101     public String getDisbVchrPrePaidExpenseCode() {
102         return disbVchrExpenseCode;
103     }
104 
105 
106     /**
107      * Sets the disbVchrExpenseCode attribute.
108      * 
109      * @param disbVchrExpenseCode The disbVchrExpenseCode to set.
110      */
111     public void setDisbVchrExpenseCode(String disbVchrExpenseCode) {
112         this.disbVchrExpenseCode = disbVchrExpenseCode;
113         //KFSMI-798 - refreshNonUpdatableReferences() used instead of refresh(), 
114         //DisbursementVoucherNonEmployeeExpense does not have any updatable references
115         this.refreshNonUpdateableReferences();
116     }
117 
118     /**
119      * Dummy field so we can have different select options.
120      * 
121      * @param disbVchrExpenseCode
122      */
123     public void setDisbVchrPrePaidExpenseCode(String disbVchrExpenseCode) {
124         this.disbVchrExpenseCode = disbVchrExpenseCode;
125     }
126 
127     /**
128      * Gets the disbVchrExpenseCompanyName attribute.
129      *
130      * @return Returns the disbVchrExpenseCompanyName
131      */
132     public String getDisbVchrExpenseCompanyName() {
133         return disbVchrExpenseCompanyName;
134     }
135 
136 
137     /**
138      * Sets the disbVchrExpenseCompanyName attribute.
139      *
140      * @param disbVchrExpenseCompanyName The disbVchrExpenseCompanyName to set.
141      */
142     public void setDisbVchrExpenseCompanyName(String disbVchrExpenseCompanyName) {
143         this.disbVchrExpenseCompanyName = disbVchrExpenseCompanyName;
144     }
145 
146     /**
147      * Gets the disbVchrExpenseCompanyName attribute.
148      *
149      * @return Returns the disbVchrExpenseCompanyName
150      */
151     public String getDisbVchrPrePaidExpenseCompanyName() {
152         return disbVchrExpenseCompanyName;
153     }
154 
155 
156     /**
157      * Sets the disbVchrExpenseCompanyName attribute.
158      *
159      * @param disbVchrExpenseCompanyName The disbVchrExpenseCompanyName to set.
160      */
161     public void setDisbVchrPrePaidExpenseCompanyName(String disbVchrExpenseCompanyName) {
162         this.disbVchrExpenseCompanyName = disbVchrExpenseCompanyName;
163     }
164 
165     /**
166      * Gets the disbVchrExpenseAmount attribute.
167      *
168      * @return Returns the disbVchrExpenseAmount
169      */
170     public KualiDecimal getDisbVchrExpenseAmount() {
171         return disbVchrExpenseAmount;
172     }
173 
174 
175     /**
176      * Sets the disbVchrExpenseAmount attribute.
177      *
178      * @param disbVchrExpenseAmount The disbVchrExpenseAmount to set.
179      */
180     public void setDisbVchrExpenseAmount(KualiDecimal disbVchrExpenseAmount) {
181         this.disbVchrExpenseAmount = disbVchrExpenseAmount;
182     }
183 
184     /**
185      * Gets the disbVchrExpense attribute.
186      *
187      * @return Returns the disbVchrExpense
188      */
189     public TravelExpenseTypeCode getDisbVchrExpense() {
190         return disbVchrExpense;
191     }
192 
193     /**
194      * Sets the disbVchrExpense attribute.
195      *
196      * @param disbVchrExpense The disbVchrExpense to set.
197      * @deprecated
198      */
199     @Deprecated
200     public void setDisbVchrExpense(TravelExpenseTypeCode disbVchrExpense) {
201         this.disbVchrExpense = disbVchrExpense;
202     }
203 
204     /**
205      * Gets the disbVchrExpenseCompany attribute.
206      *
207      * @return Returns the disbVchrExpenseCompany.
208      */
209     public TravelCompanyCode getDisbVchrExpenseCompany() {
210         return disbVchrExpenseCompany;
211     }
212 
213     /**
214      * Sets the disbVchrExpenseCompany attribute value.
215      *
216      * @param disbVchrExpenseCompany The disbVchrExpenseCompany to set.
217      * @deprecated
218      */
219     @Deprecated
220     public void setDisbVchrExpenseCompany(TravelCompanyCode disbVchrExpenseCompany) {
221         this.disbVchrExpenseCompany = disbVchrExpenseCompany;
222     }
223 
224     /**
225      * Gets the disbursementVoucherNonEmployeeTravel attribute.
226      *
227      * @return Returns the disbursementVoucherNonEmployeeTravel.
228      */
229     public DisbursementVoucherNonEmployeeTravel getDisbursementVoucherNonEmployeeTravel() {
230         return disbursementVoucherNonEmployeeTravel;
231     }
232 
233     /**
234      * Sets the disbursementVoucherNonEmployeeTravel attribute value.
235      *
236      * @param disbursementVoucherNonEmployeeTravel The disbursementVoucherNonEmployeeTravel to set.
237      * @deprecated
238      */
239     @Deprecated
240     public void setDisbursementVoucherNonEmployeeTravel(DisbursementVoucherNonEmployeeTravel disbursementVoucherNonEmployeeTravel) {
241         this.disbursementVoucherNonEmployeeTravel = disbursementVoucherNonEmployeeTravel;
242     }
243 
244     /**
245      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
246      */
247     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
248         LinkedHashMap m = new LinkedHashMap();
249         m.put(OLEPropertyConstants.DOCUMENT_NUMBER, this.documentNumber);
250         if (this.financialDocumentLineNumber != null) {
251             m.put("financialDocumentLineNumber", this.financialDocumentLineNumber.toString());
252         }
253         return m;
254     }
255 }