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.labor.bo;
018:
019: import java.math.BigDecimal;
020:
021: import org.kuali.core.bo.user.PersonPayrollId;
022: import org.kuali.core.bo.user.UniversalUser;
023: import org.kuali.core.bo.user.UserId;
024: import org.kuali.core.exceptions.UserNotFoundException;
025: import org.kuali.core.service.UniversalUserService;
026: import org.kuali.core.util.KualiDecimal;
027: import org.kuali.kfs.context.SpringContext;
028: import org.kuali.module.gl.bo.TransientBalanceInquiryAttributes;
029: import org.kuali.module.labor.LaborConstants;
030:
031: /**
032: * Labor business object for July 1 Position Funding
033: */
034: public class July1PositionFunding extends LedgerBalance {
035:
036: private KualiDecimal july1BudgetAmount;
037: private BigDecimal july1BudgetFteQuantity;
038: private BigDecimal july1BudgetTimePercent;
039: private String personName;
040: private TransientBalanceInquiryAttributes dummyBusinessObject;
041:
042: /**
043: * Default constructor.
044: */
045: public July1PositionFunding() {
046:
047: }
048:
049: /**
050: * Gets the july1BudgetAmount.
051: *
052: * @return Returns the july1BudgetAmount
053: */
054: public KualiDecimal getJuly1BudgetAmount() {
055: return july1BudgetAmount;
056: }
057:
058: /**
059: * Sets the july1BudgetAmount.
060: *
061: * @param july1BudgetAmount The july1BudgetAmount to set.
062: */
063: public void setJuly1BudgetAmount(KualiDecimal july1BudgetAmount) {
064: this .july1BudgetAmount = july1BudgetAmount;
065: }
066:
067: /**
068: * Gets the july1BudgetFteQuantity.
069: *
070: * @return Returns the july1BudgetFteQuantity
071: */
072: public BigDecimal getJuly1BudgetFteQuantity() {
073: return july1BudgetFteQuantity;
074: }
075:
076: /**
077: * Sets the july1BudgetFteQuantity.
078: *
079: * @param july1BudgetFteQuantity The july1BudgetFteQuantity to set.
080: */
081: public void setJuly1BudgetFteQuantity(
082: BigDecimal july1BudgetFteQuantity) {
083: this .july1BudgetFteQuantity = july1BudgetFteQuantity;
084: }
085:
086: /**
087: * Gets the july1BudgetTimePercent.
088: *
089: * @return Returns the july1BudgetTimePercent
090: */
091: public BigDecimal getJuly1BudgetTimePercent() {
092: return july1BudgetTimePercent;
093: }
094:
095: /**
096: * Sets the july1BudgetTimePercent.
097: *
098: * @param july1BudgetTimePercent The july1BudgetTimePercent to set.
099: */
100: public void setJuly1BudgetTimePercent(
101: BigDecimal july1BudgetTimePercent) {
102: this .july1BudgetTimePercent = july1BudgetTimePercent;
103: }
104:
105: /**
106: * Gets the dummyBusinessObject.
107: *
108: * @return Returns the dummyBusinessObject.
109: */
110: public TransientBalanceInquiryAttributes getDummyBusinessObject() {
111: return dummyBusinessObject;
112: }
113:
114: /**
115: * Sets the dummyBusinessObject.
116: *
117: * @param dummyBusinessObject The dummyBusinessObject to set.
118: */
119: public void setDummyBusinessObject(
120: TransientBalanceInquiryAttributes dummyBusinessObject) {
121: this .dummyBusinessObject = dummyBusinessObject;
122: }
123:
124: /**
125: * Gets the personName
126: *
127: * @return Returns the personsName
128: */
129: public String getPersonName() {
130: UserId empl = new PersonPayrollId(getEmplid());
131: UniversalUser universalUser = null;
132:
133: try {
134: universalUser = SpringContext.getBean(
135: UniversalUserService.class).getUniversalUser(empl);
136: } catch (UserNotFoundException e) {
137: return LaborConstants.BalanceInquiries.UnknownPersonName;
138: }
139:
140: return universalUser.getPersonName();
141: }
142:
143: /**
144: * Sets the personName
145: *
146: * @param personName
147: */
148: public void setPersonName(String personName) {
149: this.personName = personName;
150: }
151: }
|