View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.student.r2.lum.lu.entity;
17   
18  import java.util.List;
19  
20  import javax.persistence.CascadeType;
21  import javax.persistence.Entity;
22  import javax.persistence.JoinColumn;
23  import javax.persistence.JoinTable;
24  import javax.persistence.ManyToMany;
25  import javax.persistence.OneToMany;
26  import javax.persistence.Table;
27  
28  import org.kuali.student.r1.common.entity.AttributeOwner;
29  import org.kuali.student.r1.common.entity.BaseEntity;
30  
31  @Entity
32  @Table(name = "KSLU_CLU_ACCT")
33  public class CluAccounting extends BaseEntity implements AttributeOwner<CluAccountingAttribute> {
34      
35  	@OneToMany(cascade = CascadeType.ALL, mappedBy = "owner")
36      private List<CluAccountingAttribute> attributes;
37  
38  	@ManyToMany(cascade=CascadeType.ALL)
39  	@JoinTable(name = "KSLU_CLU_ACCT_JN_AFFIL_ORG", joinColumns = @JoinColumn(name = "CLU_ACCT_ID"), inverseJoinColumns = @JoinColumn(name = "AFFIL_ORG_ID"))
40  	private List<AffiliatedOrg> affiliatedOrgs;
41  	
42      public List<CluAccountingAttribute> getAttributes() {
43          return attributes;
44      }
45  
46      public void setAttributes(List<CluAccountingAttribute> attributes) {
47          this.attributes = attributes;
48      }
49      
50  	public List<AffiliatedOrg> getAffiliatedOrgs() {
51  		return this.affiliatedOrgs;
52  	}
53  
54  	public void setAffiliatedOrgs(List<AffiliatedOrg> affiliatedOrgs) {
55  		this.affiliatedOrgs = affiliatedOrgs;
56  	}        
57  }