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    
017    package org.kuali.kfs.vnd.businessobject;
018    
019    import java.util.LinkedHashMap;
020    
021    import org.kuali.kfs.coa.businessobject.Chart;
022    import org.kuali.kfs.coa.businessobject.Organization;
023    import org.kuali.rice.kns.bo.Inactivateable;
024    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
025    
026    /**
027     * Customer numbers that may have been assigned by the Vendor to various <code>Chart</code> and/or <code>Org</code>.
028     * 
029     * @see org.kuali.kfs.coa.businessobject.Chart
030     * @see org.kuali.kfs.coa.businessobject.Org
031     */
032    public class VendorCustomerNumber extends PersistableBusinessObjectBase implements Inactivateable {
033    
034        private Integer vendorCustomerNumberGeneratedIdentifier;
035        private Integer vendorHeaderGeneratedIdentifier;
036        private Integer vendorDetailAssignedIdentifier;
037        private String vendorCustomerNumber;
038        private String chartOfAccountsCode;
039        private String vendorOrganizationCode;
040        private boolean active;
041    
042        private VendorDetail vendorDetail;
043        private Organization vendorOrganization;
044        private Chart chartOfAccounts;
045    
046        /**
047         * Default constructor.
048         */
049        public VendorCustomerNumber() {
050    
051        }
052    
053        public Integer getVendorCustomerNumberGeneratedIdentifier() {
054    
055            return vendorCustomerNumberGeneratedIdentifier;
056        }
057    
058        public void setVendorCustomerNumberGeneratedIdentifier(Integer vendorCustomerNumberGeneratedIdentifier) {
059            this.vendorCustomerNumberGeneratedIdentifier = vendorCustomerNumberGeneratedIdentifier;
060        }
061    
062        public Integer getVendorHeaderGeneratedIdentifier() {
063    
064            return vendorHeaderGeneratedIdentifier;
065        }
066    
067        public void setVendorHeaderGeneratedIdentifier(Integer vendorHeaderGeneratedIdentifier) {
068            this.vendorHeaderGeneratedIdentifier = vendorHeaderGeneratedIdentifier;
069        }
070    
071        public Integer getVendorDetailAssignedIdentifier() {
072    
073            return vendorDetailAssignedIdentifier;
074        }
075    
076        public void setVendorDetailAssignedIdentifier(Integer vendorDetailAssignedIdentifier) {
077            this.vendorDetailAssignedIdentifier = vendorDetailAssignedIdentifier;
078        }
079    
080        public String getVendorCustomerNumber() {
081    
082            return vendorCustomerNumber;
083        }
084    
085        public void setVendorCustomerNumber(String vendorCustomerNumber) {
086            this.vendorCustomerNumber = vendorCustomerNumber;
087        }
088    
089        public String getChartOfAccountsCode() {
090    
091            return chartOfAccountsCode;
092        }
093    
094        public void setChartOfAccountsCode(String chartOfAccountsCode) {
095            this.chartOfAccountsCode = chartOfAccountsCode;
096        }
097    
098        public String getVendorOrganizationCode() {
099    
100            return vendorOrganizationCode;
101        }
102    
103        public void setVendorOrganizationCode(String vendorOrganizationCode) {
104            this.vendorOrganizationCode = vendorOrganizationCode;
105        }
106    
107        public boolean isActive() {
108    
109            return active;
110        }
111    
112        public void setActive(boolean active) {
113            this.active = active;
114        }
115    
116        public VendorDetail getVendorDetail() {
117    
118            return vendorDetail;
119        }
120    
121        /**
122         * Sets the vendorDetail attribute.
123         * 
124         * @param vendorDetail The vendorDetail to set.
125         * @deprecated
126         */
127        public void setVendorDetail(VendorDetail vendorDetail) {
128            this.vendorDetail = vendorDetail;
129        }
130    
131        public Organization getVendorOrganization() {
132    
133            return vendorOrganization;
134        }
135    
136        /**
137         * Sets the vendorOrganization attribute.
138         * 
139         * @param vendorOrganization The vendorOrganization to set.
140         * @deprecated
141         */
142        public void setVendorOrganization(Organization vendorOrganization) {
143            this.vendorOrganization = vendorOrganization;
144        }
145    
146        public Chart getChartOfAccounts() {
147    
148            return chartOfAccounts;
149        }
150    
151        /**
152         * Sets the chartOfAccounts attribute.
153         * 
154         * @param chartOfAccounts The chartOfAccounts to set.
155         * @deprecated
156         */
157        public void setChartOfAccounts(Chart chartOfAccounts) {
158            this.chartOfAccounts = chartOfAccounts;
159        }
160    
161        /**
162         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
163         */
164        protected LinkedHashMap toStringMapper() {
165            LinkedHashMap m = new LinkedHashMap();
166            if (this.vendorCustomerNumberGeneratedIdentifier != null) {
167                m.put("vendorCustomerNumberGeneratedIdentifier", this.vendorCustomerNumberGeneratedIdentifier.toString());
168            }
169    
170            return m;
171        }
172    }