View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  package org.kuali.kfs.module.tem.businessobject;
20  
21  import java.math.BigDecimal;
22  import java.sql.Date;
23  
24  import javax.persistence.Column;
25  import javax.persistence.JoinColumn;
26  import javax.persistence.ManyToOne;
27  
28  import org.kuali.rice.core.api.util.type.KualiDecimal;
29  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
30  
31  public abstract class ImportedExpenseBase extends PersistableBusinessObjectBase {
32  
33      protected Long id;
34      protected String creditCardOrAgencyCode;
35      protected CreditCardAgency creditCardAgency;
36      protected Date importDate;
37      protected String travelCompany;
38      protected String location;
39      protected String travelExpenseTypeCode;
40      protected KualiDecimal amount;
41      protected Date transactionPostingDate;
42      protected Date reconciliationDate;
43      protected String reconciled;
44      protected String description;
45      protected BigDecimal currencyRate = new BigDecimal(1.000);
46      protected KualiDecimal convertedAmount;
47      protected Boolean reimbursable = Boolean.TRUE;
48      protected Boolean missingReceipt = Boolean.FALSE;
49  
50      protected Boolean assigned = Boolean.FALSE;
51      protected String documentNumber;
52  
53      protected Date expenseNotificationDate;
54  
55      /**
56       * Gets the id attribute.
57       * @return Returns the id.
58       */
59      @Column(name = "ID", nullable = false)
60      public Long getId() {
61          return id;
62      }
63  
64      /**
65       * Sets the id attribute value.
66       * @param id The id to set.
67       */
68      public void setId(Long id) {
69          this.id = id;
70      }
71  
72      /**
73       * Gets the creditCardOrAgencyCode attribute.
74       * @return Returns the creditCardOrAgencyCode.
75       */
76      @Column(name = "CCA_CD", nullable = false)
77      public String getCreditCardOrAgencyCode() {
78          return creditCardOrAgencyCode;
79      }
80  
81      /**
82       * Sets the creditCardOrAgencyCode attribute value.
83       * @param creditCardOrAgencyCode The creditCardOrAgencyCode to set.
84       */
85      public void setCreditCardOrAgencyCode(String creditCardOrAgencyCode) {
86          this.creditCardOrAgencyCode = creditCardOrAgencyCode;
87      }
88  
89      /**
90       * Gets the creditCardAgency attribute.
91       * @return Returns the creditCardAgency.
92       */
93      @ManyToOne
94      @JoinColumn(name="CREDIT_AGENCY_CD")
95      public CreditCardAgency getCreditCardAgency() {
96          return creditCardAgency;
97      }
98  
99      /**
100      * Sets the creditCardAgency attribute value.
101      * @param creditCardAgency The creditCardAgency to set.
102      */
103     public void setCreditCardAgency(CreditCardAgency creditCardAgency) {
104         this.creditCardAgency = creditCardAgency;
105     }
106 
107     /**
108      * Gets the importDate attribute.
109      * @return Returns the importDate.
110      */
111     @Column(name="IMPORT_DT")
112     public Date getImportDate() {
113         return importDate;
114     }
115 
116     /**
117      * Sets the importDate attribute value.
118      * @param importDate The importDate to set.
119      */
120     public void setImportDate(Date importDate) {
121         this.importDate = importDate;
122     }
123 
124     /**
125      * Gets the travelCompany attribute.
126      * @return Returns the travelCompany.
127      */
128     @Column(name="COMPANY")
129     public String getTravelCompany() {
130         return travelCompany;
131     }
132 
133     /**
134      * Sets the travelCompany attribute value.
135      * @param travelCompany The travelCompany to set.
136      */
137     public void setTravelCompany(String travelCompany) {
138         this.travelCompany = travelCompany;
139     }
140 
141     /**
142      * Gets the location attribute.
143      * @return Returns the location.
144      */
145     @Column(name="LOCATION")
146     public String getLocation() {
147         return location;
148     }
149 
150     /**
151      * Sets the location attribute value.
152      * @param location The location to set.
153      */
154     public void setLocation(String location) {
155         this.location = location;
156     }
157 
158     /**
159      * Gets the travelExpenseType attribute.
160      * @return Returns the travelExpenseType.
161      */
162     @Column(name="EXP_TYP_CD")
163     public String getTravelExpenseTypeCode() {
164         return travelExpenseTypeCode;
165     }
166 
167     /**
168      * Sets the travelExpenseType attribute value.
169      * @param travelExpenseType The travelExpenseType to set.
170      */
171     public void setTravelExpenseTypeCode(String travelExpenseTypeCode) {
172         this.travelExpenseTypeCode = travelExpenseTypeCode;
173     }
174 
175     /**
176      * Gets the amount attribute.
177      * @return Returns the amount.
178      */
179     @Column(name="AMOUNT")
180     public KualiDecimal getAmount() {
181         return amount;
182     }
183 
184     /**
185      * Sets the amount attribute value.
186      * @param amount The amount to set.
187      */
188     public void setAmount(KualiDecimal amount) {
189         this.amount = amount;
190     }
191 
192     /**
193      * Gets the transactionPostingDate attribute.
194      * @return Returns the transactionPostingDate.
195      */
196     @Column(name="TRANS_POST_DT")
197     public Date getTransactionPostingDate() {
198         return transactionPostingDate;
199     }
200 
201     /**
202      * Sets the transactionPostingDate attribute value.
203      * @param transactionPostingDate The transactionPostingDate to set.
204      */
205     public void setTransactionPostingDate(Date transactionPostingDate) {
206         this.transactionPostingDate = transactionPostingDate;
207     }
208 
209     /**
210      * Gets the reconciliationDate attribute.
211      * @return Returns the reconciliationDate.
212      */
213     @Column(name="RECON_DT")
214     public Date getReconciliationDate() {
215         return reconciliationDate;
216     }
217 
218     /**
219      * Sets the reconciliationDate attribute value.
220      * @param reconciliationDate The reconciliationDate to set.
221      */
222     public void setReconciliationDate(Date reconciliationDate) {
223         this.reconciliationDate = reconciliationDate;
224     }
225 
226     /**
227      * Gets the reconciled attribute.
228      * @return Returns the reconciled.
229      */
230     @Column(name="RECONCILED")
231     public String getReconciled() {
232         return reconciled;
233     }
234 
235     /**
236      * Sets the reconciled attribute value.
237      * @param reconciled The reconciled to set.
238      */
239     public void setReconciled(String reconciled) {
240         this.reconciled = reconciled;
241     }
242 
243     /**
244      * Gets the description attribute.
245      * @return Returns the description.
246      */
247     @Column(name="DESCRIPTION")
248     public String getDescription() {
249         return description;
250     }
251 
252     /**
253      * Sets the description attribute value.
254      * @param description The description to set.
255      */
256     public void setDescription(String description) {
257         this.description = description;
258     }
259 
260     /**
261      * Gets the currencyRate attribute.
262      * @return Returns the currencyRate.
263      */
264     @Column(name="CURR_RT")
265     public BigDecimal getCurrencyRate() {
266         return currencyRate;
267     }
268 
269     /**
270      * Sets the currencyRate attribute value.
271      * @param currencyRate The currencyRate to set.
272      */
273     public void setCurrencyRate(BigDecimal currencyRate) {
274         this.currencyRate = currencyRate;
275     }
276 
277     /**
278      * Gets the convertedAmount attribute.
279      * @return Returns the convertedAmount.
280      */
281     @Column(name="CONV_AMT")
282     public KualiDecimal getConvertedAmount() {
283         if (convertedAmount == null){
284             convertedAmount = new KualiDecimal(amount.bigDecimalValue().multiply(currencyRate));
285         }
286         return convertedAmount;
287     }
288 
289     /**
290      * Sets the convertedAmount attribute value.
291      * @param convertedAmount The convertedAmount to set.
292      */
293     public void setConvertedAmount(KualiDecimal convertedAmount) {
294         this.convertedAmount = convertedAmount;
295     }
296 
297     /**
298      * Gets the reimbursable attribute.
299      * @return Returns the reimbursable.
300      */
301     @Column(name="REIMB")
302     public Boolean getReimbursable() {
303         return reimbursable;
304     }
305 
306     /**
307      * Sets the reimbursable attribute value.
308      * @param reimbursable The reimbursable to set.
309      */
310     public void setReimbursable(Boolean reimbursable) {
311         this.reimbursable = reimbursable;
312     }
313 
314     /**
315      * Gets the missingReceipt attribute.
316      * @return Returns the missingReceipt.
317      */
318     @Column(name="MISSING_RCPT")
319     public Boolean getMissingReceipt() {
320         return missingReceipt;
321     }
322 
323     /**
324      * Sets the missingReceipt attribute value.
325      * @param missingReceipt The missingReceipt to set.
326      */
327     public void setMissingReceipt(Boolean missingReceipt) {
328         this.missingReceipt = missingReceipt;
329     }
330 
331     /**
332      * Gets the assigned attribute.
333      * @return Returns the assigned.
334      */
335     @Column(name="ASSIGNED")
336     public Boolean getAssigned() {
337         return assigned;
338     }
339 
340     /**
341      * Sets the assigned attribute value.
342      * @param assigned The assigned to set.
343      */
344     public void setAssigned(Boolean assigned) {
345         this.assigned = assigned;
346     }
347 
348     /**
349      * Gets the documentNumber attribute.
350      * @return Returns the documentNumber.
351      */
352     @Column(name="DOC_NBR")
353     public String getDocumentNumber() {
354         return documentNumber;
355     }
356 
357     /**
358      * Sets the documentNumber attribute value.
359      * @param documentNumber The documentNumber to set.
360      */
361     public void setDocumentNumber(String documentNumber) {
362         this.documentNumber = documentNumber;
363     }
364 
365     /**
366      * Gets the expenseNotificationDate attribute.
367      * @return Returns the expenseNotificationDate.
368      */
369     @Column(name="EXP_NTF_DT")
370     public Date getExpenseNotificationDate() {
371         return expenseNotificationDate;
372     }
373 
374     /**
375      * Sets the expenseNotificationDate attribute value.
376      * @param expenseNotificationDate The expenseNotificationDate to set.
377      */
378     public void setExpenseNotificationDate(Date expenseNotificationDate) {
379         this.expenseNotificationDate = expenseNotificationDate;
380     }
381 
382 
383 }