View Javadoc
1   /*
2    * Copyright 2008 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.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/ecl2.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.vnd.businessobject;
17  
18  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
19  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
20  
21  public class VendorCommodityCode extends PersistableBusinessObjectBase implements MutableInactivatable {
22  
23  	private Integer vendorHeaderGeneratedIdentifier;
24  	private Integer vendorDetailAssignedIdentifier;
25  	private String purchasingCommodityCode;
26  	private boolean commodityDefaultIndicator;
27  	private boolean active;
28  
29      private VendorDetail vendorDetail;
30      private CommodityCode commodityCode;
31      
32  	/**
33  	 * Default constructor.
34  	 */
35  	public VendorCommodityCode() {
36  
37  	}
38  
39  	public VendorCommodityCode(Integer vendorHeaderGeneratedIdentifier, Integer vendorDetailAssignedIdentifier, CommodityCode commodityCode, boolean active) {
40  	    this.vendorHeaderGeneratedIdentifier = vendorHeaderGeneratedIdentifier;
41  	    this.vendorDetailAssignedIdentifier = vendorDetailAssignedIdentifier;
42  	    this.commodityCode = commodityCode;
43  	    if (commodityCode != null) {
44  	        this.purchasingCommodityCode = commodityCode.getPurchasingCommodityCode();
45  	    }
46  	    this.active = active;
47  	}
48  	
49  	/**
50  	 * Gets the vendorHeaderGeneratedIdentifier attribute.
51  	 * 
52  	 * @return Returns the vendorHeaderGeneratedIdentifier
53  	 * 
54  	 */
55  	public Integer getVendorHeaderGeneratedIdentifier() { 
56  		return vendorHeaderGeneratedIdentifier;
57  	}
58  
59  	/**
60  	 * Sets the vendorHeaderGeneratedIdentifier attribute.
61  	 * 
62  	 * @param vendorHeaderGeneratedIdentifier The vendorHeaderGeneratedIdentifier to set.
63  	 * 
64  	 */
65  	public void setVendorHeaderGeneratedIdentifier(Integer vendorHeaderGeneratedIdentifier) {
66  		this.vendorHeaderGeneratedIdentifier = vendorHeaderGeneratedIdentifier;
67  	}
68  
69  
70  	/**
71  	 * Gets the vendorDetailAssignedIdentifier attribute.
72  	 * 
73  	 * @return Returns the vendorDetailAssignedIdentifier
74  	 * 
75  	 */
76  	public Integer getVendorDetailAssignedIdentifier() { 
77  		return vendorDetailAssignedIdentifier;
78  	}
79  
80  	/**
81  	 * Sets the vendorDetailAssignedIdentifier attribute.
82  	 * 
83  	 * @param vendorDetailAssignedIdentifier The vendorDetailAssignedIdentifier to set.
84  	 * 
85  	 */
86  	public void setVendorDetailAssignedIdentifier(Integer vendorDetailAssignedIdentifier) {
87  		this.vendorDetailAssignedIdentifier = vendorDetailAssignedIdentifier;
88  	}
89  
90  
91  	/**
92  	 * Gets the commodityCode attribute.
93  	 * 
94  	 * @return Returns the commodityCode
95  	 * 
96  	 */
97  	public String getPurchasingCommodityCode() { 
98  		return purchasingCommodityCode;
99  	}
100 
101 	/**
102 	 * Sets the commodityCode attribute.
103 	 * 
104 	 * @param commodityCode The commodityCode to set.
105 	 * 
106 	 */
107 	public void setPurchasingCommodityCode(String purchasingCommodityCode) {
108 		this.purchasingCommodityCode = purchasingCommodityCode;
109 	}
110 
111 
112 	/**
113 	 * Gets the commodityDefaultIndicator attribute.
114 	 * 
115 	 * @return Returns the commodityDefaultIndicator
116 	 * 
117 	 */
118 	public boolean isCommodityDefaultIndicator() { 
119 		return commodityDefaultIndicator;
120 	}
121 
122 	/**
123 	 * Sets the commodityDefaultIndicator attribute.
124 	 * 
125 	 * @param commodityDefaultIndicator The commodityDefaultIndicator to set.
126 	 * 
127 	 */
128 	public void setCommodityDefaultIndicator(boolean commodityDefaultIndicator) {
129 		this.commodityDefaultIndicator = commodityDefaultIndicator;
130 	}
131 
132 
133 	/**
134 	 * Gets the active attribute.
135 	 * 
136 	 * @return Returns the active
137 	 * 
138 	 */
139 	public boolean isActive() { 
140 		return active;
141 	}
142 
143 	/**
144 	 * Sets the active attribute.
145 	 * 
146 	 * @param active The active to set.
147 	 * 
148 	 */
149 	public void setActive(boolean active) {
150 		this.active = active;
151 	}
152 
153 	/**
154      * Gets the vendorDetail attribute. 
155      * @return Returns the vendorDetail.
156      */
157     public VendorDetail getVendorDetail() {
158         return vendorDetail;
159     }
160 
161     /**
162      * Sets the vendorDetail attribute value.
163      * @param vendorDetail The vendorDetail to set.
164      * @deprecated
165      */
166     public void setVendorDetail(VendorDetail vendorDetail) {
167         this.vendorDetail = vendorDetail;
168     }
169 
170     public CommodityCode getCommodityCode() {
171         return commodityCode;
172     }
173 
174     public void setCommodityCode(CommodityCode commodityCode) {
175         this.commodityCode = commodityCode;
176     }
177 
178 }