Clover Coverage Report - Kuali Student 1.2.1-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Nov 2 2011 04:03:58 EST
../../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
14   130   14   1
0   90   1   14
14     1  
1    
 
  LuiLuiRelation       Line # 46 14 0% 14 0 100% 1.0
 
  (1)
 
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.lum.lu.entity;
17   
18    import java.util.Date;
19    import java.util.List;
20   
21    import javax.persistence.CascadeType;
22    import javax.persistence.Column;
23    import javax.persistence.Entity;
24    import javax.persistence.JoinColumn;
25    import javax.persistence.ManyToOne;
26    import javax.persistence.NamedQueries;
27    import javax.persistence.NamedQuery;
28    import javax.persistence.OneToMany;
29    import javax.persistence.Table;
30    import javax.persistence.Temporal;
31    import javax.persistence.TemporalType;
32   
33    import org.kuali.student.common.entity.AttributeOwner;
34    import org.kuali.student.common.entity.MetaEntity;
35   
36    @Entity
37    @Table(name = "KSLU_LUILUI_RELTN")
38    @NamedQueries( {
39    @NamedQuery(name = "LuiLuiRelation.getLuiLuiRelationsByLuiId", query = "SELECT llr FROM LuiLuiRelation llr WHERE llr.lui.id = :luiId"),
40    @NamedQuery(name = "LuiLuiRelation.getLuiIdsByRelationType", query = "SELECT rel.lui.id FROM LuiLuiRelation rel WHERE rel.relatedLui.id = :luiId AND rel.luLuRelationType.id = :luLuRelationTypeId"),
41    @NamedQuery(name = "LuiLuiRelation.getLuisByRelationType", query = "SELECT rel.lui FROM LuiLuiRelation rel WHERE rel.relatedLui.id = :luiId AND rel.luLuRelationType.id = :luLuRelationTypeId"),
42    @NamedQuery(name = "LuiLuiRelation.getRelatedLuiIdsByLuiId", query = "SELECT rel.relatedLui.id FROM LuiLuiRelation rel WHERE rel.lui.id = :luiId AND rel.luLuRelationType.id = :luLuRelationTypeId"),
43    @NamedQuery(name = "LuiLuiRelation.getRelationTypeByLuiId", query = "SELECT distinct rel.luLuRelationType.id FROM LuiLuiRelation rel WHERE rel.lui.id = :luiId AND rel.relatedLui.id = :relatedLuiId"),
44    @NamedQuery(name = "LuiLuiRelation.getRelatedLuisByLuiId", query = "SELECT rel.relatedLui FROM LuiLuiRelation rel WHERE rel.lui.id = :luiId AND rel.luLuRelationType.id = :luLuRelationTypeId")
45    })
 
46    public class LuiLuiRelation extends MetaEntity implements
47    AttributeOwner<LuiLuiRelationAttribute> {
48   
49    @ManyToOne
50    @JoinColumn(name = "LUI_ID")
51    private Lui lui;
52   
53    @ManyToOne
54    @JoinColumn(name = "RELATED_LUI_ID")
55    private Lui relatedLui;
56   
57    @ManyToOne
58    @JoinColumn(name = "LULU_RELTN_TYPE_ID")
59    private LuLuRelationType luLuRelationType;
60   
61    @Temporal(TemporalType.TIMESTAMP)
62    @Column(name = "EFF_DT")
63    private Date effectiveDate;
64   
65    @Temporal(TemporalType.TIMESTAMP)
66    @Column(name = "EXPIR_DT")
67    private Date expirationDate;
68   
69    @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner")
70    private List<LuiLuiRelationAttribute> attributes;
71   
72    @Column(name = "ST")
73    private String state;
74   
 
75  7 toggle public Lui getLui() {
76  7 return lui;
77    }
78   
 
79  2 toggle public void setLui(Lui lui) {
80  2 this.lui = lui;
81    }
82   
 
83  7 toggle public Lui getRelatedLui() {
84  7 return relatedLui;
85    }
86   
 
87  2 toggle public void setRelatedLui(Lui relatedLui) {
88  2 this.relatedLui = relatedLui;
89    }
90   
 
91  7 toggle public LuLuRelationType getLuLuRelationType() {
92  7 return luLuRelationType;
93    }
94   
 
95  2 toggle public void setLuLuRelationType(LuLuRelationType luLuRelationType) {
96  2 this.luLuRelationType = luLuRelationType;
97    }
98   
 
99  6 toggle public Date getEffectiveDate() {
100  6 return effectiveDate;
101    }
102   
 
103  2 toggle public void setEffectiveDate(Date effectiveDate) {
104  2 this.effectiveDate = effectiveDate;
105    }
106   
 
107  6 toggle public Date getExpirationDate() {
108  6 return expirationDate;
109    }
110   
 
111  2 toggle public void setExpirationDate(Date expirationDate) {
112  2 this.expirationDate = expirationDate;
113    }
114   
 
115  12 toggle public List<LuiLuiRelationAttribute> getAttributes() {
116  12 return attributes;
117    }
118   
 
119  3 toggle public void setAttributes(List<LuiLuiRelationAttribute> attributes) {
120  3 this.attributes = attributes;
121    }
122   
 
123  6 toggle public String getState() {
124  6 return state;
125    }
126   
 
127  2 toggle public void setState(String state) {
128  2 this.state = state;
129    }
130    }