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 org.kuali.rice.krad.test.document.bo; 017 018import org.kuali.rice.krad.bo.DataObjectBase; 019import org.kuali.rice.krad.data.provider.annotation.ExtensionFor; 020 021import javax.persistence.Column; 022import javax.persistence.Entity; 023import javax.persistence.FetchType; 024import javax.persistence.Id; 025import javax.persistence.JoinColumn; 026import javax.persistence.ManyToOne; 027import javax.persistence.OneToOne; 028import javax.persistence.Table; 029 030@Entity 031@Table(name = "TRV_ACCT_EXT") 032@ExtensionFor(SimpleAccount.class) 033public class SimpleAccountExtension extends DataObjectBase { 034 035 private static final long serialVersionUID = -4862497845036765764L; 036 037 @Id 038 @OneToOne 039 @JoinColumn(name = "ACCT_NUM") 040 private SimpleAccount account; 041 042 @Column(name = "ACCT_TYPE") 043 private String accountTypeCode; 044 045 @ManyToOne(fetch = FetchType.LAZY) 046 @JoinColumn(name = "ACCT_TYPE", insertable=false, updatable=false) 047 private AccountType accountType; 048 049 public SimpleAccount getAccount() { 050 return account; 051 } 052 053 public void setAccount(SimpleAccount account) { 054 this.account = account; 055 } 056 057 public String getAccountTypeCode() { 058 return accountTypeCode; 059 } 060 061 public void setAccountTypeCode(String accountTypeCode) { 062 this.accountTypeCode = accountTypeCode; 063 } 064 065 public AccountType getAccountType() { 066 return accountType; 067 } 068 069 public void setAccountType(AccountType accountType) { 070 this.accountType = accountType; 071 } 072 073}