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