View Javadoc

1   /**
2    * Copyright 2005-2013 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 javax.persistence.CascadeType;
19  import javax.persistence.Column;
20  import javax.persistence.Entity;
21  import javax.persistence.FetchType;
22  import javax.persistence.Id;
23  import javax.persistence.JoinColumn;
24  import javax.persistence.ManyToOne;
25  import javax.persistence.Table;
26  
27  import org.kuali.rice.krad.bo.PersistableBusinessObjectExtensionBase;
28  import org.kuali.rice.krad.data.provider.annotation.ExtensionFor;
29  
30  @Entity
31  @Table(name="TRV_ACCT_EXT")
32  @ExtensionFor(Account.class)
33  public class AccountExtension extends PersistableBusinessObjectExtensionBase {
34  
35  	@Id
36  	@Column(name="ACCT_NUM")
37      private String number;
38  	@Column(name="ACCT_TYPE")
39      private String accountTypeCode;
40  
41  	@ManyToOne(fetch=FetchType.LAZY,cascade= {CascadeType.DETACH,CascadeType.REFRESH})
42  	@JoinColumn(name="ACCT_TYPE",insertable=false,updatable=false)
43      private AccountType accountType;
44  
45      public String getNumber() {
46          return number;
47      }
48  
49      public void setNumber(String number) {
50          this.number = number;
51      }
52  
53      public String getAccountTypeCode() {
54          return accountTypeCode;
55      }
56  
57      public void setAccountTypeCode(String accountTypeCode) {
58          this.accountTypeCode = accountTypeCode;
59      }
60  
61  	public AccountType getAccountType() {
62  		return accountType;
63  	}
64  
65  	public void setAccountType(AccountType accountType) {
66  		this.accountType = accountType;
67  	}
68  
69  
70  }