001/**
002 * Copyright 2005-2016 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
048    @Column(name = "CO_ID", length = 40)
049    @GeneratedValue(generator = "TRVL_CO_ID_S")
050    @PortableSequenceGenerator(name = "TRVL_CO_ID_S")
051    @Label("Id")
052    @Description("Unique identifier for company")
053    @UifValidCharactersConstraintBeanName("AlphaNumericPatternConstraint")
054    private String travelCompanyId;
055
056    @Column(name = "CO_NM", length = 40)
057    @Label("Company Name")
058    @Description("Company Name")
059    private String travelCompanyName;
060
061    @Column(name = "ACTV_IND", nullable = false, length = 1)
062    @javax.persistence.Convert(converter = BooleanYNConverter.class)
063    @Label("Active")
064    @Description("Whether active or inactive")
065    private boolean active = Boolean.TRUE;
066
067    public String getTravelCompanyId() {
068        return travelCompanyId;
069    }
070
071    public void setTravelCompanyId(String travelCompanyId) {
072        this.travelCompanyId = travelCompanyId;
073    }
074
075    public String getTravelCompanyName() {
076        return travelCompanyName;
077    }
078
079    public void setTravelCompanyName(String travelCompanyName) {
080        this.travelCompanyName = travelCompanyName;
081    }
082
083    public boolean isActive() {
084        return active;
085    }
086
087    public void setActive(boolean active) {
088        this.active = active;
089    }
090}