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.ar.businessobject;
20  
21  import java.sql.Date;
22  import java.util.LinkedHashMap;
23  
24  import org.kuali.kfs.integration.cg.ContractAndGrantsProposal;
25  import org.kuali.kfs.module.ar.document.ContractsGrantsInvoiceDocument;
26  import org.kuali.kfs.sys.KFSPropertyConstants;
27  import org.kuali.kfs.sys.context.SpringContext;
28  import org.kuali.rice.core.api.util.type.KualiDecimal;
29  import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
30  import org.kuali.rice.krad.service.KualiModuleService;
31  
32  /**
33   *
34   */
35  public class ContractsGrantsInvoiceReport extends TransientBusinessObjectBase {
36  
37      private String documentNumber;
38      private Long proposalNumber;
39      private String invoiceType;
40      private Date invoiceDate;
41      private Date invoiceDueDate;
42      private String openInvoiceIndicator;
43      private String customerNumber;
44      private String customerName;
45      private KualiDecimal invoiceAmount;
46      private KualiDecimal paymentAmount;
47      private KualiDecimal remainingAmount;
48      private Long ageInDays;
49      private TransientContractsGrantsBillingAttributes dummyBusinessObject;
50  
51      private ContractAndGrantsProposal proposal;
52      private ContractsGrantsInvoiceDocument invoiceDocument;
53      private Customer customer;
54  
55  
56  
57      /**
58       * Gets the invoiceDocument attribute.
59       *
60       * @return Returns the invoiceDocument.
61       */
62      public ContractsGrantsInvoiceDocument getInvoiceDocument() {
63          return invoiceDocument;
64      }
65  
66  
67      /**
68       * Sets the invoiceDocument attribute value.
69       *
70       * @param invoiceDocument The invoiceDocument to set.
71       */
72      public void setInvoiceDocument(ContractsGrantsInvoiceDocument invoiceDocument) {
73          this.invoiceDocument = invoiceDocument;
74      }
75  
76  
77      /**
78       * Gets the customer attribute.
79       *
80       * @return Returns the customer.
81       */
82      public Customer getCustomer() {
83          return customer;
84      }
85  
86  
87      /**
88       * Sets the customer attribute value.
89       *
90       * @param customer The customer to set.
91       */
92      public void setCustomer(Customer customer) {
93          this.customer = customer;
94      }
95  
96  
97      /**
98       * Gets the proposal attribute.
99       *
100      * @return Returns the proposal.
101      */
102     public ContractAndGrantsProposal getProposal() {
103         return proposal = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(ContractAndGrantsProposal.class).retrieveExternalizableBusinessObjectIfNecessary(this, proposal, "proposal");
104     }
105 
106 
107     /**
108      * Gets the documentNumber attribute.
109      *
110      * @return Returns the documentNumber.
111      */
112     public String getDocumentNumber() {
113         return documentNumber;
114     }
115 
116     /**
117      * Sets the documentNumber attribute value.
118      *
119      * @param documentNumber The documentNumber to set.
120      */
121     public void setDocumentNumber(String documentNumber) {
122         this.documentNumber = documentNumber;
123     }
124 
125     /**
126      * Gets the proposalNumber attribute.
127      *
128      * @return Returns the proposalNumber.
129      */
130     public Long getProposalNumber() {
131         return proposalNumber;
132     }
133 
134     /**
135      * Sets the proposalNumber attribute value.
136      *
137      * @param proposalNumber The proposalNumber to set.
138      */
139     public void setProposalNumber(Long proposalNumber) {
140         this.proposalNumber = proposalNumber;
141     }
142 
143     /**
144      * Gets the invoiceType attribute.
145      *
146      * @return Returns the invoiceType.
147      */
148     public String getInvoiceType() {
149         return invoiceType;
150     }
151 
152     /**
153      * Sets the invoiceType attribute value.
154      *
155      * @param invoiceType The invoiceType to set.
156      */
157     public void setInvoiceType(String invoiceType) {
158         this.invoiceType = invoiceType;
159     }
160 
161     /**
162      * Gets the invoiceDate attribute.
163      *
164      * @return Returns the invoiceDate.
165      */
166     public Date getInvoiceDate() {
167         return invoiceDate;
168     }
169 
170     /**
171      * Sets the invoiceDate attribute value.
172      *
173      * @param invoiceDate The invoiceDate to set.
174      */
175     public void setInvoiceDate(Date invoiceDate) {
176         this.invoiceDate = invoiceDate;
177     }
178 
179     /**
180      * Gets the invoiceDueDate attribute.
181      *
182      * @return Returns the invoiceDueDate.
183      */
184     public Date getInvoiceDueDate() {
185         return invoiceDueDate;
186     }
187 
188     /**
189      * Sets the invoiceDueDate attribute value.
190      *
191      * @param invoiceDueDate The invoiceDueDate to set.
192      */
193     public void setInvoiceDueDate(Date invoiceDueDate) {
194         this.invoiceDueDate = invoiceDueDate;
195     }
196 
197     /**
198      * Gets the openInvoiceIndicator attribute.
199      *
200      * @return Returns the openInvoiceIndicator.
201      */
202     public String getOpenInvoiceIndicator() {
203         return openInvoiceIndicator;
204     }
205 
206     /**
207      * Sets the openInvoiceIndicator attribute value.
208      *
209      * @param openInvoiceIndicator The openInvoiceIndicator to set.
210      */
211     public void setOpenInvoiceIndicator(String openInvoiceIndicator) {
212         this.openInvoiceIndicator = openInvoiceIndicator;
213     }
214 
215     /**
216      * Gets the customerNumber attribute.
217      *
218      * @return Returns the customerNumber.
219      */
220     public String getCustomerNumber() {
221         return customerNumber;
222     }
223 
224     /**
225      * Sets the customerNumber attribute value.
226      *
227      * @param customerNumber The customerNumber to set.
228      */
229     public void setCustomerNumber(String customerNumber) {
230         this.customerNumber = customerNumber;
231     }
232 
233     /**
234      * Gets the customerName attribute.
235      *
236      * @return Returns the customerName
237      */
238     public String getCustomerName() {
239         return customerName;
240     }
241 
242     /**
243      * Sets the customerName attribute value.
244      *
245      * @param customerName The customerName to set.
246      */
247     public void setCustomerName(String customerName) {
248         this.customerName = customerName;
249     }
250 
251     /**
252      * Gets the invoiceAmount attribute.
253      *
254      * @return Returns the invoiceAmount.
255      */
256     public KualiDecimal getInvoiceAmount() {
257         return invoiceAmount;
258     }
259 
260     /**
261      * Sets the invoiceAmount attribute value.
262      *
263      * @param invoiceAmount The invoiceAmount to set.
264      */
265     public void setInvoiceAmount(KualiDecimal invoiceAmount) {
266         this.invoiceAmount = invoiceAmount;
267     }
268 
269     /**
270      * Gets the paymentAmount attribute.
271      *
272      * @return Returns the paymentAmount.
273      */
274     public KualiDecimal getPaymentAmount() {
275         return paymentAmount;
276     }
277 
278     /**
279      * Sets the paymentAmount attribute value.
280      *
281      * @param paymentAmount The paymentAmount to set.
282      */
283     public void setPaymentAmount(KualiDecimal paymentAmount) {
284         this.paymentAmount = paymentAmount;
285     }
286 
287     /**
288      * Gets the remainingAmount attribute.
289      *
290      * @return Returns the remainingAmount.
291      */
292     public KualiDecimal getRemainingAmount() {
293         return remainingAmount;
294     }
295 
296     /**
297      * Sets the remainingAmount attribute value.
298      *
299      * @param remainingAmount The remainingAmount to set.
300      */
301     public void setRemainingAmount(KualiDecimal remainingAmount) {
302         this.remainingAmount = remainingAmount;
303     }
304 
305     /**
306      * Gets the ageInDays attribute.
307      *
308      * @return Returns the ageInDays.
309      */
310     public Long getAgeInDays() {
311         return ageInDays;
312     }
313 
314     /**
315      * Sets the ageInDays attribute value.
316      *
317      * @param ageInDays The ageInDays to set.
318      */
319     public void setAgeInDays(Long ageInDays) {
320         this.ageInDays = ageInDays;
321     }
322 
323     /**
324      * Gets the dummyBusinessObject attribute.
325      *
326      * @return Returns the dummyBusinessObject.
327      */
328     public TransientContractsGrantsBillingAttributes getDummyBusinessObject() {
329         return dummyBusinessObject;
330     }
331 
332     /**
333      * Sets the dummyBusinessObject attribute value.
334      *
335      * @param dummyBusinessObject The dummyBusinessObject to set.
336      */
337     public void setDummyBusinessObject(TransientContractsGrantsBillingAttributes dummyBusinessObject) {
338         this.dummyBusinessObject = dummyBusinessObject;
339     }
340 
341     /**
342      * Sets the proposal attribute value.
343      *
344      * @param proposal The proposal to set.
345      */
346     public void setProposal(ContractAndGrantsProposal proposal) {
347         this.proposal = proposal;
348     }
349 
350 
351     @SuppressWarnings("unchecked")
352     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
353         LinkedHashMap<String, String> m = new LinkedHashMap<String, String>();
354         m.put(KFSPropertyConstants.DOCUMENT_NUMBER, this.documentNumber);
355         m.put("invoiceType", this.invoiceType);
356         m.put("openInvoiceIndicator", this.openInvoiceIndicator);
357         m.put(KFSPropertyConstants.CUSTOMER_NUMBER, this.customerNumber);
358         m.put("customerName", this.customerName);
359         if (this.invoiceAmount != null) {
360             m.put("invoiceAmount", this.invoiceAmount.toString());
361         }
362         if (this.paymentAmount != null) {
363             m.put("paymentAmount", this.paymentAmount.toString());
364         }
365         if (this.remainingAmount != null) {
366             m.put("remainingAmount", this.remainingAmount.toString());
367         }
368         if (this.ageInDays != null) {
369             m.put("ageInDays", this.ageInDays.toString());
370         }
371         return m;
372     }
373 
374 }