001/*
002 * Copyright 2006-2009 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
017package org.kuali.ole.integration.cg.businessobject;
018
019import java.sql.Date;
020import java.sql.Timestamp;
021
022import org.kuali.ole.integration.cg.ContractAndGrantsProposal;
023import org.kuali.ole.integration.cg.ContractsAndGrantsAward;
024import org.kuali.rice.core.api.util.type.KualiDecimal;
025import org.kuali.rice.krad.util.ObjectUtils;
026
027/**
028 * See functional documentation.
029 */
030public class Proposal implements ContractAndGrantsProposal {
031
032    private Long proposalNumber;
033    private Date proposalBeginningDate;
034    private Date proposalEndingDate;
035
036    private KualiDecimal proposalDirectCostAmount;
037    private KualiDecimal proposalIndirectCostAmount;
038    private Date proposalRejectedDate;
039    private Timestamp proposalLastUpdateDate;
040    private Date proposalDueDate;
041    private KualiDecimal proposalTotalProjectAmount;
042    private Date proposalSubmissionDate;
043    private boolean proposalFederalPassThroughIndicator;
044    private String oldProposalNumber;
045    private String grantNumber;
046    private Date proposalClosingDate;
047    private String proposalAwardTypeCode;
048    private String agencyNumber;
049    private String proposalStatusCode;
050    private String federalPassThroughAgencyNumber;
051    private String cfdaNumber;
052    private String proposalFellowName;
053    private String proposalPurposeCode;
054    private String proposalProjectTitle;
055    private boolean active;
056    
057    /**
058     * Gets the proposalNumber attribute.
059     * 
060     * @return Returns the proposalNumber
061     */
062    public Long getProposalNumber() {
063        return proposalNumber;
064    }
065
066    /**
067     * Sets the proposalNumber attribute.
068     * 
069     * @param proposalNumber The proposalNumber to set.
070     */
071    public void setProposalNumber(Long proposalNumber) {
072        this.proposalNumber = proposalNumber;
073    }
074
075    /**
076     * Gets the proposalBeginningDate attribute.
077     * 
078     * @return Returns the proposalBeginningDate
079     */
080    public Date getProposalBeginningDate() {
081        return proposalBeginningDate;
082    }
083
084    /**
085     * Sets the proposalBeginningDate attribute.
086     * 
087     * @param proposalBeginningDate The proposalBeginningDate to set.
088     */
089    public void setProposalBeginningDate(Date proposalBeginningDate) {
090        this.proposalBeginningDate = proposalBeginningDate;
091    }
092
093    /**
094     * Gets the proposalEndingDate attribute.
095     * 
096     * @return Returns the proposalEndingDate
097     */
098    public Date getProposalEndingDate() {
099        return proposalEndingDate;
100    }
101
102    /**
103     * Sets the proposalEndingDate attribute.
104     * 
105     * @param proposalEndingDate The proposalEndingDate to set.
106     */
107    public void setProposalEndingDate(Date proposalEndingDate) {
108        this.proposalEndingDate = proposalEndingDate;
109    }
110
111    /**
112     * Gets the proposalTotalAmount attribute.
113     * 
114     * @return Returns the proposalTotalAmount
115     */
116    public KualiDecimal getProposalTotalAmount() {
117        KualiDecimal direct = getProposalDirectCostAmount();
118        KualiDecimal indirect = getProposalIndirectCostAmount();
119        return ObjectUtils.isNull(direct) || ObjectUtils.isNull(indirect) ? null : direct.add(indirect);
120    }
121
122    /**
123     * Gets the proposalDirectCostAmount attribute.
124     * 
125     * @return Returns the proposalDirectCostAmount
126     */
127    public KualiDecimal getProposalDirectCostAmount() {
128        return proposalDirectCostAmount;
129    }
130
131    /**
132     * Sets the proposalDirectCostAmount attribute.
133     * 
134     * @param proposalDirectCostAmount The proposalDirectCostAmount to set.
135     */
136    public void setProposalDirectCostAmount(KualiDecimal proposalDirectCostAmount) {
137        this.proposalDirectCostAmount = proposalDirectCostAmount;
138    }
139
140    /**
141     * Gets the proposalIndirectCostAmount attribute.
142     * 
143     * @return Returns the proposalIndirectCostAmount
144     */
145    public KualiDecimal getProposalIndirectCostAmount() {
146        return proposalIndirectCostAmount;
147    }
148
149    /**
150     * Sets the proposalIndirectCostAmount attribute.
151     * 
152     * @param proposalIndirectCostAmount The proposalIndirectCostAmount to set.
153     */
154    public void setProposalIndirectCostAmount(KualiDecimal proposalIndirectCostAmount) {
155        this.proposalIndirectCostAmount = proposalIndirectCostAmount;
156    }
157
158    /**
159     * Gets the proposalRejectedDate attribute.
160     * 
161     * @return Returns the proposalRejectedDate
162     */
163    public Date getProposalRejectedDate() {
164        return proposalRejectedDate;
165    }
166
167    /**
168     * Sets the proposalRejectedDate attribute.
169     * 
170     * @param proposalRejectedDate The proposalRejectedDate to set.
171     */
172    public void setProposalRejectedDate(Date proposalRejectedDate) {
173        this.proposalRejectedDate = proposalRejectedDate;
174    }
175
176    /**
177     * Gets the proposalLastUpdateDate attribute.
178     * 
179     * @return Returns the proposalLastUpdateDate
180     */
181    public Timestamp getProposalLastUpdateDate() {
182        return proposalLastUpdateDate;
183    }
184
185    /**
186     * Sets the proposalLastUpdateDate attribute.
187     * 
188     * @param proposalLastUpdateDate The proposalLastUpdateDate to set.
189     */
190    public void setProposalLastUpdateDate(Timestamp proposalLastUpdateDate) {
191        this.proposalLastUpdateDate = proposalLastUpdateDate;
192    }
193
194    /**
195     * Gets the proposalDueDate attribute.
196     * 
197     * @return Returns the proposalDueDate
198     */
199    public Date getProposalDueDate() {
200        return proposalDueDate;
201    }
202
203    /**
204     * Sets the proposalDueDate attribute.
205     * 
206     * @param proposalDueDate The proposalDueDate to set.
207     */
208    public void setProposalDueDate(Date proposalDueDate) {
209        this.proposalDueDate = proposalDueDate;
210    }
211
212    /**
213     * Gets the proposalTotalProjectAmount attribute.
214     * 
215     * @return Returns the proposalTotalProjectAmount
216     */
217    public KualiDecimal getProposalTotalProjectAmount() {
218        return proposalTotalProjectAmount;
219    }
220
221    /**
222     * Sets the proposalTotalProjectAmount attribute.
223     * 
224     * @param proposalTotalProjectAmount The proposalTotalProjectAmount to set.
225     */
226    public void setProposalTotalProjectAmount(KualiDecimal proposalTotalProjectAmount) {
227        this.proposalTotalProjectAmount = proposalTotalProjectAmount;
228    }
229
230    /**
231     * Gets the proposalSubmissionDate attribute.
232     * 
233     * @return Returns the proposalSubmissionDate
234     */
235    public Date getProposalSubmissionDate() {
236        return proposalSubmissionDate;
237    }
238
239    /**
240     * Sets the proposalSubmissionDate attribute.
241     * 
242     * @param proposalSubmissionDate The proposalSubmissionDate to set.
243     */
244    public void setProposalSubmissionDate(Date proposalSubmissionDate) {
245        this.proposalSubmissionDate = proposalSubmissionDate;
246    }
247
248    /**
249     * Gets the proposalFederalPassThroughIndicator attribute.
250     * 
251     * @return Returns the proposalFederalPassThroughIndicator
252     */
253    public boolean getProposalFederalPassThroughIndicator() {
254        return proposalFederalPassThroughIndicator;
255    }
256
257    /**
258     * Sets the proposalFederalPassThroughIndicator attribute.
259     * 
260     * @param proposalFederalPassThroughIndicator The proposalFederalPassThroughIndicator to set.
261     */
262    public void setProposalFederalPassThroughIndicator(boolean proposalFederalPassThroughIndicator) {
263        this.proposalFederalPassThroughIndicator = proposalFederalPassThroughIndicator;
264    }
265
266    /**
267     * Gets the oldProposalNumber attribute.
268     * 
269     * @return Returns the oldProposalNumber
270     */
271    public String getOldProposalNumber() {
272        return oldProposalNumber;
273    }
274
275    /**
276     * Sets the oldProposalNumber attribute.
277     * 
278     * @param oldProposalNumber The oldProposalNumber to set.
279     */
280    public void setOldProposalNumber(String oldProposalNumber) {
281        this.oldProposalNumber = oldProposalNumber;
282    }
283
284    /**
285     * Gets the grantNumber attribute.
286     * 
287     * @return Returns the grantNumber
288     */
289    public String getGrantNumber() {
290        return grantNumber;
291    }
292
293    /**
294     * Sets the grantNumber attribute.
295     * 
296     * @param grantNumber The grantNumber to set.
297     */
298    public void setGrantNumber(String grantNumber) {
299        this.grantNumber = grantNumber;
300    }
301
302    /**
303     * Gets the proposalClosingDate attribute.
304     * 
305     * @return Returns the proposalClosingDate
306     */
307    public Date getProposalClosingDate() {
308        return proposalClosingDate;
309    }
310
311    /**
312     * Sets the proposalClosingDate attribute.
313     * 
314     * @param proposalClosingDate The proposalClosingDate to set.
315     */
316    public void setProposalClosingDate(Date proposalClosingDate) {
317        this.proposalClosingDate = proposalClosingDate;
318    }
319
320    /**
321     * Gets the proposalAwardTypeCode attribute.
322     * 
323     * @return Returns the proposalAwardTypeCode
324     */
325    public String getProposalAwardTypeCode() {
326        return proposalAwardTypeCode;
327    }
328
329    /**
330     * Sets the proposalAwardTypeCode attribute.
331     * 
332     * @param proposalAwardTypeCode The proposalAwardTypeCode to set.
333     */
334    public void setProposalAwardTypeCode(String proposalAwardTypeCode) {
335        this.proposalAwardTypeCode = proposalAwardTypeCode;
336    }
337
338    /**
339     * Gets the agencyNumber attribute.
340     * 
341     * @return Returns the agencyNumber
342     */
343    public String getAgencyNumber() {
344        return agencyNumber;
345    }
346
347    /**
348     * Sets the agencyNumber attribute.
349     * 
350     * @param agencyNumber The agencyNumber to set.
351     */
352    public void setAgencyNumber(String agencyNumber) {
353        this.agencyNumber = agencyNumber;
354    }
355
356    /**
357     * Gets the proposalStatusCode attribute.
358     * 
359     * @return Returns the proposalStatusCode
360     */
361    public String getProposalStatusCode() {
362        return proposalStatusCode;
363    }
364
365    /**
366     * Sets the proposalStatusCode attribute.
367     * 
368     * @param proposalStatusCode The proposalStatusCode to set.
369     */
370    public void setProposalStatusCode(String proposalStatusCode) {
371        this.proposalStatusCode = proposalStatusCode;
372    }
373
374    /**
375     * Gets the federalPassThroughAgencyNumber attribute.
376     * 
377     * @return Returns the federalPassThroughAgencyNumber
378     */
379    public String getFederalPassThroughAgencyNumber() {
380        return federalPassThroughAgencyNumber;
381    }
382
383    /**
384     * Sets the federalPassThroughAgencyNumber attribute.
385     * 
386     * @param federalPassThroughAgencyNumber The federalPassThroughAgencyNumber to set.
387     */
388    public void setFederalPassThroughAgencyNumber(String federalPassThroughAgencyNumber) {
389        this.federalPassThroughAgencyNumber = federalPassThroughAgencyNumber;
390    }
391
392    /**
393     * Gets the cfdaNumber attribute.
394     * 
395     * @return Returns the cfdaNumber
396     */
397    public String getCfdaNumber() {
398        return cfdaNumber;
399    }
400
401    /**
402     * Sets the cfdaNumber attribute.
403     * 
404     * @param cfdaNumber The cfdaNumber to set.
405     */
406    public void setCfdaNumber(String cfdaNumber) {
407        this.cfdaNumber = cfdaNumber;
408    }
409
410    /**
411     * Gets the proposalFellowName attribute.
412     * 
413     * @return Returns the proposalFellowName
414     */
415    public String getProposalFellowName() {
416        return proposalFellowName;
417    }
418
419    /**
420     * Sets the proposalFellowName attribute.
421     * 
422     * @param proposalFellowName The proposalFellowName to set.
423     */
424    public void setProposalFellowName(String proposalFellowName) {
425        this.proposalFellowName = proposalFellowName;
426    }
427
428    /**
429     * Gets the proposalPurposeCode attribute.
430     * 
431     * @return Returns the proposalPurposeCode
432     */
433    public String getProposalPurposeCode() {
434        return proposalPurposeCode;
435    }
436
437    /**
438     * Sets the proposalPurposeCode attribute.
439     * 
440     * @param proposalPurposeCode The proposalPurposeCode to set.
441     */
442    public void setProposalPurposeCode(String proposalPurposeCode) {
443        this.proposalPurposeCode = proposalPurposeCode;
444    }
445
446    /**
447     * Gets the proposalProjectTitle attribute.
448     * 
449     * @return Returns the proposalProjectTitle
450     */
451    public String getProposalProjectTitle() {
452        return proposalProjectTitle;
453    }
454
455    /**
456     * Sets the proposalProjectTitle attribute.
457     * 
458     * @param proposalProjectTitle The proposalProjectTitle to set.
459     */
460    public void setProposalProjectTitle(String proposalProjectTitle) {
461        this.proposalProjectTitle = proposalProjectTitle;
462    }
463
464    /**
465     * Gets the active attribute.
466     * 
467     * @return Returns the active.
468     */
469    public boolean isActive() {
470        return active;
471    }
472
473    /**
474     * Sets the active attribute value.
475     * 
476     * @param active The active to set.
477     */
478    public void setActive(boolean active) {
479        this.active = active;
480    }
481
482    public void prepareForWorkflow() {}
483
484    public void refresh() {}
485
486    public ContractsAndGrantsAward getAward() {
487        return null;
488    }
489}
490