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.cg.businessobject;
018    
019    import java.util.LinkedHashMap;
020    
021    import org.kuali.rice.kns.bo.Inactivateable;
022    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
023    
024    /**
025     * Instances of this class represent the various statuses an Award can be in.
026     */
027    public class AwardStatus extends PersistableBusinessObjectBase implements Inactivateable {
028    
029        private String awardStatusCode;
030        private String awardStatusDescription;
031        private boolean active;
032    
033        /**
034         * Default constructor.
035         */
036        public AwardStatus() {
037        }
038    
039        /**
040         * Gets the awardStatusCode attribute.
041         * 
042         * @return Returns the awardStatusCode
043         */
044        public String getAwardStatusCode() {
045            return awardStatusCode;
046        }
047    
048    
049        /**
050         * Sets the awardStatusCode attribute.
051         * 
052         * @param awardStatusCode The awardStatusCode to set.
053         */
054        public void setAwardStatusCode(String awardStatusCode) {
055            this.awardStatusCode = awardStatusCode;
056        }
057    
058    
059        /**
060         * This method is a dummy getter that simply returns the same value as getAwardStatusCode(). This method was needed so we could
061         * add an attribute reference to the DD with a different name than awardStatusCode. This allowed us to override the input
062         * behavior and define two different methods of input based on what type of page we're displaying.
063         * 
064         * @return Returns the awardStatusCode
065         */
066        public String getAwardStatusCodeDropDown() {
067            return awardStatusCode;
068        }
069    
070        /**
071         * @param awardStatusCode
072         * @deprecated Do not use this method, it is only here for DD mapping purposes and has no defined functionality. See KULCG-281
073         *             for further details.
074         */
075        public void setAwardStatusCodeDropDown(String awardStatusCode) {
076            this.awardStatusCode = awardStatusCode;
077        }
078    
079        /**
080         * Gets the awardStatusDescription attribute.
081         * 
082         * @return Returns the awardStatusDescription
083         */
084        public String getAwardStatusDescription() {
085            return awardStatusDescription;
086        }
087    
088        /**
089         * Sets the awardStatusDescription attribute.
090         * 
091         * @param awardStatusDescription The awardStatusDescription to set.
092         */
093        public void setAwardStatusDescription(String awardStatusDescription) {
094            this.awardStatusDescription = awardStatusDescription;
095        }
096    
097        /**
098         * Gets the active attribute.
099         * 
100         * @return Returns the active.
101         */
102        public boolean isActive() {
103            return active;
104        }
105    
106        /**
107         * Sets the active attribute value.
108         * 
109         * @param active The active to set.
110         */
111        public void setActive(boolean active) {
112            this.active = active;
113        }
114    
115        /**
116         * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
117         */
118        @SuppressWarnings("unchecked")
119        @Override
120        protected LinkedHashMap toStringMapper() {
121            LinkedHashMap m = new LinkedHashMap();
122            m.put("awardStatusCode", this.awardStatusCode);
123            return m;
124        }
125    
126    }