001/*
002 * Copyright 2011 The Kuali Foundation.
003 *
004 * Licensed under the Educational Community License, Version 1.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/ecl1.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 */
016package org.kuali.ole.fp.businessobject;
017
018import java.util.LinkedHashMap;
019
020import org.kuali.ole.coa.businessobject.Account;
021import org.kuali.ole.coa.businessobject.Chart;
022import org.kuali.ole.coa.businessobject.ObjectCode;
023import org.kuali.ole.coa.businessobject.ProjectCode;
024import org.kuali.ole.coa.businessobject.SubAccount;
025import org.kuali.ole.coa.businessobject.SubObjectCode;
026import org.kuali.ole.sys.OLEPropertyConstants;
027import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
028import org.kuali.rice.core.api.util.type.KualiDecimal;
029import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
030
031/**
032 * This class is used to represent a procurement card holder, or the individual whose name is on the card.
033 */
034
035public class ProcurementCardDefault extends PersistableBusinessObjectBase implements MutableInactivatable {
036    private String creditCardNumber;
037
038    private String cardHolderName;
039    private String cardHolderAlternateName;
040    private String cardHolderLine1Address;
041    private String cardHolderLine2Address;
042    private String cardHolderCityName;
043    private String cardHolderStateCode;
044    private String cardHolderZipCode;
045    private String cardHolderWorkPhoneNumber;
046    private KualiDecimal cardLimit;
047    private KualiDecimal cardCycleAmountLimit;
048    private KualiDecimal cardCycleVolumeLimit;
049    private String cardStatusCode;
050    private String cardNoteText;
051
052    private String chartOfAccountsCode;
053    private String accountNumber;
054    private String subAccountNumber;
055    private String financialObjectCode;
056    private String financialSubObjectCode;
057    private String projectCode;
058
059    private boolean active;
060
061    private Account account;
062    private Chart chartOfAccounts;
063    private SubAccount subAccount;
064    private ObjectCode objectCode;
065    private SubObjectCode subObjectCode;
066    private ProjectCode project;
067
068    /**
069     * Default constructor.
070     */
071    public ProcurementCardDefault() {
072
073    }
074
075     /**
076     * Gets the creditCardNumber attribute.
077     *
078     * @return Returns the creditCardNumber
079     */
080    public String getCreditCardNumber() {
081        return creditCardNumber;
082    }
083
084    /**
085     * Sets the creditCardNumber attribute.
086     *
087     * @param creditCardNumber The creditCardNumber to set.
088     */
089    public void setCreditCardNumber(String creditCardNumber) {
090        this.creditCardNumber = creditCardNumber;
091    }
092
093    /**
094     * Gets the cardHolderName attribute.
095     *
096     * @return Returns the cardHolderName
097     */
098    public String getCardHolderName() {
099        return cardHolderName;
100    }
101
102    /**
103     * Sets the cardHolderName attribute.
104     *
105     * @param cardHolderName The cardHolderName to set.
106     */
107    public void setCardHolderName(String cardHolderName) {
108        this.cardHolderName = cardHolderName;
109    }
110
111    /**
112     * Gets the cardHolderAlternateName attribute.
113     *
114     * @return Returns the cardHolderAlternateName
115     */
116    public String getCardHolderAlternateName() {
117        return cardHolderAlternateName;
118    }
119
120    /**
121     * Sets the cardHolderAlternateName attribute.
122     *
123     * @param cardHolderAlternateName The cardHolderAlternateName to set.
124     */
125    public void setCardHolderAlternateName(String cardHolderAlternateName) {
126        this.cardHolderAlternateName = cardHolderAlternateName;
127    }
128
129    /**
130     * Gets the cardHolderLine1Address attribute.
131     *
132     * @return Returns the cardHolderLine1Address
133     */
134    public String getCardHolderLine1Address() {
135        return cardHolderLine1Address;
136    }
137
138    /**
139     * Sets the cardHolderLine1Address attribute.
140     *
141     * @param cardHolderLine1Address The cardHolderLine1Address to set.
142     */
143    public void setCardHolderLine1Address(String cardHolderLine1Address) {
144        this.cardHolderLine1Address = cardHolderLine1Address;
145    }
146
147    /**
148     * Gets the cardHolderLine2Address attribute.
149     *
150     * @return Returns the cardHolderLine2Address
151     */
152    public String getCardHolderLine2Address() {
153        return cardHolderLine2Address;
154    }
155
156    /**
157     * Sets the cardHolderLine2Address attribute.
158     *
159     * @param cardHolderLine2Address The cardHolderLine2Address to set.
160     */
161    public void setCardHolderLine2Address(String cardHolderLine2Address) {
162        this.cardHolderLine2Address = cardHolderLine2Address;
163    }
164
165    /**
166     * Gets the cardHolderCityName attribute.
167     *
168     * @return Returns the cardHolderCityName
169     */
170    public String getCardHolderCityName() {
171        return cardHolderCityName;
172    }
173
174    /**
175     * Sets the cardHolderCityName attribute.
176     *
177     * @param cardHolderCityName The cardHolderCityName to set.
178     */
179    public void setCardHolderCityName(String cardHolderCityName) {
180        this.cardHolderCityName = cardHolderCityName;
181    }
182
183    /**
184     * Gets the cardHolderStateCode attribute.
185     *
186     * @return Returns the cardHolderStateCode
187     */
188    public String getCardHolderStateCode() {
189        return cardHolderStateCode;
190    }
191
192    /**
193     * Sets the cardHolderStateCode attribute.
194     *
195     * @param cardHolderStateCode The cardHolderStateCode to set.
196     */
197    public void setCardHolderStateCode(String cardHolderStateCode) {
198        this.cardHolderStateCode = cardHolderStateCode;
199    }
200
201    /**
202     * Gets the cardHolderZipCode attribute.
203     *
204     * @return Returns the cardHolderZipCode
205     */
206    public String getCardHolderZipCode() {
207        return cardHolderZipCode;
208    }
209
210    /**
211     * Sets the cardHolderZipCode attribute.
212     *
213     * @param cardHolderZipCode The cardHolderZipCode to set.
214     */
215    public void setCardHolderZipCode(String cardHolderZipCode) {
216        this.cardHolderZipCode = cardHolderZipCode;
217    }
218
219    /**
220     * Gets the cardHolderWorkPhoneNumber attribute.
221     *
222     * @return Returns the cardHolderWorkPhoneNumber
223     */
224    public String getCardHolderWorkPhoneNumber() {
225        return cardHolderWorkPhoneNumber;
226    }
227
228    /**
229     * Sets the cardHolderWorkPhoneNumber attribute.
230     *
231     * @param cardHolderWorkPhoneNumber The cardHolderWorkPhoneNumber to set.
232     */
233    public void setCardHolderWorkPhoneNumber(String cardHolderWorkPhoneNumber) {
234        this.cardHolderWorkPhoneNumber = cardHolderWorkPhoneNumber;
235    }
236
237    /**
238     * Gets the cardLimit attribute.
239     *
240     * @return Returns the cardLimit
241     */
242    public KualiDecimal getCardLimit() {
243        return cardLimit;
244    }
245
246    /**
247     * Sets the cardLimit attribute.
248     *
249     * @param cardLimit The cardLimit to set.
250     */
251    public void setCardLimit(KualiDecimal cardLimit) {
252        this.cardLimit = cardLimit;
253    }
254
255    /**
256     * Gets the cardCycleAmountLimit attribute.
257     *
258     * @return Returns the cardCycleAmountLimit
259     */
260    public KualiDecimal getCardCycleAmountLimit() {
261        return cardCycleAmountLimit;
262    }
263
264    /**
265     * Sets the cardCycleAmountLimit attribute.
266     *
267     * @param cardCycleAmountLimit The cardCycleAmountLimit to set.
268     */
269    public void setCardCycleAmountLimit(KualiDecimal cardCycleAmountLimit) {
270        this.cardCycleAmountLimit = cardCycleAmountLimit;
271    }
272
273    /**
274     * Gets the cardCycleVolumeLimit attribute.
275     *
276     * @return Returns the cardCycleVolumeLimit
277     */
278    public KualiDecimal getCardCycleVolumeLimit() {
279        return cardCycleVolumeLimit;
280    }
281
282    /**
283     * Sets the cardCycleVolumeLimit attribute.
284     *
285     * @param cardCycleVolumeLimit The cardCycleVolumeLimit to set.
286     */
287    public void setCardCycleVolumeLimit(KualiDecimal cardCycleVolumeLimit) {
288        this.cardCycleVolumeLimit = cardCycleVolumeLimit;
289    }
290
291    /**
292     * Gets the cardStatusCode attribute.
293     *
294     * @return Returns the cardStatusCode
295     */
296    public String getCardStatusCode() {
297        return cardStatusCode;
298    }
299
300    /**
301     * Sets the cardStatusCode attribute.
302     *
303     * @param cardStatusCode The cardStatusCode to set.
304     */
305    public void setCardStatusCode(String cardStatusCode) {
306        this.cardStatusCode = cardStatusCode;
307    }
308
309    /**
310     * Gets the cardNoteText attribute.
311     *
312     * @return Returns the cardNoteText
313     */
314    public String getCardNoteText() {
315        return cardNoteText;
316    }
317
318    /**
319     * Sets the cardNoteText attribute.
320     *
321     * @param cardNoteText The cardNoteText to set.
322     */
323    public void setCardNoteText(String cardNoteText) {
324        this.cardNoteText = cardNoteText;
325    }
326
327    /**
328     * Gets the chartOfAccountsCode attribute.
329     *
330     * @return Returns the chartOfAccountsCode
331     */
332    public String getChartOfAccountsCode() {
333        return chartOfAccountsCode;
334    }
335
336    /**
337     * Sets the chartOfAccountsCode attribute.
338     *
339     * @param chartOfAccountsCode The chartOfAccountsCode to set.
340     */
341    public void setChartOfAccountsCode(String chartOfAccountsCode) {
342        this.chartOfAccountsCode = chartOfAccountsCode;
343    }
344
345
346    /**
347     * Gets the accountNumber attribute.
348     *
349     * @return Returns the accountNumber
350     */
351    public String getAccountNumber() {
352        return accountNumber;
353    }
354
355    /**
356     * Sets the accountNumber attribute.
357     *
358     * @param accountNumber The accountNumber to set.
359     */
360    public void setAccountNumber(String accountNumber) {
361        this.accountNumber = accountNumber;
362    }
363
364    /**
365     * Gets the subAccountNumber attribute.
366     *
367     * @return Returns the subAccountNumber
368     */
369    public String getSubAccountNumber() {
370        return subAccountNumber;
371    }
372
373    /**
374     * Sets the subAccountNumber attribute.
375     *
376     * @param subAccountNumber The subAccountNumber to set.
377     */
378    public void setSubAccountNumber(String subAccountNumber) {
379        this.subAccountNumber = subAccountNumber;
380    }
381
382    /**
383     * Gets the financialObjectCode attribute.
384     *
385     * @return Returns the financialObjectCode
386     */
387    public String getFinancialObjectCode() {
388        return financialObjectCode;
389    }
390
391    /**
392     * Sets the financialObjectCode attribute.
393     *
394     * @param financialObjectCode The financialObjectCode to set.
395     */
396    public void setFinancialObjectCode(String financialObjectCode) {
397        this.financialObjectCode = financialObjectCode;
398    }
399
400    /**
401     * Gets the financialSubObjectCode attribute.
402     *
403     * @return Returns the financialSubObjectCode
404     */
405    public String getFinancialSubObjectCode() {
406        return financialSubObjectCode;
407    }
408
409    /**
410     * Sets the financialSubObjectCode attribute.
411     *
412     * @param financialSubObjectCode The financialSubObjectCode to set.
413     */
414    public void setFinancialSubObjectCode(String financialSubObjectCode) {
415        this.financialSubObjectCode = financialSubObjectCode;
416    }
417
418    /**
419     * @return the project code associated with this card holder
420     */
421    public String getProjectCode() {
422        return projectCode;
423    }
424
425    /**
426     * Sets the project code associated with this card holder
427     * @param projectCode the project code associated with this card holder
428     */
429    public void setProjectCode(String projectCode) {
430        this.projectCode = projectCode;
431    }
432
433    /**
434     * @see org.kuali.rice.kns.bo.Inactivateable#isActive()
435     * @return true if this procurement card holder detail is active, false otherwise
436     */
437    @Override
438    public boolean isActive() {
439        return active;
440    }
441
442    /**
443     * @see org.kuali.rice.kns.bo.Inactivateable#setActive(boolean)
444     * Sets whether this procurement card holder detail is active or not
445     */
446    @Override
447    public void setActive(boolean active) {
448        this.active = active;
449    }
450
451    /**
452     * Gets the account attribute.
453     *
454     * @return Returns the account
455     */
456    public Account getAccount() {
457        return account;
458    }
459
460    /**
461     * Sets the account attribute.
462     *
463     * @param account The account to set.
464     * @deprecated
465     */
466    @Deprecated
467    public void setAccount(Account account) {
468        this.account = account;
469    }
470
471    /**
472     * Gets the chartOfAccounts attribute.
473     *
474     * @return Returns the chartOfAccounts
475     */
476    public Chart getChartOfAccounts() {
477        return chartOfAccounts;
478    }
479
480    /**
481     * Sets the chartOfAccounts attribute.
482     *
483     * @param chartOfAccounts The chartOfAccounts to set.
484     * @deprecated
485     */
486    @Deprecated
487    public void setChartOfAccounts(Chart chartOfAccounts) {
488        this.chartOfAccounts = chartOfAccounts;
489    }
490
491    /**
492     * @return Returns the subAccount.
493     */
494    public SubAccount getSubAccount() {
495        return subAccount;
496    }
497
498    /**
499     * Sets the subAccount attribute.
500     *
501     * @param subAccount The subAccount to set.
502     * @deprecated
503     */
504    @Deprecated
505    public void setSubAccount(SubAccount subAccount) {
506        this.subAccount = subAccount;
507    }
508
509    /**
510     * Gets the objectCode attribute.
511     *
512     * @return Returns the objectCode
513     */
514     public ObjectCode getObjectCode() {
515        return objectCode;
516    }
517
518     /**
519      * Sets the objectCode attribute.
520      *
521      * @param objectCode The objectCode to set.
522      * @deprecated
523      */
524    @Deprecated
525    public void setObjectCode(ObjectCode objectCode) {
526        this.objectCode = objectCode;
527    }
528
529    /**
530     * Gets the subObjectCode attribute.
531     *
532     * @return Returns the subObjectCode
533     */
534    public SubObjectCode getSubObjectCode() {
535        return subObjectCode;
536    }
537
538    /**
539     * Sets the subObjectCode attribute.
540     *
541     * @param subObjectCode The subObjectCode to set.
542     * @deprecated
543     */
544    @Deprecated
545    public void setSubObjectCode(SubObjectCode subObjectCode) {
546        this.subObjectCode = subObjectCode;
547    }
548
549    /**
550     * @return the ProjectCode associated with this procurement card holder detail
551     */
552    public ProjectCode getProject() {
553        return project;
554    }
555
556    /**
557     * Sets the ProjectCode associated with this procurement card holder detail.  Deprecated because, basically, this method is meant for OJB.
558     * @param project the project code for OJB to set.
559     * @deprecated
560     */
561    @Deprecated
562    public void setProject(ProjectCode project) {
563        this.project = project;
564    }
565
566    /**
567     * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
568     */
569    @SuppressWarnings("unchecked")
570    protected LinkedHashMap toStringMapper() {
571        LinkedHashMap m = new LinkedHashMap();
572        m.put(OLEPropertyConstants.CREDIT_CARD_NUMBER, this.creditCardNumber);
573        return m;
574    }
575
576
577}