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.kra.budget.bo;
018:
019: import java.util.ArrayList;
020: import java.util.LinkedHashMap;
021: import java.util.List;
022:
023: import org.kuali.core.bo.PersistableBusinessObjectBase;
024: import org.kuali.core.util.KualiInteger;
025:
026: /**
027: *
028: */
029: public class UserAppointmentTask extends PersistableBusinessObjectBase
030: implements Comparable {
031:
032: private String documentNumber;
033: private Integer budgetTaskSequenceNumber;
034: private Integer budgetUserSequenceNumber;
035: private String institutionAppointmentTypeCode;
036:
037: private KualiInteger agencyFringeBenefitTotalAmountTask = new KualiInteger(
038: 0);
039: private KualiInteger agencyRequestTotalAmountTask = new KualiInteger(
040: 0);
041: private KualiInteger institutionCostShareFringeBenefitTotalAmountTask = new KualiInteger(
042: 0);
043: private KualiInteger institutionCostShareRequestTotalAmountTask = new KualiInteger(
044: 0);
045:
046: private KualiInteger gradAsstAgencySalaryTotal = new KualiInteger(0);
047: private KualiInteger gradAsstAgencyHealthInsuranceTotal = new KualiInteger(
048: 0);
049: private KualiInteger gradAsstInstSalaryTotal = new KualiInteger(0);
050: private KualiInteger gradAsstInstHealthInsuranceTotal = new KualiInteger(
051: 0);
052:
053: private List userAppointmentTaskPeriods = new ArrayList();
054:
055: private BudgetTask task;
056: private BudgetFringeRate budgetFringeRate;
057:
058: private boolean secondaryAppointment;
059:
060: /**
061: * Default no-arg constructor.
062: */
063: public UserAppointmentTask() {
064: super ();
065: }
066:
067: public UserAppointmentTask(UserAppointmentTask userAppointmentTask) {
068: super ();
069: this .documentNumber = userAppointmentTask.getDocumentNumber();
070: this .budgetTaskSequenceNumber = userAppointmentTask
071: .getBudgetTaskSequenceNumber();
072: this .budgetUserSequenceNumber = userAppointmentTask
073: .getBudgetUserSequenceNumber();
074: this .institutionAppointmentTypeCode = userAppointmentTask
075: .getInstitutionAppointmentTypeCode();
076:
077: this .userAppointmentTaskPeriods = new ArrayList(
078: userAppointmentTask.getUserAppointmentTaskPeriods() != null ? userAppointmentTask
079: .getUserAppointmentTaskPeriods()
080: : null);
081: }
082:
083: /**
084: * Gets the documentNumber attribute.
085: *
086: * @return Returns the documentNumber
087: */
088: public String getDocumentNumber() {
089: return documentNumber;
090: }
091:
092: /**
093: * Sets the documentNumber attribute.
094: *
095: * @param documentNumber The documentNumber to set.
096: */
097: public void setDocumentNumber(String documentNumber) {
098: this .documentNumber = documentNumber;
099: }
100:
101: /**
102: * Gets the budgetTaskSequenceNumber attribute.
103: *
104: * @return Returns the budgetTaskSequenceNumber
105: */
106: public Integer getBudgetTaskSequenceNumber() {
107: return budgetTaskSequenceNumber;
108: }
109:
110: /**
111: * Sets the budgetTaskSequenceNumber attribute.
112: *
113: * @param budgetTaskSequenceNumber The budgetTaskSequenceNumber to set.
114: */
115: public void setBudgetTaskSequenceNumber(
116: Integer budgetTaskSequenceNumber) {
117: this .budgetTaskSequenceNumber = budgetTaskSequenceNumber;
118: }
119:
120: /**
121: * Gets the budgetUserSequenceNumber attribute.
122: *
123: * @return Returns the budgetUserSequenceNumber
124: */
125: public Integer getBudgetUserSequenceNumber() {
126: return budgetUserSequenceNumber;
127: }
128:
129: /**
130: * Sets the budgetUserSequenceNumber attribute.
131: *
132: * @param budgetUserSequenceNumber The budgetUserSequenceNumber to set.
133: */
134: public void setBudgetUserSequenceNumber(
135: Integer budgetUserSequenceNumber) {
136: this .budgetUserSequenceNumber = budgetUserSequenceNumber;
137: }
138:
139: /**
140: * Sets the institutionAppointmentTypeCode attribute.
141: *
142: * @param institutionAppointmentTypeCode The institutionAppointmentTypeCode to set.
143: */
144: public String getInstitutionAppointmentTypeCode() {
145: return institutionAppointmentTypeCode;
146: }
147:
148: /**
149: * Gets the institutionAppointmentTypeCode attribute.
150: *
151: * @return Returns the institutionAppointmentTypeCode
152: */
153: public void setInstitutionAppointmentTypeCode(
154: String institutionAppointmentTypeCode) {
155: this .institutionAppointmentTypeCode = institutionAppointmentTypeCode;
156: }
157:
158: /**
159: * Gets the institutionAppointmentType attribute.
160: *
161: * @return Returns the institutionAppointmentType
162: */
163: public BudgetFringeRate getBudgetFringeRate() {
164: return budgetFringeRate;
165: }
166:
167: /**
168: * Sets the institutionAppointmentType attribute.
169: *
170: * @param institutionAppointmentType The institutionAppointmentType to set.
171: */
172: public void setBudgetFringeRate(BudgetFringeRate budgetFringeRate) {
173: this .budgetFringeRate = budgetFringeRate;
174: }
175:
176: /**
177: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
178: */
179: protected LinkedHashMap toStringMapper() {
180: LinkedHashMap m = new LinkedHashMap();
181:
182: // m.put("<unique identifier 1>", this.<UniqueIdentifier1>());
183: // m.put("<unique identifier 2>", this.<UniqueIdentifier2>());
184:
185: return m;
186: }
187:
188: /**
189: * Gets the userAppointmentTaskPeriods attribute.
190: *
191: * @return Returns the userAppointmentTaskPeriods.
192: */
193: public List<UserAppointmentTaskPeriod> getUserAppointmentTaskPeriods() {
194: return userAppointmentTaskPeriods;
195: }
196:
197: public UserAppointmentTaskPeriod getUserAppointmentTaskPeriod(
198: int index) {
199: while (getUserAppointmentTaskPeriods().size() <= index) {
200: getUserAppointmentTaskPeriods().add(
201: new UserAppointmentTaskPeriod());
202: }
203: return (UserAppointmentTaskPeriod) (getUserAppointmentTaskPeriods()
204: .get(index));
205: }
206:
207: /**
208: * Sets the userAppointmentTaskPeriods attribute value.
209: *
210: * @param userAppointmentTaskPeriods The userAppointmentTaskPeriods to set.
211: */
212: public void setUserAppointmentTaskPeriods(
213: List userAppointmentTaskPeriods) {
214: this .userAppointmentTaskPeriods = userAppointmentTaskPeriods;
215: }
216:
217: /**
218: * Gets the task attribute.
219: *
220: * @return Returns the task.
221: */
222: public BudgetTask getTask() {
223: return task;
224: }
225:
226: /**
227: * Sets the task attribute value.
228: *
229: * @param task The task to set.
230: */
231: public void setTask(BudgetTask task) {
232: this .task = task;
233: }
234:
235: /**
236: * @see java.lang.Comparable#compareTo(java.lang.Object)
237: */
238: public int compareTo(Object o) {
239: return this .getTask().compareTo(
240: ((UserAppointmentTask) o).getTask());
241: }
242:
243: /**
244: * Gets the agencyFringeBenefitTotalAmountTask attribute.
245: *
246: * @return Returns the agencyFringeBenefitTotalAmountTask.
247: */
248: public KualiInteger getAgencyFringeBenefitTotalAmountTask() {
249: return agencyFringeBenefitTotalAmountTask;
250: }
251:
252: /**
253: * Sets the agencyFringeBenefitTotalAmountTask attribute value.
254: *
255: * @param agencyFringeBenefitTotalAmountTask The agencyFringeBenefitTotalAmountTask to set.
256: */
257: public void setAgencyFringeBenefitTotalAmountTask(
258: KualiInteger agencyFringeBenefitTotalAmountTask) {
259: this .agencyFringeBenefitTotalAmountTask = agencyFringeBenefitTotalAmountTask;
260: }
261:
262: /**
263: * Gets the agencyRequestTotalAmountTask attribute.
264: *
265: * @return Returns the agencyRequestTotalAmountTask.
266: */
267: public KualiInteger getAgencyRequestTotalAmountTask() {
268: return agencyRequestTotalAmountTask;
269: }
270:
271: /**
272: * Sets the agencyRequestTotalAmountTask attribute value.
273: *
274: * @param agencyRequestTotalAmountTask The agencyRequestTotalAmountTask to set.
275: */
276: public void setAgencyRequestTotalAmountTask(
277: KualiInteger agencyRequestTotalAmountTask) {
278: this .agencyRequestTotalAmountTask = agencyRequestTotalAmountTask;
279: }
280:
281: /**
282: * Gets the institutionCostShareFringeBenefitTotalAmountTask attribute.
283: *
284: * @return Returns the institutionCostShareFringeBenefitTotalAmountTask.
285: */
286: public KualiInteger getInstitutionCostShareFringeBenefitTotalAmountTask() {
287: return institutionCostShareFringeBenefitTotalAmountTask;
288: }
289:
290: /**
291: * Sets the institutionCostShareFringeBenefitTotalAmountTask attribute value.
292: *
293: * @param institutionCostShareFringeBenefitTotalAmountTask The institutionCostShareFringeBenefitTotalAmountTask to set.
294: */
295: public void setInstitutionCostShareFringeBenefitTotalAmountTask(
296: KualiInteger institutionCostShareFringeBenefitTotalAmountTask) {
297: this .institutionCostShareFringeBenefitTotalAmountTask = institutionCostShareFringeBenefitTotalAmountTask;
298: }
299:
300: /**
301: * Gets the institutionCostShareRequestTotalAmountTask attribute.
302: *
303: * @return Returns the institutionCostShareRequestTotalAmountTask.
304: */
305: public KualiInteger getInstitutionCostShareRequestTotalAmountTask() {
306: return institutionCostShareRequestTotalAmountTask;
307: }
308:
309: /**
310: * Sets the institutionCostShareRequestTotalAmountTask attribute value.
311: *
312: * @param institutionCostShareRequestTotalAmountTask The institutionCostShareRequestTotalAmountTask to set.
313: */
314: public void setInstitutionCostShareRequestTotalAmountTask(
315: KualiInteger institutionCostShareRequestTotalAmountTask) {
316: this .institutionCostShareRequestTotalAmountTask = institutionCostShareRequestTotalAmountTask;
317: }
318:
319: /**
320: * Gets the gradAsstAgencyHealthInsurance attribute.
321: *
322: * @return Returns the gradAsstAgencyHealthInsurance.
323: */
324: public KualiInteger getGradAsstAgencyHealthInsuranceTotal() {
325: return gradAsstAgencyHealthInsuranceTotal;
326: }
327:
328: /**
329: * Sets the gradAsstAgencyHealthInsurance attribute value.
330: *
331: * @param gradAsstAgencyHealthInsurance The gradAsstAgencyHealthInsurance to set.
332: */
333: public void setGradAsstAgencyHealthInsuranceTotal(
334: KualiInteger gradAsstAgencyHealthInsuranceTotal) {
335: this .gradAsstAgencyHealthInsuranceTotal = gradAsstAgencyHealthInsuranceTotal;
336: }
337:
338: /**
339: * Gets the gradAsstAgencySalary attribute.
340: *
341: * @return Returns the gradAsstAgencySalary.
342: */
343: public KualiInteger getGradAsstAgencySalaryTotal() {
344: return gradAsstAgencySalaryTotal;
345: }
346:
347: /**
348: * Sets the gradAsstAgencySalary attribute value.
349: *
350: * @param gradAsstAgencySalary The gradAsstAgencySalary to set.
351: */
352: public void setGradAsstAgencySalaryTotal(
353: KualiInteger gradAsstAgencySalaryTotal) {
354: this .gradAsstAgencySalaryTotal = gradAsstAgencySalaryTotal;
355: }
356:
357: /**
358: * Gets the gradAsstUnivHealthInsurance attribute.
359: *
360: * @return Returns the gradAsstUnivHealthInsurance.
361: */
362: public KualiInteger getGradAsstInstHealthInsuranceTotal() {
363: return gradAsstInstHealthInsuranceTotal;
364: }
365:
366: /**
367: * Sets the gradAsstUnivHealthInsurance attribute value.
368: *
369: * @param gradAsstUnivHealthInsurance The gradAsstUnivHealthInsurance to set.
370: */
371: public void setGradAsstInstHealthInsuranceTotal(
372: KualiInteger gradAsstInstHealthInsuranceTotal) {
373: this .gradAsstInstHealthInsuranceTotal = gradAsstInstHealthInsuranceTotal;
374: }
375:
376: /**
377: * Gets the gradAsstUnivSalary attribute.
378: *
379: * @return Returns the gradAsstUnivSalary.
380: */
381: public KualiInteger getGradAsstInstSalaryTotal() {
382: return gradAsstInstSalaryTotal;
383: }
384:
385: /**
386: * Sets the gradAsstUnivSalary attribute value.
387: *
388: * @param gradAsstUnivSalary The gradAsstUnivSalary to set.
389: */
390: public void setGradAsstInstSalaryTotal(
391: KualiInteger gradAsstInstSalaryTotal) {
392: this .gradAsstInstSalaryTotal = gradAsstInstSalaryTotal;
393: }
394:
395: public boolean isSecondaryAppointment() {
396: return secondaryAppointment;
397: }
398:
399: public void setSecondaryAppointment(boolean isSecondaryAppointment) {
400: this.secondaryAppointment = isSecondaryAppointment;
401: }
402: }
|