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    package org.kuali.kfs.module.ec.businessobject;
017    
018    import java.util.LinkedHashMap;
019    
020    import org.kuali.kfs.integration.ld.LaborLedgerPositionObjectGroup;
021    import org.kuali.kfs.module.ld.LaborPropertyConstants;
022    import org.kuali.kfs.sys.businessobject.SystemOptions;
023    import org.kuali.kfs.sys.context.SpringContext;
024    import org.kuali.rice.kns.bo.Inactivateable;
025    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
026    import org.kuali.rice.kns.service.KualiModuleService;
027    
028    /**
029     * Business Object for the Effort Certification Report Position Table.
030     */
031    public class EffortCertificationReportPosition extends PersistableBusinessObjectBase implements Inactivateable {
032        private Integer universityFiscalYear;
033        private String effortCertificationReportNumber;
034        private String effortCertificationReportPositionObjectGroupCode;
035        private boolean active;
036    
037        private LaborLedgerPositionObjectGroup positionObjectGroup;
038        private EffortCertificationReportDefinition effortCertificationReportDefinition;
039        private SystemOptions options;
040    
041        /**
042         * Default constructor.
043         */
044        public EffortCertificationReportPosition() {
045            super();
046        }
047    
048        /**
049         * Gets the universityFiscalYear attribute.
050         * 
051         * @return Returns the universityFiscalYear.
052         */
053        public Integer getUniversityFiscalYear() {
054            return universityFiscalYear;
055        }
056    
057        /**
058         * Sets the universityFiscalYear attribute value.
059         * 
060         * @param universityFiscalYear The universityFiscalYear to set.
061         */
062        public void setUniversityFiscalYear(Integer universityFiscalYear) {
063            this.universityFiscalYear = universityFiscalYear;
064        }
065    
066        /**
067         * Gets the effortCertificationReportNumber attribute.
068         * 
069         * @return Returns the effortCertificationReportNumber.
070         */
071        public String getEffortCertificationReportNumber() {
072            return effortCertificationReportNumber;
073        }
074    
075        /**
076         * Sets the effortCertificationReportNumber attribute value.
077         * 
078         * @param effortCertificationReportNumber The effortCertificationReportNumber to set.
079         */
080        public void setEffortCertificationReportNumber(String effortCertificationReportNumber) {
081            this.effortCertificationReportNumber = effortCertificationReportNumber;
082        }
083    
084        /**
085         * Gets the effortCertificationReportPositionObjectGroupCode attribute.
086         * 
087         * @return Returns the effortCertificationReportPositionObjectGroupCode.
088         */
089        public String getEffortCertificationReportPositionObjectGroupCode() {
090            return effortCertificationReportPositionObjectGroupCode;
091        }
092    
093        /**
094         * Sets the effortCertificationReportPositionObjectGroupCode attribute value.
095         * 
096         * @param effortCertificationReportPositionObjectGroupCode The effortCertificationReportPositionObjectGroupCode to set.
097         */
098        public void setEffortCertificationReportPositionObjectGroupCode(String effortCertificationReportPositionObjectGroupCode) {
099            this.effortCertificationReportPositionObjectGroupCode = effortCertificationReportPositionObjectGroupCode;
100        }
101    
102        /**
103         * Gets the active attribute.
104         * 
105         * @return Returns the active.
106         */
107        public boolean isActive() {
108            return active;
109        }
110    
111        /**
112         * Sets the active attribute value.
113         * 
114         * @param active The active to set.
115         */
116        public void setActive(boolean active) {
117            this.active = active;
118        }
119    
120        /**
121         * gets the positionObjetGroup
122         * 
123         * @return the positionObjetGroup
124         */
125        public LaborLedgerPositionObjectGroup getPositionObjectGroup() {
126            positionObjectGroup = (LaborLedgerPositionObjectGroup) SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(LaborLedgerPositionObjectGroup.class).retrieveExternalizableBusinessObjectIfNecessary(this, positionObjectGroup, LaborPropertyConstants.POSITION_OBJECT_GROUP);
127    
128            return positionObjectGroup;
129        }
130    
131        /**
132         * Gets the effortCertificationReportDefinition attribute.
133         * 
134         * @return Returns the effortCertificationReportDefinition.
135         */
136        public EffortCertificationReportDefinition getEffortCertificationReportDefinition() {
137            return effortCertificationReportDefinition;
138        }
139    
140        /**
141         * Sets the effortCertificationReportDefinition attribute value.
142         * 
143         * @param effortCertificationReportDefinition The effortCertificationReportDefinition to set.
144         */
145        public void setEffortCertificationReportDefinition(EffortCertificationReportDefinition effortCertificationReportDefinition) {
146            this.effortCertificationReportDefinition = effortCertificationReportDefinition;
147        }
148    
149        /**
150         * Gets the options attribute.
151         * 
152         * @return Returns the options.
153         */
154        public SystemOptions getOptions() {
155            return options;
156        }
157    
158        /**
159         * Sets the options attribute value.
160         * 
161         * @param options The options to set.
162         */
163        public void setOptions(SystemOptions options) {
164            this.options = options;
165        }
166    
167        /**
168         * Sets the positionObjectGroup attribute value.
169         * 
170         * @param positionObjectGroup The positionObjectGroup to set.
171         */
172        public void setPositionObjectGroup(LaborLedgerPositionObjectGroup positionObjectGroup) {
173            this.positionObjectGroup = positionObjectGroup;
174        }
175    
176        /**
177         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
178         */
179        @Override
180        protected LinkedHashMap toStringMapper() {
181            LinkedHashMap m = new LinkedHashMap();
182            if (this.universityFiscalYear != null) {
183                m.put("universityFiscalYear", this.universityFiscalYear.toString());
184            }
185            m.put("effortCertificationReportNumber", this.effortCertificationReportNumber);
186            m.put("effortCertificationReportPositionObjectGroupCode", this.effortCertificationReportPositionObjectGroupCode);
187            return m;
188        }
189    }