001 /* 002 * Copyright 2006-2008 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 */ 016 017 package edu.sampleu.travel.bo; 018 019 import org.kuali.rice.krad.bo.PersistableBusinessObjectExtensionBase; 020 021 import javax.persistence.*; 022 023 @Entity 024 @Table(name="TRV_ACCT_EXT") 025 public class TravelAccountExtension extends PersistableBusinessObjectExtensionBase { 026 private static final long serialVersionUID = -520222959801026298L; 027 028 @Id 029 @Column(name="acct_num") 030 private String number; 031 032 @Column(name="acct_type") 033 private String accountTypeCode; 034 035 @OneToOne(fetch=FetchType.EAGER) 036 @JoinColumn(name="acct_type", insertable=false, updatable=false) 037 private TravelAccountType accountType; 038 039 public String getNumber() { 040 return number; 041 } 042 043 public void setNumber(String number) { 044 this.number = number; 045 } 046 047 public String getAccountTypeCode() { 048 return accountTypeCode; 049 } 050 051 public void setAccountTypeCode(String accountTypeCode) { 052 this.accountTypeCode = accountTypeCode; 053 } 054 055 public TravelAccountType getAccountType() { 056 return accountType; 057 } 058 059 public void setAccountType(TravelAccountType accountType) { 060 this.accountType = accountType; 061 } 062 063 064 }