001    /*
002     * Copyright 2011 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    package org.kuali.kfs.module.ar.businessobject;
017    
018    import java.sql.Date;
019    import java.util.LinkedHashMap;
020    import java.util.List;
021    
022    import org.kuali.rice.kns.bo.Inactivateable;
023    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
024    import org.kuali.rice.kns.util.KualiDecimal;
025    import org.kuali.rice.kns.util.TypedArrayList;
026    
027    /**
028     * @author Kuali Nervous System Team (kualidev@oncourse.iu.edu)
029     */
030    public class Customer extends PersistableBusinessObjectBase implements Inactivateable {
031    
032        private String customerNumber;
033        private String customerName;
034        private String customerParentCompanyNumber;
035        private String customerTypeCode;
036        private String customerTypeDescription;
037        private Date customerAddressChangeDate;
038        private Date customerRecordAddDate;
039        private Date customerLastActivityDate;
040        private String customerTaxTypeCode;
041        private String customerTaxNbr;
042        private boolean active;
043        private String customerPhoneNumber;
044        private String customer800PhoneNumber;
045        private String customerContactName;
046        private String customerContactPhoneNumber;
047        private String customerFaxNumber;
048        private Date customerBirthDate;
049        private boolean customerTaxExemptIndicator;
050        private KualiDecimal customerCreditLimitAmount;
051        private String customerCreditApprovedByName;
052        private String customerEmailAddress;
053    
054        private Customer customerParentCompany;
055        private CustomerType customerType;
056    
057        private List<CustomerAddress> customerAddresses;
058    
059        /**
060         * Default constructor.
061         */
062        public Customer() {
063            customerAddresses = new TypedArrayList(CustomerAddress.class);
064        }
065    
066        /**
067         * Gets the customerNumber attribute.
068         * 
069         * @return Returns the customerNumber
070         */
071        public String getCustomerNumber() {
072            return customerNumber;
073        }
074    
075        /**
076         * Sets the customerNumber attribute.
077         * 
078         * @param customerNumber The customerNumber to set.
079         */
080        public void setCustomerNumber(String customerNumber) {
081            this.customerNumber = customerNumber;
082        }
083    
084    
085        /**
086         * Gets the customerName attribute.
087         * 
088         * @return Returns the customerName
089         */
090        public String getCustomerName() {
091            return customerName;
092        }
093    
094        /**
095         * Sets the customerName attribute.
096         * 
097         * @param customerName The customerName to set.
098         */
099        public void setCustomerName(String customerName) {
100            this.customerName = customerName;
101        }
102    
103    
104        /**
105         * Gets the customerParentCompanyNumber attribute.
106         * 
107         * @return Returns the customerParentCompanyNumber
108         */
109        public String getCustomerParentCompanyNumber() {
110            return customerParentCompanyNumber;
111        }
112    
113        /**
114         * Sets the customerParentCompanyNumber attribute.
115         * 
116         * @param customerParentCompanyNumber The customerParentCompanyNumber to set.
117         */
118        public void setCustomerParentCompanyNumber(String customerParentCompanyNumber) {
119            this.customerParentCompanyNumber = customerParentCompanyNumber;
120        }
121    
122    
123        /**
124         * Gets the customerTypeCode attribute.
125         * 
126         * @return Returns the customerTypeCode
127         */
128        public String getCustomerTypeCode() {
129            return customerTypeCode;
130        }
131    
132        /**
133         * Sets the customerTypeCode attribute.
134         * 
135         * @param customerTypeCode The customerTypeCode to set.
136         */
137        public void setCustomerTypeCode(String customerTypeCode) {
138            this.customerTypeCode = customerTypeCode;
139        }
140    
141    
142        /**
143         * Gets the customerTypeDescription attribute. 
144         * @return Returns the customerTypeDescription.
145         */
146        public String getCustomerTypeDescription() {
147            return customerTypeDescription;
148        }
149    
150        /**
151         * Sets the customerTypeDescription attribute value.
152         * @param customerTypeDescription The customerTypeDescription to set.
153         */
154        public void setCustomerTypeDescription(String customerTypeDescription) {
155            this.customerTypeDescription = customerTypeDescription;
156        }
157    
158        /**
159         * Gets the customerAddressChangeDate attribute.
160         * 
161         * @return Returns the customerAddressChangeDate
162         */
163        public Date getCustomerAddressChangeDate() {
164            return customerAddressChangeDate;
165        }
166    
167        /**
168         * Sets the customerAddressChangeDate attribute.
169         * 
170         * @param customerAddressChangeDate The customerAddressChangeDate to set.
171         */
172        public void setCustomerAddressChangeDate(Date customerAddressChangeDate) {
173            this.customerAddressChangeDate = customerAddressChangeDate;
174        }
175    
176    
177        /**
178         * Gets the customerRecordAddDate attribute.
179         * 
180         * @return Returns the customerRecordAddDate
181         */
182        public Date getCustomerRecordAddDate() {
183            return customerRecordAddDate;
184        }
185    
186        /**
187         * Sets the customerRecordAddDate attribute.
188         * 
189         * @param customerRecordAddDate The customerRecordAddDate to set.
190         */
191        public void setCustomerRecordAddDate(Date customerRecordAddDate) {
192            this.customerRecordAddDate = customerRecordAddDate;
193        }
194    
195    
196        /**
197         * Gets the customerLastActivityDate attribute.
198         * 
199         * @return Returns the customerLastActivityDate
200         */
201        public Date getCustomerLastActivityDate() {
202            return customerLastActivityDate;
203        }
204    
205        /**
206         * Sets the customerLastActivityDate attribute.
207         * 
208         * @param customerLastActivityDate The customerLastActivityDate to set.
209         */
210        public void setCustomerLastActivityDate(Date customerLastActivityDate) {
211            this.customerLastActivityDate = customerLastActivityDate;
212        }
213    
214    
215          /**
216         * Gets the active attribute.
217         * 
218         * @return Returns the active
219         */
220        public boolean isActive() {
221            return active;
222        }
223    
224        /**
225         * Sets the active attribute.
226         * 
227         * @param active The active to set.
228         */
229        public void setActive(boolean active) {
230            this.active = active;
231        }
232    
233    
234        /**
235         * Gets the customerPhoneNumber attribute.
236         * 
237         * @return Returns the customerPhoneNumber
238         */
239        public String getCustomerPhoneNumber() {
240            return customerPhoneNumber;
241        }
242    
243        /**
244         * Sets the customerPhoneNumber attribute.
245         * 
246         * @param customerPhoneNumber The customerPhoneNumber to set.
247         */
248        public void setCustomerPhoneNumber(String customerPhoneNumber) {
249            this.customerPhoneNumber = customerPhoneNumber;
250        }
251    
252    
253        /**
254         * Gets the customer800PhoneNumber attribute.
255         * 
256         * @return Returns the customer800PhoneNumber
257         */
258        public String getCustomer800PhoneNumber() {
259            return customer800PhoneNumber;
260        }
261    
262        /**
263         * Sets the customer800PhoneNumber attribute.
264         * 
265         * @param customer800PhoneNumber The customer800PhoneNumber to set.
266         */
267        public void setCustomer800PhoneNumber(String customer800PhoneNumber) {
268            this.customer800PhoneNumber = customer800PhoneNumber;
269        }
270    
271    
272        /**
273         * Gets the customerContactName attribute.
274         * 
275         * @return Returns the customerContactName
276         */
277        public String getCustomerContactName() {
278            return customerContactName;
279        }
280    
281        /**
282         * Sets the customerContactName attribute.
283         * 
284         * @param customerContactName The customerContactName to set.
285         */
286        public void setCustomerContactName(String customerContactName) {
287            this.customerContactName = customerContactName;
288        }
289    
290    
291        /**
292         * Gets the customerContactPhoneNumber attribute.
293         * 
294         * @return Returns the customerContactPhoneNumber
295         */
296        public String getCustomerContactPhoneNumber() {
297            return customerContactPhoneNumber;
298        }
299    
300        /**
301         * Sets the customerContactPhoneNumber attribute.
302         * 
303         * @param customerContactPhoneNumber The customerContactPhoneNumber to set.
304         */
305        public void setCustomerContactPhoneNumber(String customerContactPhoneNumber) {
306            this.customerContactPhoneNumber = customerContactPhoneNumber;
307        }
308    
309    
310        /**
311         * Gets the customerFaxNumber attribute.
312         * 
313         * @return Returns the customerFaxNumber
314         */
315        public String getCustomerFaxNumber() {
316            return customerFaxNumber;
317        }
318    
319        /**
320         * Sets the customerFaxNumber attribute.
321         * 
322         * @param customerFaxNumber The customerFaxNumber to set.
323         */
324        public void setCustomerFaxNumber(String customerFaxNumber) {
325            this.customerFaxNumber = customerFaxNumber;
326        }
327    
328    
329        /**
330         * Gets the customerBirthDate attribute.
331         * 
332         * @return Returns the customerBirthDate
333         */
334        public Date getCustomerBirthDate() {
335            return customerBirthDate;
336        }
337    
338        /**
339         * Sets the customerBirthDate attribute.
340         * 
341         * @param customerBirthDate The customerBirthDate to set.
342         */
343        public void setCustomerBirthDate(Date customerBirthDate) {
344            this.customerBirthDate = customerBirthDate;
345        }
346    
347    
348        /**
349         * Gets the customerCreditLimitAmount attribute.
350         * 
351         * @return Returns the customerCreditLimitAmount
352         */
353        public KualiDecimal getCustomerCreditLimitAmount() {
354            return customerCreditLimitAmount;
355        }
356    
357        /**
358         * Sets the customerCreditLimitAmount attribute.
359         * 
360         * @param customerCreditLimitAmount The customerCreditLimitAmount to set.
361         */
362        public void setCustomerCreditLimitAmount(KualiDecimal customerCreditLimitAmount) {
363            this.customerCreditLimitAmount = customerCreditLimitAmount;
364        }
365    
366    
367        /**
368         * Gets the customerCreditApprovedByName attribute.
369         * 
370         * @return Returns the customerCreditApprovedByName
371         */
372        public String getCustomerCreditApprovedByName() {
373            return customerCreditApprovedByName;
374        }
375    
376        /**
377         * Sets the customerCreditApprovedByName attribute.
378         * 
379         * @param customerCreditApprovedByName The customerCreditApprovedByName to set.
380         */
381        public void setCustomerCreditApprovedByName(String customerCreditApprovedByName) {
382            this.customerCreditApprovedByName = customerCreditApprovedByName;
383        }
384    
385    
386        /**
387         * Gets the customerEmailAddress attribute.
388         * 
389         * @return Returns the customerEmailAddress
390         */
391        public String getCustomerEmailAddress() {
392            return customerEmailAddress;
393        }
394    
395        /**
396         * Sets the customerEmailAddress attribute.
397         * 
398         * @param customerEmailAddress The customerEmailAddress to set.
399         */
400        public void setCustomerEmailAddress(String customerEmailAddress) {
401            this.customerEmailAddress = customerEmailAddress;
402        }
403    
404        /**
405         * Gets the customerParentCompany attribute.
406         * 
407         * @return Returns the customerParentCompany
408         */
409        public Customer getCustomerParentCompany() {
410            return customerParentCompany;
411        }
412    
413        /**
414         * Sets the customerParentCompany attribute.
415         * 
416         * @param customerParentCompany The customerParentCompany to set.
417         * @deprecated
418         */
419        public void setCustomerParentCompany(Customer customerParentCompany) {
420            this.customerParentCompany = customerParentCompany;
421        }
422    
423        /**
424         * Gets the customerType attribute.
425         * 
426         * @return Returns the customerType.
427         */
428        public CustomerType getCustomerType() {
429            return customerType;
430        }
431    
432        /**
433         * Sets the customerType attribute value.
434         * 
435         * @param customerType The customerType to set.
436         * @deprecated
437         */
438        public void setCustomerType(CustomerType customerType) {
439            this.customerType = customerType;
440        }
441    
442        /**
443         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
444         */
445        @SuppressWarnings("unchecked")
446        protected LinkedHashMap toStringMapper() {
447            LinkedHashMap m = new LinkedHashMap();
448            m.put("customerNumber", this.customerNumber);
449            return m;
450        }
451    
452        public boolean isCustomerTaxExemptIndicator() {
453            return customerTaxExemptIndicator;
454        }
455    
456        public void setCustomerTaxExemptIndicator(boolean customerTaxExemptIndicator) {
457            this.customerTaxExemptIndicator = customerTaxExemptIndicator;
458        }
459    
460        /**
461         * This method gets customerAddresses
462         * 
463         * @return customerAddresses
464         */
465        public List<CustomerAddress> getCustomerAddresses() {
466            return customerAddresses;
467        }
468    
469        /**
470         * This method sets customerAddresses
471         * 
472         * @param customerAddresses
473         */
474        public void setCustomerAddresses(List<CustomerAddress> customerAddresses) {
475            this.customerAddresses = customerAddresses;
476        }
477    
478        public String getCustomerTaxNbr() {
479            return customerTaxNbr;
480        }
481    
482        public void setCustomerTaxNbr(String customerTaxNbr) {
483            this.customerTaxNbr = customerTaxNbr;
484        }
485    
486        public String getCustomerTaxTypeCode() {
487            return customerTaxTypeCode;
488        }
489    
490        public void setCustomerTaxTypeCode(String customerTaxTypeCode) {
491            this.customerTaxTypeCode = customerTaxTypeCode;
492        }
493        
494    }