View Javadoc
1   /**
2    * Copyright 2005-2014 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.Description;
23  import org.kuali.rice.krad.data.provider.annotation.Label;
24  import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViewType;
25  import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViews;
26  import org.kuali.rice.krad.data.provider.annotation.UifValidCharactersConstraintBeanName;
27  
28  import javax.persistence.Column;
29  import javax.persistence.Entity;
30  import javax.persistence.GeneratedValue;
31  import javax.persistence.Id;
32  import javax.persistence.Table;
33  import java.io.Serializable;
34  
35  /**
36   * This class is used for managing travel companies used
37   *
38   * @author Kuali Rice Team (rice.collab@kuali.org)
39   */
40  @Entity
41  @Table(name = "TRVL_CO_T")
42  @UifAutoCreateViews({UifAutoCreateViewType.INQUIRY, UifAutoCreateViewType.LOOKUP})
43  public class TravelCompany extends DataObjectBase implements MutableInactivatable, Serializable {
44  
45      private static final long serialVersionUID = 6853317217732768445L;
46  
47      @Id @Column(name = "CO_ID", length = 40)
48      @GeneratedValue(generator = "TRVL_CO_ID_S")
49      @PortableSequenceGenerator(name = "TRVL_CO_ID_S")
50      @Label("Id")
51      @Description("Unique identifier for company")
52      @UifValidCharactersConstraintBeanName("AlphaNumericPatternConstraint")
53      private String travelCompanyId;
54  
55      @Column(name = "CO_NM", length = 40)
56      @Label("Company Name")
57      @Description("Company Name")
58      private String travelCompanyName;
59  
60      @Column(name = "ACTV_IND", nullable = false, length = 1)
61      @javax.persistence.Convert(converter = BooleanYNConverter.class)
62      @Label("Active")
63      @Description("Whether active or inactive")
64      private boolean active = Boolean.TRUE;
65  
66      public String getTravelCompanyId() {
67          return travelCompanyId;
68      }
69  
70      public void setTravelCompanyId(String travelCompanyId) {
71          this.travelCompanyId = travelCompanyId;
72      }
73  
74      public String getTravelCompanyName() {
75          return travelCompanyName;
76      }
77  
78      public void setTravelCompanyName(String travelCompanyName) {
79          this.travelCompanyName = travelCompanyName;
80      }
81  
82      public boolean isActive() {
83          return active;
84      }
85  
86      public void setActive(boolean active) {
87          this.active = active;
88      }
89  }