View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package edu.sampleu.travel.dataobject;
17  
18  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
19  import org.kuali.rice.krad.bo.DataObjectBase;
20  import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter;
21  import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
22  import org.kuali.rice.krad.data.provider.annotation.Label;
23  import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViewType;
24  import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViews;
25  
26  import javax.persistence.Column;
27  import javax.persistence.Entity;
28  import javax.persistence.GeneratedValue;
29  import javax.persistence.Id;
30  import javax.persistence.Table;
31  import java.io.Serializable;
32  import java.math.BigDecimal;
33  
34  /**
35   * This class provides the mileage rate
36   *
37   * @author Kuali Rice Team (rice.collab@kuali.org)
38   */
39  
40  @Entity
41  @Table(name = "TRVL_MLG_RT_T")
42  @UifAutoCreateViews({UifAutoCreateViewType.INQUIRY, UifAutoCreateViewType.LOOKUP})
43  public class TravelMileageRate extends DataObjectBase implements MutableInactivatable, Serializable {
44  
45      private static final long serialVersionUID = 4525338013753227579L;
46  
47      @Id
48      @Column(name = "MLG_RT_ID", length = 40)
49      @GeneratedValue(generator = "TRVL_MLG_RT_ID_S")
50      @PortableSequenceGenerator(name = "TRVL_MLG_RT_ID_S")
51      @Label("Id")
52     private String mileageRateId;
53  
54      @Column(name = "MLG_RT_CD", length = 40)
55      private String mileageRateCd;
56  
57      @Column(name = "MLG_RT_NM", length = 40)
58      private String mileageRateName;
59  
60      @Column(name = "MLG_RT", length = 10)
61      private BigDecimal mileageRate;
62  
63      @Column(name = "ACTV_IND", nullable = false, length = 1)
64      @javax.persistence.Convert(converter = BooleanYNConverter.class)
65      boolean active = Boolean.TRUE;
66  
67      public String getMileageRateId() {
68          return mileageRateId;
69      }
70  
71      public void setMileageRateId(String mileageRateId) {
72          this.mileageRateId = mileageRateId;
73      }
74  
75      public String getMileageRateCd() {
76          return mileageRateCd;
77      }
78  
79      public void setMileageRateCd(String mileageRateCd) {
80          this.mileageRateCd = mileageRateCd;
81      }
82  
83      public String getMileageRateName() {
84          return mileageRateName;
85      }
86  
87      public void setMileageRateName(String mileageRateName) {
88          this.mileageRateName = mileageRateName;
89      }
90  
91      public BigDecimal getMileageRate() {
92          return mileageRate;
93      }
94  
95      public void setMileageRate(BigDecimal mileageRate) {
96          this.mileageRate = mileageRate;
97      }
98  
99      public boolean isActive() {
100         return active;
101     }
102 
103     public void setActive(boolean active) {
104         this.active = active;
105     }
106 }