001: /*
002: * Copyright 2006-2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.module.cg.bo;
018:
019: import java.util.LinkedHashMap;
020:
021: import org.kuali.core.bo.Inactivateable;
022: import org.kuali.core.bo.PersistableBusinessObjectBase;
023: import org.kuali.core.util.KualiDecimal;
024:
025: /**
026: * This class represents an association between an award and a subcontractor. It's like a reference to the subcontractor from the
027: * award. This way an award can maintain a collection of these references instead of owning subcontractors directly.
028: */
029: public class AwardSubcontractor extends PersistableBusinessObjectBase
030: implements Inactivateable {
031:
032: private String awardSubcontractorAmendmentNumber;
033: private String awardSubcontractorNumber;
034: private String subcontractorNumber;
035: private Long proposalNumber;
036: private KualiDecimal subcontractorAmount;
037: private String subcontractorContactFirstName;
038: private String subcontractorContactLastName;
039: private String subcontractorAuditHistoryText;
040: private String awardSubcontractorDescription;
041: private boolean active = true;
042:
043: private Subcontractor subcontractor;
044:
045: /**
046: * Default constructor.
047: */
048: public AwardSubcontractor() {
049: }
050:
051: /**
052: * Gets the awardSubcontractorAmendmentNumber attribute.
053: *
054: * @return Returns the awardSubcontractorAmendmentNumber
055: */
056: public String getAwardSubcontractorAmendmentNumber() {
057: return awardSubcontractorAmendmentNumber;
058: }
059:
060: /**
061: * Sets the awardSubcontractorAmendmentNumber attribute.
062: *
063: * @param awardSubcontractorAmendmentNumber The awardSubcontractorAmendmentNumber to set.
064: */
065: public void setAwardSubcontractorAmendmentNumber(
066: String awardSubcontractorAmendmentNumber) {
067: this .awardSubcontractorAmendmentNumber = awardSubcontractorAmendmentNumber;
068: }
069:
070: /**
071: * Gets the awardSubcontractorNumber attribute.
072: *
073: * @return Returns the awardSubcontractorNumber
074: */
075: public String getAwardSubcontractorNumber() {
076: return awardSubcontractorNumber;
077: }
078:
079: /**
080: * Sets the awardSubcontractorNumber attribute.
081: *
082: * @param awardSubcontractorNumber The awardSubcontractorNumber to set.
083: */
084: public void setAwardSubcontractorNumber(
085: String awardSubcontractorNumber) {
086: this .awardSubcontractorNumber = awardSubcontractorNumber;
087: }
088:
089: /**
090: * Gets the subcontractorNumber attribute.
091: *
092: * @return Returns the subcontractorNumber
093: */
094: public String getSubcontractorNumber() {
095: return subcontractorNumber;
096: }
097:
098: /**
099: * Sets the subcontractorNumber attribute.
100: *
101: * @param subcontractorNumber The subcontractorNumber to set.
102: */
103: public void setSubcontractorNumber(String subcontractorNumber) {
104: this .subcontractorNumber = subcontractorNumber;
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: * Gets the subcontractorAmount attribute.
127: *
128: * @return Returns the subcontractorAmount
129: */
130: public KualiDecimal getSubcontractorAmount() {
131: return subcontractorAmount;
132: }
133:
134: /**
135: * Sets the subcontractorAmount attribute.
136: *
137: * @param subcontractorAmount The subcontractorAmount to set.
138: */
139: public void setSubcontractorAmount(KualiDecimal subcontractorAmount) {
140: this .subcontractorAmount = subcontractorAmount;
141: }
142:
143: /**
144: * Gets the subcontractorContactFirstName attribute.
145: *
146: * @return Returns the subcontractorContactFirstName
147: */
148: public String getSubcontractorContactFirstName() {
149: return subcontractorContactFirstName;
150: }
151:
152: /**
153: * Sets the subcontractorContactFirstName attribute.
154: *
155: * @param subcontractorContactFirstName The subcontractorContactFirstName to set.
156: */
157: public void setSubcontractorContactFirstName(
158: String subcontractorContactFirstName) {
159: this .subcontractorContactFirstName = subcontractorContactFirstName;
160: }
161:
162: /**
163: * Gets the subcontractorContactLastName attribute.
164: *
165: * @return Returns the subcontractorContactLastName
166: */
167: public String getSubcontractorContactLastName() {
168: return subcontractorContactLastName;
169: }
170:
171: /**
172: * Sets the subcontractorContactLastName attribute.
173: *
174: * @param subcontractorContactLastName The subcontractorContactLastName to set.
175: */
176: public void setSubcontractorContactLastName(
177: String subcontractorContactLastName) {
178: this .subcontractorContactLastName = subcontractorContactLastName;
179: }
180:
181: /**
182: * Gets the subcontractorAuditHistoryText attribute.
183: *
184: * @return Returns the subcontractorAuditHistoryText
185: */
186: public String getSubcontractorAuditHistoryText() {
187: return subcontractorAuditHistoryText;
188: }
189:
190: /**
191: * Sets the subcontractorAuditHistoryText attribute.
192: *
193: * @param subcontractorAuditHistoryText The subcontractorAuditHistoryText to set.
194: */
195: public void setSubcontractorAuditHistoryText(
196: String subcontractorAuditHistoryText) {
197: this .subcontractorAuditHistoryText = subcontractorAuditHistoryText;
198: }
199:
200: /**
201: * Gets the awardSubcontractorDescription attribute.
202: *
203: * @return Returns the awardSubcontractorDescription.
204: */
205: public String getAwardSubcontractorDescription() {
206: return awardSubcontractorDescription;
207: }
208:
209: /**
210: * Sets the awardSubcontractorDescription attribute value.
211: *
212: * @param awardSubcontractorDescription The awardSubcontractorDescription to set.
213: */
214: public void setAwardSubcontractorDescription(
215: 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.core.bo.Inactivateable#setActive(boolean)
242: */
243: public void setActive(boolean active) {
244: this .active = active;
245: }
246:
247: /**
248: * @see org.kuali.core.bo.Inactivateable#isActive()
249: */
250: public boolean isActive() {
251: return active;
252: }
253:
254: /**
255: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
256: */
257: @SuppressWarnings("unchecked")
258: @Override
259: protected LinkedHashMap toStringMapper() {
260: LinkedHashMap m = new LinkedHashMap();
261: m.put("awardSubcontractorAmendmentNumber",
262: this .awardSubcontractorAmendmentNumber);
263: m
264: .put("awardSubcontractorNumber",
265: this .awardSubcontractorNumber);
266: m.put("subcontractorNumber", this .subcontractorNumber);
267: if (this .proposalNumber != null) {
268: m.put("proposalNumber", this.proposalNumber.toString());
269: }
270: return m;
271: }
272:
273: }
|