View Javadoc
1   /*
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.test.document.bo;
17  
18  import org.kuali.rice.krad.bo.DataObjectBase;
19  import org.kuali.rice.krad.data.provider.annotation.ExtensionFor;
20  
21  import javax.persistence.Column;
22  import javax.persistence.Entity;
23  import javax.persistence.FetchType;
24  import javax.persistence.Id;
25  import javax.persistence.JoinColumn;
26  import javax.persistence.ManyToOne;
27  import javax.persistence.OneToOne;
28  import javax.persistence.Table;
29  
30  @Entity
31  @Table(name = "TRV_ACCT_EXT")
32  @ExtensionFor(SimpleAccount.class)
33  public class SimpleAccountExtension extends DataObjectBase {
34  
35      private static final long serialVersionUID = -4862497845036765764L;
36  
37      @Id
38      @OneToOne
39  	@JoinColumn(name = "ACCT_NUM")
40      private SimpleAccount account;
41  
42  	@Column(name = "ACCT_TYPE")
43      private String accountTypeCode;
44  	
45  	@ManyToOne(fetch = FetchType.LAZY)
46  	@JoinColumn(name = "ACCT_TYPE", insertable=false, updatable=false)
47      private AccountType accountType;
48  
49      public SimpleAccount getAccount() {
50          return account;
51      }
52  
53      public void setAccount(SimpleAccount account) {
54          this.account = account;
55      }
56  
57      public String getAccountTypeCode() {
58          return accountTypeCode;
59      }
60  
61      public void setAccountTypeCode(String accountTypeCode) {
62          this.accountTypeCode = accountTypeCode;
63      }
64  
65  	public AccountType getAccountType() {
66  		return accountType;
67  	}
68  
69  	public void setAccountType(AccountType accountType) {
70  		this.accountType = accountType;
71  	}
72   
73  }