001/** 002 * Copyright 2005-2014 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package edu.sampleu.travel.dataobject; 017 018import org.kuali.rice.core.api.mo.common.active.MutableInactivatable; 019import org.kuali.rice.krad.bo.DataObjectBase; 020import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter; 021import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator; 022import org.kuali.rice.krad.data.provider.annotation.Description; 023import org.kuali.rice.krad.data.provider.annotation.Label; 024import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViewType; 025import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViews; 026import org.kuali.rice.krad.data.provider.annotation.UifValidCharactersConstraintBeanName; 027 028import javax.persistence.Column; 029import javax.persistence.Entity; 030import javax.persistence.GeneratedValue; 031import javax.persistence.Id; 032import javax.persistence.Table; 033import java.io.Serializable; 034 035/** 036 * This class is used for managing travel companies used 037 * 038 * @author Kuali Rice Team (rice.collab@kuali.org) 039 */ 040@Entity 041@Table(name = "TRVL_CO_T") 042@UifAutoCreateViews({UifAutoCreateViewType.INQUIRY, UifAutoCreateViewType.LOOKUP}) 043public class TravelCompany extends DataObjectBase implements MutableInactivatable, Serializable { 044 045 private static final long serialVersionUID = 6853317217732768445L; 046 047 @Id @Column(name = "CO_ID", length = 40) 048 @GeneratedValue(generator = "TRVL_CO_ID_S") 049 @PortableSequenceGenerator(name = "TRVL_CO_ID_S") 050 @Label("Id") 051 @Description("Unique identifier for company") 052 @UifValidCharactersConstraintBeanName("AlphaNumericPatternConstraint") 053 private String travelCompanyId; 054 055 @Column(name = "CO_NM", length = 40) 056 @Label("Company Name") 057 @Description("Company Name") 058 private String travelCompanyName; 059 060 @Column(name = "ACTV_IND", nullable = false, length = 1) 061 @javax.persistence.Convert(converter = BooleanYNConverter.class) 062 @Label("Active") 063 @Description("Whether active or inactive") 064 private boolean active = Boolean.TRUE; 065 066 public String getTravelCompanyId() { 067 return travelCompanyId; 068 } 069 070 public void setTravelCompanyId(String travelCompanyId) { 071 this.travelCompanyId = travelCompanyId; 072 } 073 074 public String getTravelCompanyName() { 075 return travelCompanyName; 076 } 077 078 public void setTravelCompanyName(String travelCompanyName) { 079 this.travelCompanyName = travelCompanyName; 080 } 081 082 public boolean isActive() { 083 return active; 084 } 085 086 public void setActive(boolean active) { 087 this.active = active; 088 } 089}