View Javadoc
1   /*
2    * Copyright 2006-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.jpa.PortableSequenceGenerator;
20  
21  import javax.persistence.CascadeType;
22  import javax.persistence.Column;
23  import javax.persistence.Entity;
24  import javax.persistence.GeneratedValue;
25  import javax.persistence.Id;
26  import javax.persistence.OneToMany;
27  import javax.persistence.Table;
28  import java.util.List;
29  
30  /**
31   * FiscalOfficer
32   */
33  @Entity
34  @Table(name = "TRV_ACCT_FO")
35  public class AccountManagerGeneratedPK extends DataObjectBase {
36  	private static final long serialVersionUID = 1555425302284842267L;
37  
38      @Id
39      @GeneratedValue(generator = "TRV_FO_ID_S")
40      @PortableSequenceGenerator(name = "TRV_FO_ID_S")
41      @Column(name = "ACCT_FO_ID")
42      private Long id;
43  
44      @Column(name="ACCT_FO_USER_NAME")
45  	private String userName;
46  
47  	@OneToMany(cascade = CascadeType.ALL, mappedBy = "accountManager")
48  	private List<AccountNonUpdatableFK> accounts;
49  
50      public Long getId() {
51          return id;
52      }
53  
54      public void setId(Long id) {
55          this.id = id;
56      }
57  
58      public String getUserName() {
59          return userName;
60      }
61  
62      public void setUserName(String userName) {
63          this.userName = userName;
64      }
65  
66      public List<AccountNonUpdatableFK> getAccounts() {
67          return accounts;
68      }
69  
70      public void setAccounts(List<AccountNonUpdatableFK> accounts) {
71          this.accounts = accounts;
72      }
73  }