View Javadoc
1   /*
2    * Copyright 2011 The Kuali Foundation.
3    *
4    * Licensed under the Educational Community License, Version 1.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl1.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.fp.businessobject;
17  
18  import java.util.LinkedHashMap;
19  
20  import org.kuali.ole.coa.businessobject.Account;
21  import org.kuali.ole.coa.businessobject.Chart;
22  import org.kuali.ole.coa.businessobject.ObjectCode;
23  import org.kuali.ole.coa.businessobject.ProjectCode;
24  import org.kuali.ole.coa.businessobject.SubAccount;
25  import org.kuali.ole.coa.businessobject.SubObjectCode;
26  import org.kuali.ole.sys.OLEPropertyConstants;
27  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
28  import org.kuali.rice.core.api.util.type.KualiDecimal;
29  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
30  
31  /**
32   * This class is used to represent a procurement card holder, or the individual whose name is on the card.
33   */
34  
35  public class ProcurementCardDefault extends PersistableBusinessObjectBase implements MutableInactivatable {
36      private String creditCardNumber;
37  
38      private String cardHolderName;
39      private String cardHolderAlternateName;
40      private String cardHolderLine1Address;
41      private String cardHolderLine2Address;
42      private String cardHolderCityName;
43      private String cardHolderStateCode;
44      private String cardHolderZipCode;
45      private String cardHolderWorkPhoneNumber;
46      private KualiDecimal cardLimit;
47      private KualiDecimal cardCycleAmountLimit;
48      private KualiDecimal cardCycleVolumeLimit;
49      private String cardStatusCode;
50      private String cardNoteText;
51  
52      private String chartOfAccountsCode;
53      private String accountNumber;
54      private String subAccountNumber;
55      private String financialObjectCode;
56      private String financialSubObjectCode;
57      private String projectCode;
58  
59      private boolean active;
60  
61      private Account account;
62      private Chart chartOfAccounts;
63      private SubAccount subAccount;
64      private ObjectCode objectCode;
65      private SubObjectCode subObjectCode;
66      private ProjectCode project;
67  
68      /**
69       * Default constructor.
70       */
71      public ProcurementCardDefault() {
72  
73      }
74  
75       /**
76       * Gets the creditCardNumber attribute.
77       *
78       * @return Returns the creditCardNumber
79       */
80      public String getCreditCardNumber() {
81          return creditCardNumber;
82      }
83  
84      /**
85       * Sets the creditCardNumber attribute.
86       *
87       * @param creditCardNumber The creditCardNumber to set.
88       */
89      public void setCreditCardNumber(String creditCardNumber) {
90          this.creditCardNumber = creditCardNumber;
91      }
92  
93      /**
94       * Gets the cardHolderName attribute.
95       *
96       * @return Returns the cardHolderName
97       */
98      public String getCardHolderName() {
99          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 }