View Javadoc
1   /*
2    * Copyright 2006 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  
17  package org.kuali.ole.module.cg.businessobject;
18  
19  import java.util.LinkedHashMap;
20  
21  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
22  import org.kuali.rice.core.api.util.type.KualiDecimal;
23  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
24  
25  /**
26   * This class represents an association between an award and a subcontractor. It's like a reference to the subcontractor from the
27   * award. This way an award can maintain a collection of these references instead of owning subcontractors directly.
28   */
29  public class AwardSubcontractor extends PersistableBusinessObjectBase implements MutableInactivatable {
30  
31      private String awardSubcontractorAmendmentNumber;
32      private String awardSubcontractorNumber;
33      private String subcontractorNumber;
34      private Long proposalNumber;
35      private KualiDecimal subcontractorAmount;
36      private String subcontractorContactFirstName;
37      private String subcontractorContactLastName;
38      private String subcontractorAuditHistoryText;
39      private String awardSubcontractorDescription;
40      private boolean active = true;
41  
42      private SubContractor subcontractor;
43  
44      /**
45       * Default constructor.
46       */
47      public AwardSubcontractor() {
48      }
49  
50      /**
51       * Gets the awardSubcontractorAmendmentNumber attribute.
52       * 
53       * @return Returns the awardSubcontractorAmendmentNumber
54       */
55      public String getAwardSubcontractorAmendmentNumber() {
56          return awardSubcontractorAmendmentNumber;
57      }
58  
59      /**
60       * Sets the awardSubcontractorAmendmentNumber attribute.
61       * 
62       * @param awardSubcontractorAmendmentNumber The awardSubcontractorAmendmentNumber to set.
63       */
64      public void setAwardSubcontractorAmendmentNumber(String awardSubcontractorAmendmentNumber) {
65          this.awardSubcontractorAmendmentNumber = awardSubcontractorAmendmentNumber;
66      }
67  
68  
69      /**
70       * Gets the awardSubcontractorNumber attribute.
71       * 
72       * @return Returns the awardSubcontractorNumber
73       */
74      public String getAwardSubcontractorNumber() {
75          return awardSubcontractorNumber;
76      }
77  
78      /**
79       * Sets the awardSubcontractorNumber attribute.
80       * 
81       * @param awardSubcontractorNumber The awardSubcontractorNumber to set.
82       */
83      public void setAwardSubcontractorNumber(String awardSubcontractorNumber) {
84          this.awardSubcontractorNumber = awardSubcontractorNumber;
85      }
86  
87  
88      /**
89       * Gets the subcontractorNumber attribute.
90       * 
91       * @return Returns the subcontractorNumber
92       */
93      public String getSubcontractorNumber() {
94          return subcontractorNumber;
95      }
96  
97      /**
98       * Sets the subcontractorNumber attribute.
99       * 
100      * @param subcontractorNumber The subcontractorNumber to set.
101      */
102     public void setSubcontractorNumber(String subcontractorNumber) {
103         this.subcontractorNumber = subcontractorNumber;
104     }
105 
106 
107     /**
108      * Gets the proposalNumber attribute.
109      * 
110      * @return Returns the proposalNumber
111      */
112     public Long getProposalNumber() {
113         return proposalNumber;
114     }
115 
116     /**
117      * Sets the proposalNumber attribute.
118      * 
119      * @param proposalNumber The proposalNumber to set.
120      */
121     public void setProposalNumber(Long proposalNumber) {
122         this.proposalNumber = proposalNumber;
123     }
124 
125 
126     /**
127      * Gets the subcontractorAmount attribute.
128      * 
129      * @return Returns the subcontractorAmount
130      */
131     public KualiDecimal getSubcontractorAmount() {
132         return subcontractorAmount;
133     }
134 
135     /**
136      * Sets the subcontractorAmount attribute.
137      * 
138      * @param subcontractorAmount The subcontractorAmount to set.
139      */
140     public void setSubcontractorAmount(KualiDecimal subcontractorAmount) {
141         this.subcontractorAmount = subcontractorAmount;
142     }
143 
144 
145     /**
146      * Gets the subcontractorContactFirstName attribute.
147      * 
148      * @return Returns the subcontractorContactFirstName
149      */
150     public String getSubcontractorContactFirstName() {
151         return subcontractorContactFirstName;
152     }
153 
154     /**
155      * Sets the subcontractorContactFirstName attribute.
156      * 
157      * @param subcontractorContactFirstName The subcontractorContactFirstName to set.
158      */
159     public void setSubcontractorContactFirstName(String subcontractorContactFirstName) {
160         this.subcontractorContactFirstName = subcontractorContactFirstName;
161     }
162 
163 
164     /**
165      * Gets the subcontractorContactLastName attribute.
166      * 
167      * @return Returns the subcontractorContactLastName
168      */
169     public String getSubcontractorContactLastName() {
170         return subcontractorContactLastName;
171     }
172 
173     /**
174      * Sets the subcontractorContactLastName attribute.
175      * 
176      * @param subcontractorContactLastName The subcontractorContactLastName to set.
177      */
178     public void setSubcontractorContactLastName(String subcontractorContactLastName) {
179         this.subcontractorContactLastName = subcontractorContactLastName;
180     }
181 
182 
183     /**
184      * Gets the subcontractorAuditHistoryText attribute.
185      * 
186      * @return Returns the subcontractorAuditHistoryText
187      */
188     public String getSubcontractorAuditHistoryText() {
189         return subcontractorAuditHistoryText;
190     }
191 
192     /**
193      * Sets the subcontractorAuditHistoryText attribute.
194      * 
195      * @param subcontractorAuditHistoryText The subcontractorAuditHistoryText to set.
196      */
197     public void setSubcontractorAuditHistoryText(String subcontractorAuditHistoryText) {
198         this.subcontractorAuditHistoryText = subcontractorAuditHistoryText;
199     }
200 
201     /**
202      * Gets the awardSubcontractorDescription attribute.
203      * 
204      * @return Returns the awardSubcontractorDescription.
205      */
206     public String getAwardSubcontractorDescription() {
207         return awardSubcontractorDescription;
208     }
209 
210     /**
211      * Sets the awardSubcontractorDescription attribute value.
212      * 
213      * @param awardSubcontractorDescription The awardSubcontractorDescription to set.
214      */
215     public void setAwardSubcontractorDescription(String awardSubcontractorDescription) {
216         this.awardSubcontractorDescription = awardSubcontractorDescription;
217     }
218 
219     /**
220      * Gets the subcontractor attribute.
221      * 
222      * @return Returns the subcontractor.
223      */
224     public SubContractor getSubcontractor() {
225         return subcontractor;
226     }
227 
228     /**
229      * Sets the subcontractor attribute.
230      * 
231      * @param subcontractor The subcontractor to set.
232      * @deprecated Setter is required by OJB, but should not be used to modify this attribute. This attribute is set on the initial
233      *             creation of the object and should not be changed.
234      */
235     @Deprecated
236     public void setSubcontractor(SubContractor subcontractor) {
237         this.subcontractor = subcontractor;
238     }
239 
240     /**
241      * @see org.kuali.rice.core.api.mo.common.active.MutableInactivatable#setActive(boolean)
242      */
243     public void setActive(boolean active) {
244         this.active = active;
245     }
246 
247     /**
248      * @see org.kuali.rice.core.api.mo.common.active.MutableInactivatable#isActive()
249      */
250     public boolean isActive() {
251         return active;
252     }
253 
254     /**
255      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
256      */
257     @SuppressWarnings("unchecked")
258     
259     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
260         LinkedHashMap m = new LinkedHashMap();
261         m.put("awardSubcontractorAmendmentNumber", this.awardSubcontractorAmendmentNumber);
262         m.put("awardSubcontractorNumber", this.awardSubcontractorNumber);
263         m.put("subcontractorNumber", this.subcontractorNumber);
264         if (this.proposalNumber != null) {
265             m.put("proposalNumber", this.proposalNumber.toString());
266         }
267         return m;
268     }
269 
270 }