001    /**
002     * Copyright 2005-2013 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.dataobject;
017    
018    import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
019    import org.kuali.rice.krad.bo.DataObjectBase;
020    import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter;
021    import org.kuali.rice.krad.data.jpa.eclipselink.PortableSequenceGenerator;
022    import org.kuali.rice.krad.data.provider.annotation.Description;
023    import org.kuali.rice.krad.data.provider.annotation.Label;
024    import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViewType;
025    import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViews;
026    import org.kuali.rice.krad.data.provider.annotation.UifValidCharactersConstraintBeanName;
027    
028    import javax.persistence.Column;
029    import javax.persistence.Entity;
030    import javax.persistence.GeneratedValue;
031    import javax.persistence.Id;
032    import javax.persistence.Table;
033    import java.io.Serializable;
034    import java.math.BigDecimal;
035    
036    /**
037     * This class provides the mileage rate
038     *
039     * @author Kuali Rice Team (rice.collab@kuali.org)
040     */
041    
042    @Entity
043    @Table(name = "TRVL_MLG_RT_T")
044    @UifAutoCreateViews({UifAutoCreateViewType.INQUIRY, UifAutoCreateViewType.LOOKUP})
045    public class TravelMileageRate extends DataObjectBase implements MutableInactivatable, Serializable {
046    
047        private static final long serialVersionUID = 4525338013753227579L;
048    
049        @Id @Column(name = "MLG_RT_ID", length = 40)
050        @GeneratedValue(generator = "TRVL_MLG_RT_ID_S")
051        @PortableSequenceGenerator(name = "TRVL_MLG_RT_ID_S")
052        @Label("Id")
053       private String mileageRateId;
054    
055        @Column(name = "MLG_RT_CD", length = 40)
056        private String mileageRateCd;
057    
058        @Column(name = "MLG_RT_NM", length = 40)
059        private String mileageRateName;
060    
061        @Column(name = "MLG_RT", length = 10)
062        private BigDecimal mileageRate;
063    
064        @Column(name = "ACTV_IND", nullable = false, length = 1)
065        @javax.persistence.Convert(converter = BooleanYNConverter.class)
066        boolean active = Boolean.TRUE;
067    
068        public String getMileageRateId() {
069            return mileageRateId;
070        }
071    
072        public void setMileageRateId(String mileageRateId) {
073            this.mileageRateId = mileageRateId;
074        }
075    
076        public String getMileageRateCd() {
077            return mileageRateCd;
078        }
079    
080        public void setMileageRateCd(String mileageRateCd) {
081            this.mileageRateCd = mileageRateCd;
082        }
083    
084        public String getMileageRateName() {
085            return mileageRateName;
086        }
087    
088        public void setMileageRateName(String mileageRateName) {
089            this.mileageRateName = mileageRateName;
090        }
091    
092        public BigDecimal getMileageRate() {
093            return mileageRate;
094        }
095    
096        public void setMileageRate(BigDecimal mileageRate) {
097            this.mileageRate = mileageRate;
098        }
099    
100        public boolean isActive() {
101            return active;
102        }
103    
104        public void setActive(boolean active) {
105            this.active = active;
106        }
107    }