001    /**
002     * Copyright 2005-2012 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 edu.sampleu.travel.approval.dataobject;
017    
018    import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
019    import javax.persistence.Column;
020    import javax.persistence.Entity;
021    import javax.persistence.Id;
022    import javax.persistence.Table;
023    import java.util.LinkedHashMap;
024    
025    @Entity
026    @Table(name="TRVL_TRANS_MD_T")
027    public class TransportationMode extends PersistableBusinessObjectBase {
028        private String code;
029    
030        private String name;
031    
032        private Boolean active = Boolean.TRUE;
033    
034        @Id
035        @Column(name="CODE",length=3, nullable=false)
036        public String getCode() {
037            return code;
038        }
039    
040        public void setCode(String code) {
041            this.code = code;
042        }
043    
044        @Column(name="NAME",length=40,nullable=false)
045        public String getName() {
046            return name;
047        }
048    
049        public void setName(String name) {
050            this.name = name;
051        }
052    
053        @Column(name="ACTV_IND",nullable=false,length=1)
054        public Boolean getActive() {
055            return active;
056        }
057    
058        public void setActive(Boolean active) {
059            this.active = active;
060        }
061    
062        protected LinkedHashMap toStringMapper() {
063            LinkedHashMap map = new LinkedHashMap();
064            map.put("code", code);
065            map.put("name", name);
066    
067            return map;
068        }
069    }