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