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 org.kuali.rice.legacy;
17  
18  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
19  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
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   * Travel Company class used for Legacy KNS/OJB testing and
37   * testing of a BO that is mapped to both OJB and JPA.
38   *
39   * @author Kuali Rice Team (rice.collab@kuali.org)
40   */
41  @Entity
42  @Table(name = "TRVL_CO_T")
43  @UifAutoCreateViews({UifAutoCreateViewType.INQUIRY, UifAutoCreateViewType.LOOKUP})
44  public class LegacyTravelCompany extends PersistableBusinessObjectBase implements MutableInactivatable, Serializable {
45  
46      private static final long serialVersionUID = 6853317217732768445L;
47  
48      @Id @Column(name = "CO_ID", length = 40)
49      @GeneratedValue(generator = "TRVL_CO_ID_S")
50      @PortableSequenceGenerator(name = "TRVL_CO_ID_S")
51      @Label("Id")
52      @Description("Unique identifier for company")
53      @UifValidCharactersConstraintBeanName("AlphaNumericPatternConstraint")
54      private String travelCompanyId;
55  
56      @Column(name = "CO_NM", length = 40)
57      @Label("Company Name")
58      @Description("Company Name")
59      private String travelCompanyName;
60  
61      @Column(name = "ACTV_IND", nullable = false, length = 1)
62      @javax.persistence.Convert(converter = BooleanYNConverter.class)
63      @Label("Active")
64      @Description("Whether active or inactive")
65      private boolean active = Boolean.TRUE;
66  
67      public String getTravelCompanyId() {
68          return travelCompanyId;
69      }
70  
71      public void setTravelCompanyId(String travelCompanyId) {
72          this.travelCompanyId = travelCompanyId;
73      }
74  
75      public String getTravelCompanyName() {
76          return travelCompanyName;
77      }
78  
79      public void setTravelCompanyName(String travelCompanyName) {
80          this.travelCompanyName = travelCompanyName;
81      }
82  
83      public boolean isActive() {
84          return active;
85      }
86  
87      public void setActive(boolean active) {
88          this.active = active;
89      }
90  }