View Javadoc
1   /**
2    * Copyright 2005-2015 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 @Column(name = "MLG_RT_ID", length = 40)
48      @GeneratedValue(generator = "TRVL_MLG_RT_ID_S")
49      @PortableSequenceGenerator(name = "TRVL_MLG_RT_ID_S")
50      @Label("Id")
51     private String mileageRateId;
52  
53      @Column(name = "MLG_RT_CD", length = 40)
54      private String mileageRateCd;
55  
56      @Column(name = "MLG_RT_NM", length = 40)
57      private String mileageRateName;
58  
59      @Column(name = "MLG_RT", length = 10)
60      private BigDecimal mileageRate;
61  
62      @Column(name = "ACTV_IND", nullable = false, length = 1)
63      @javax.persistence.Convert(converter = BooleanYNConverter.class)
64      boolean active = Boolean.TRUE;
65  
66      public String getMileageRateId() {
67          return mileageRateId;
68      }
69  
70      public void setMileageRateId(String mileageRateId) {
71          this.mileageRateId = mileageRateId;
72      }
73  
74      public String getMileageRateCd() {
75          return mileageRateCd;
76      }
77  
78      public void setMileageRateCd(String mileageRateCd) {
79          this.mileageRateCd = mileageRateCd;
80      }
81  
82      public String getMileageRateName() {
83          return mileageRateName;
84      }
85  
86      public void setMileageRateName(String mileageRateName) {
87          this.mileageRateName = mileageRateName;
88      }
89  
90      public BigDecimal getMileageRate() {
91          return mileageRate;
92      }
93  
94      public void setMileageRate(BigDecimal mileageRate) {
95          this.mileageRate = mileageRate;
96      }
97  
98      public boolean isActive() {
99          return active;
100     }
101 
102     public void setActive(boolean active) {
103         this.active = active;
104     }
105 }