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.purap.businessobject;
017    
018    import java.util.LinkedHashMap;
019    
020    import org.kuali.kfs.coa.businessobject.AccountType;
021    import org.kuali.kfs.coa.businessobject.Chart;
022    import org.kuali.kfs.coa.businessobject.ObjectCode;
023    import org.kuali.kfs.coa.businessobject.Organization;
024    import org.kuali.kfs.coa.businessobject.SubFundGroup;
025    import org.kuali.kfs.vnd.businessobject.CommodityCode;
026    import org.kuali.kfs.vnd.businessobject.VendorDetail;
027    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
028    import org.kuali.rice.kns.util.KualiDecimal;
029    import org.kuali.rice.kns.bo.Inactivateable;
030    
031    public class ReceivingThreshold extends PersistableBusinessObjectBase implements Inactivateable{
032    
033        private Integer thresholdIdentifier;
034        private String chartOfAccountsCode;
035        private String accountTypeCode;
036        private String subFundGroupCode;
037        private String financialObjectCode;
038        private String organizationCode;
039        private KualiDecimal thresholdAmount;
040        private String purchasingCommodityCode;
041        
042        private Integer vendorHeaderGeneratedIdentifier;
043        private Integer vendorDetailAssignedIdentifier;
044    
045        private boolean active;
046        
047        private Chart chart;
048        private AccountType accountType;
049        private SubFundGroup subFundGroup;
050        private ObjectCode financialObject;
051        private Organization organization;
052        private VendorDetail vendorDetail;
053        private CommodityCode commodityCode;
054        
055        public ReceivingThreshold(){
056        }
057        
058        @Override
059        protected LinkedHashMap toStringMapper() {
060            
061            LinkedHashMap returnMap = new LinkedHashMap();
062            
063            returnMap.put("thresholdIdentifier",thresholdIdentifier);
064            returnMap.put("chartOfAccountsCode",chartOfAccountsCode);
065            returnMap.put("accountTypeCode",accountTypeCode);
066            returnMap.put("subFundGroupCode",subFundGroupCode);
067            returnMap.put("financialObjectCode",financialObjectCode);
068            returnMap.put("organizationCode",organizationCode);
069            returnMap.put("vendorHeaderGeneratedIdentifier",vendorHeaderGeneratedIdentifier);
070            returnMap.put("thresholdAmount",thresholdAmount);
071            returnMap.put("active",active);
072            
073            return returnMap;
074        }
075    
076        public AccountType getAccountType() {
077            return accountType;
078        }
079    
080        public void setAccountType(AccountType accountType) {
081            this.accountType = accountType;
082        }
083    
084        public String getAccountTypeCode() {
085            return accountTypeCode;
086        }
087    
088        public void setAccountTypeCode(String accountTypeCode) {
089            this.accountTypeCode = accountTypeCode;
090        }
091    
092        public boolean isActive() {
093            return active;
094        }
095    
096        public void setActive(boolean active) {
097            this.active = active;
098        }
099    
100        public Chart getChart() {
101            return chart;
102        }
103    
104        public void setChart(Chart chart) {
105            this.chart = chart;
106        }
107    
108        public String getChartOfAccountsCode() {
109            return chartOfAccountsCode;
110        }
111    
112        public void setChartOfAccountsCode(String chartOfAccountsCode) {
113            this.chartOfAccountsCode = chartOfAccountsCode;
114        }
115    
116        public ObjectCode getFinancialObject() {
117            return financialObject;
118        }
119    
120        public void setFinancialObject(ObjectCode financialObject) {
121            this.financialObject = financialObject;
122        }
123    
124        public String getFinancialObjectCode() {
125            return financialObjectCode;
126        }
127    
128        public void setFinancialObjectCode(String financialObjectCode) {
129            this.financialObjectCode = financialObjectCode;
130        }
131    
132        public Organization getOrganization() {
133            return organization;
134        }
135    
136        public void setOrganization(Organization organization) {
137            this.organization = organization;
138        }
139    
140        public String getOrganizationCode() {
141            return organizationCode;
142        }
143    
144        public void setOrganizationCode(String organizationCode) {
145            this.organizationCode = organizationCode;
146        }
147    
148        public SubFundGroup getSubFundGroup() {
149            return subFundGroup;
150        }
151    
152        public void setSubFundGroup(SubFundGroup subFundGroup) {
153            this.subFundGroup = subFundGroup;
154        }
155    
156        public String getSubFundGroupCode() {
157            return subFundGroupCode;
158        }
159    
160        public void setSubFundGroupCode(String subFundGroupCode) {
161            this.subFundGroupCode = subFundGroupCode;
162        }
163    
164        public Integer getThresholdIdentifier() {
165            return thresholdIdentifier;
166        }
167    
168        public void setThresholdIdentifier(Integer thresholdIdentifier) {
169            this.thresholdIdentifier = thresholdIdentifier;
170        }
171    
172        public Integer getVendorHeaderGeneratedIdentifier() {
173            return vendorHeaderGeneratedIdentifier;
174        }
175    
176        public void setVendorHeaderGeneratedIdentifier(Integer vendorHeaderGeneratedIdentifier) {
177            this.vendorHeaderGeneratedIdentifier = vendorHeaderGeneratedIdentifier;
178        }
179    
180        public KualiDecimal getThresholdAmount() {
181            return thresholdAmount;
182        }
183    
184        public void setThresholdAmount(KualiDecimal thresholdAmount) {
185            this.thresholdAmount = thresholdAmount;
186        }
187    
188        public VendorDetail getVendorDetail() {
189            return vendorDetail;
190        }
191    
192        public void setVendorDetail(VendorDetail vendorDetail) {
193            this.vendorDetail = vendorDetail;
194        }
195    
196        public String getVendorNumber() {
197            VendorDetail tempVendorDetail = new VendorDetail();
198            tempVendorDetail.setVendorHeaderGeneratedIdentifier(vendorHeaderGeneratedIdentifier);
199            tempVendorDetail.setVendorDetailAssignedIdentifier(vendorDetailAssignedIdentifier);
200            return tempVendorDetail.getVendorNumber();
201        }
202    
203        public void setVendorNumber(String vendorNumber) {
204            VendorDetail tempVendorDetail = new VendorDetail();
205            tempVendorDetail.setVendorNumber(vendorNumber);
206            setVendorHeaderGeneratedIdentifier(tempVendorDetail.getVendorHeaderGeneratedIdentifier());
207            setVendorDetailAssignedIdentifier(tempVendorDetail.getVendorDetailAssignedIdentifier());
208        }
209        
210        public Integer getVendorDetailAssignedIdentifier() {
211            return vendorDetailAssignedIdentifier;
212        }
213    
214        public void setVendorDetailAssignedIdentifier(Integer vendorDetailAssignedIdentifier) {
215            this.vendorDetailAssignedIdentifier = vendorDetailAssignedIdentifier;
216        }
217        
218        public String getPurchasingCommodityCode() {
219            return purchasingCommodityCode;
220        }
221    
222        public void setPurchasingCommodityCode(String purchasingCommodityCode) {
223            this.purchasingCommodityCode = purchasingCommodityCode;
224        }
225    
226        public CommodityCode getCommodityCode() {
227            return commodityCode;
228        }
229    
230        public void setCommodityCode(CommodityCode commodityCode) {
231            this.commodityCode = commodityCode;
232        }
233        
234    }