001/** 002 * Copyright 2005-2017 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 org.kuali.rice.krad.demo.travel.dataobject; 017 018import java.io.Serializable; 019 020import javax.persistence.AttributeOverride; 021import javax.persistence.AttributeOverrides; 022import javax.persistence.Column; 023import javax.persistence.Entity; 024import javax.persistence.Id; 025import javax.persistence.Table; 026import javax.validation.constraints.NotNull; 027 028import org.kuali.rice.krad.bo.KualiCodeBase; 029import org.kuali.rice.krad.data.provider.annotation.Label; 030import org.kuali.rice.krad.data.provider.annotation.ShortLabel; 031import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViewType; 032import org.kuali.rice.krad.data.provider.annotation.UifAutoCreateViews; 033import org.kuali.rice.krad.data.provider.annotation.UifValidCharactersConstraintBeanName; 034 035@Entity 036@Table(name="TRV_ACCT_TYPE") 037@AttributeOverrides({ 038 @AttributeOverride(name="code", 039 column=@Column(name="ACCT_TYPE",insertable=false,updatable=false, length=3)), 040 @AttributeOverride(name="name", 041 column=@Column(name="ACCT_TYPE_NAME", insertable=false,updatable=false, length=40)) 042}) 043@UifAutoCreateViews({UifAutoCreateViewType.LOOKUP}) 044public class TravelAccountType extends KualiCodeBase implements Serializable { 045 private static final long serialVersionUID = 413236253897119667L; 046 047 @Id 048 @Column(name="ACCT_TYPE",length=3) 049 @Label("Travel Account Type Code") 050 @ShortLabel("Code") 051 @UifValidCharactersConstraintBeanName("AnyCharacterPatternConstraint") 052 private String accountTypeCode; 053 054 @Column(name="ACCT_TYPE_NAME",length=40) 055 @Label("Account Type Name") 056 @ShortLabel("Name") 057 @NotNull 058 @UifValidCharactersConstraintBeanName("AnyCharacterPatternConstraint") 059 private String accountTypeName; 060 061 public String getAccountTypeCode() { 062 return accountTypeCode; 063 } 064 065 public void setAccountTypeCode(String accountTypeCode) { 066 this.accountTypeCode = accountTypeCode; 067 } 068 069 public String getAccountTypeName() { 070 return accountTypeName; 071 } 072 073 public void setAccountTypeName(String accountTypeName) { 074 this.accountTypeName = accountTypeName; 075 } 076 077}