View Javadoc

1   /**
2    * Copyright 2005-2012 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.approval.dataobject;
17  
18  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
19  import javax.persistence.Column;
20  import javax.persistence.Entity;
21  import javax.persistence.Id;
22  import javax.persistence.Table;
23  import java.util.LinkedHashMap;
24  
25  @Entity
26  @Table(name="TRVL_TRANS_MD_T")
27  public class TransportationMode extends PersistableBusinessObjectBase {
28      private String code;
29  
30      private String name;
31  
32      private Boolean active = Boolean.TRUE;
33  
34      @Id
35      @Column(name="CODE",length=3, nullable=false)
36      public String getCode() {
37          return code;
38      }
39  
40      public void setCode(String code) {
41          this.code = code;
42      }
43  
44      @Column(name="NAME",length=40,nullable=false)
45      public String getName() {
46          return name;
47      }
48  
49      public void setName(String name) {
50          this.name = name;
51      }
52  
53      @Column(name="ACTV_IND",nullable=false,length=1)
54      public Boolean getActive() {
55          return active;
56      }
57  
58      public void setActive(Boolean active) {
59          this.active = active;
60      }
61  
62      protected LinkedHashMap toStringMapper() {
63          LinkedHashMap map = new LinkedHashMap();
64          map.put("code", code);
65          map.put("name", name);
66  
67          return map;
68      }
69  }