001    /*
002     * Copyright 2011 The Kuali Foundation.
003     * 
004     * Licensed under the Educational Community License, Version 2.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/ecl2.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.kfs.module.ld.businessobject;
018    
019    import java.math.BigDecimal;
020    
021    import org.kuali.kfs.gl.businessobject.TransientBalanceInquiryAttributes;
022    import org.kuali.kfs.module.ld.LaborConstants;
023    import org.kuali.kfs.sys.context.SpringContext;
024    import org.kuali.rice.kim.bo.Person;
025    import org.kuali.rice.kim.service.PersonService;
026    import org.kuali.rice.kns.util.KualiDecimal;
027    
028    /**
029     * Labor business object for July 1 Position Funding
030     */
031    public class July1PositionFunding extends LedgerBalance {
032    
033        private KualiDecimal july1BudgetAmount;
034        private BigDecimal july1BudgetFteQuantity;
035        private BigDecimal july1BudgetTimePercent;
036        private String personName;
037        private TransientBalanceInquiryAttributes dummyBusinessObject;
038    
039        /**
040         * Default constructor.
041         */
042        public July1PositionFunding() {
043    
044        }
045    
046        /**
047         * Gets the july1BudgetAmount.
048         * 
049         * @return Returns the july1BudgetAmount
050         */
051        public KualiDecimal getJuly1BudgetAmount() {
052            return july1BudgetAmount;
053        }
054    
055        /**
056         * Sets the july1BudgetAmount.
057         * 
058         * @param july1BudgetAmount The july1BudgetAmount to set.
059         */
060        public void setJuly1BudgetAmount(KualiDecimal july1BudgetAmount) {
061            this.july1BudgetAmount = july1BudgetAmount;
062        }
063    
064        /**
065         * Gets the july1BudgetFteQuantity.
066         * 
067         * @return Returns the july1BudgetFteQuantity
068         */
069        public BigDecimal getJuly1BudgetFteQuantity() {
070            return july1BudgetFteQuantity;
071        }
072    
073        /**
074         * Sets the july1BudgetFteQuantity.
075         * 
076         * @param july1BudgetFteQuantity The july1BudgetFteQuantity to set.
077         */
078        public void setJuly1BudgetFteQuantity(BigDecimal july1BudgetFteQuantity) {
079            this.july1BudgetFteQuantity = july1BudgetFteQuantity;
080        }
081    
082        /**
083         * Gets the july1BudgetTimePercent.
084         * 
085         * @return Returns the july1BudgetTimePercent
086         */
087        public BigDecimal getJuly1BudgetTimePercent() {
088            return july1BudgetTimePercent;
089        }
090    
091        /**
092         * Sets the july1BudgetTimePercent.
093         * 
094         * @param july1BudgetTimePercent The july1BudgetTimePercent to set.
095         */
096        public void setJuly1BudgetTimePercent(BigDecimal july1BudgetTimePercent) {
097            this.july1BudgetTimePercent = july1BudgetTimePercent;
098        }
099    
100        /**
101         * Gets the dummyBusinessObject.
102         * 
103         * @return Returns the dummyBusinessObject.
104         */
105        public TransientBalanceInquiryAttributes getDummyBusinessObject() {
106            return dummyBusinessObject;
107        }
108    
109        /**
110         * Sets the dummyBusinessObject.
111         * 
112         * @param dummyBusinessObject The dummyBusinessObject to set.
113         */
114        public void setDummyBusinessObject(TransientBalanceInquiryAttributes dummyBusinessObject) {
115            this.dummyBusinessObject = dummyBusinessObject;
116        }
117    
118        /**
119         * Gets the personName
120         * 
121         * @return Returns the personsName
122         */
123        public String getName() {
124            Person person = (Person) SpringContext.getBean(PersonService.class).getPersonByEmployeeId(getEmplid());
125            if (person == null) {
126                return LaborConstants.BalanceInquiries.UnknownPersonName;
127            }
128            
129            return person.getName();
130        }
131    
132        /**
133         * Sets the personName
134         * 
135         * @param personName
136         */
137        public void setName(String personName) {
138            this.personName = personName;
139        }
140    }
141