001    /*
002     * Copyright 2011 The Kuali Foundation.
003     * 
004     * Licensed under the Educational Community License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     * 
008     * http://www.opensource.org/licenses/ecl2.php
009     * 
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    
017    package org.kuali.kfs.fp.businessobject;
018    
019    import java.util.LinkedHashMap;
020    
021    import org.kuali.kfs.sys.KFSPropertyConstants;
022    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
023    import org.kuali.rice.kns.util.KualiDecimal;
024    
025    /**
026     * This class is used to represent a disbursement voucher non-employee expense, often associated with a trip or a service rendered.
027     */
028    public class DisbursementVoucherNonEmployeeExpense extends PersistableBusinessObjectBase {
029    
030        private String documentNumber;
031        private Integer financialDocumentLineNumber;
032        private String disbVchrExpenseCode;
033        private String disbVchrExpenseCompanyName;
034        private KualiDecimal disbVchrExpenseAmount;
035    
036        private TravelExpenseTypeCode disbVchrExpense;
037        private TravelCompanyCode disbVchrExpenseCompany;
038        private DisbursementVoucherNonEmployeeTravel disbursementVoucherNonEmployeeTravel;
039    
040        private boolean isPrepaid;
041    
042        /**
043         * Default no-arg constructor.
044         */
045        public DisbursementVoucherNonEmployeeExpense() {
046    
047        }
048    
049        /**
050         * Gets the documentNumber attribute.
051         * 
052         * @return Returns the documentNumber
053         */
054        public String getDocumentNumber() {
055            return documentNumber;
056        }
057    
058    
059        /**
060         * Sets the documentNumber attribute.
061         * 
062         * @param documentNumber The documentNumber to set.
063         */
064        public void setDocumentNumber(String documentNumber) {
065            this.documentNumber = documentNumber;
066        }
067    
068        /**
069         * Gets the financialDocumentLineNumber attribute.
070         * 
071         * @return Returns the financialDocumentLineNumber
072         */
073        public Integer getFinancialDocumentLineNumber() {
074            return financialDocumentLineNumber;
075        }
076    
077    
078        /**
079         * Sets the financialDocumentLineNumber attribute.
080         * 
081         * @param financialDocumentLineNumber The financialDocumentLineNumber to set.
082         */
083        public void setFinancialDocumentLineNumber(Integer financialDocumentLineNumber) {
084            this.financialDocumentLineNumber = financialDocumentLineNumber;
085        }
086    
087        /**
088         * Gets the disbVchrExpenseCode attribute.
089         * 
090         * @return Returns the disbVchrExpenseCode
091         */
092        public String getDisbVchrExpenseCode() {
093            return disbVchrExpenseCode;
094        }
095    
096        /**
097         * Dummy field so we can have different select options.
098         * 
099         * @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        public void setDisbVchrExpense(TravelExpenseTypeCode disbVchrExpense) {
200            this.disbVchrExpense = disbVchrExpense;
201        }
202    
203        /**
204         * Gets the disbVchrExpenseCompany attribute.
205         * 
206         * @return Returns the disbVchrExpenseCompany.
207         */
208        public TravelCompanyCode getDisbVchrExpenseCompany() {
209            return disbVchrExpenseCompany;
210        }
211    
212        /**
213         * Sets the disbVchrExpenseCompany attribute value.
214         * 
215         * @param disbVchrExpenseCompany The disbVchrExpenseCompany to set.
216         * @deprecated
217         */
218        public void setDisbVchrExpenseCompany(TravelCompanyCode disbVchrExpenseCompany) {
219            this.disbVchrExpenseCompany = disbVchrExpenseCompany;
220        }
221    
222        /**
223         * Gets the disbursementVoucherNonEmployeeTravel attribute.
224         * 
225         * @return Returns the disbursementVoucherNonEmployeeTravel.
226         */
227        public DisbursementVoucherNonEmployeeTravel getDisbursementVoucherNonEmployeeTravel() {
228            return disbursementVoucherNonEmployeeTravel;
229        }
230    
231        /**
232         * Sets the disbursementVoucherNonEmployeeTravel attribute value.
233         * 
234         * @param disbursementVoucherNonEmployeeTravel The disbursementVoucherNonEmployeeTravel to set.
235         * @deprecated
236         */
237        public void setDisbursementVoucherNonEmployeeTravel(DisbursementVoucherNonEmployeeTravel disbursementVoucherNonEmployeeTravel) {
238            this.disbursementVoucherNonEmployeeTravel = disbursementVoucherNonEmployeeTravel;
239        }
240    
241        /**
242         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
243         */
244        protected LinkedHashMap toStringMapper() {
245            LinkedHashMap m = new LinkedHashMap();
246            m.put(KFSPropertyConstants.DOCUMENT_NUMBER, this.documentNumber);
247            if (this.financialDocumentLineNumber != null) {
248                m.put("financialDocumentLineNumber", this.financialDocumentLineNumber.toString());
249            }
250            return m;
251        }
252    }