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.vnd.businessobject;
017
018 import java.util.LinkedHashMap;
019
020 import org.kuali.kfs.vnd.VendorPropertyConstants;
021 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
022
023 /**
024 * @author Kuali Nervous System Team (kualidev@oncourse.iu.edu)
025 */
026 public class CommodityContractManager extends PersistableBusinessObjectBase {
027
028 private String purchasingCommodityCode;
029 private String campusCode;
030 private Integer contractManagerCode;
031
032 private CampusParameter campus;
033 private CommodityCode commodityCode;
034 private ContractManager contractManager;
035
036 /**
037 * Default constructor.
038 */
039 public CommodityContractManager() {
040
041 }
042
043 public String getPurchasingCommodityCode() {
044 return purchasingCommodityCode;
045 }
046
047 public void setPurchasingCommodityCode(String purchasingCommodityCode) {
048 this.purchasingCommodityCode = purchasingCommodityCode;
049 }
050
051 public String getCampusCode() {
052 return campusCode;
053 }
054
055 public void setCampusCode(String campusCode) {
056 this.campusCode = campusCode;
057 }
058
059 public Integer getContractManagerCode() {
060 return contractManagerCode;
061 }
062
063 public void setContractManagerCode(Integer contractManagerCode) {
064 this.contractManagerCode = contractManagerCode;
065 }
066
067 public CampusParameter getCampus() {
068 return campus;
069 }
070
071 /**
072 * Sets the campus attribute.
073 *
074 * @param campus The campus to set.
075 * @deprecated
076 */
077 public void setCampus(CampusParameter campus) {
078 this.campus = campus;
079 }
080
081
082 public CommodityCode getCommodityCode() {
083 return commodityCode;
084 }
085
086 /**
087 * Sets the commodity attribute value.
088 * @param commodityCode The commodityCode to set.
089 * @deprecated
090 */
091 public void setCommodityCode(CommodityCode commodityCode) {
092 this.commodityCode = commodityCode;
093 }
094
095
096 public ContractManager getContractManager() {
097 return contractManager;
098 }
099
100 /**
101 * Sets the contractManager attribute value.
102 * @param contractManager The contractManager to set.
103 * @deprecated
104 */
105 public void setContractManager(ContractManager contractManager) {
106 this.contractManager = contractManager;
107 }
108
109 /**
110 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
111 */
112 protected LinkedHashMap toStringMapper() {
113 LinkedHashMap m = new LinkedHashMap();
114 m.put(VendorPropertyConstants.PURCHASING_COMMODITY_CODE, this.purchasingCommodityCode);
115 m.put(VendorPropertyConstants.CAMPUS_CODE, this.campusCode);
116 if (this.contractManagerCode != null) {
117 m.put(VendorPropertyConstants.CONTRACT_MANAGER_CODE, this.contractManagerCode.toString());
118 }
119 return m;
120 }
121 }