Clover Coverage Report - Kuali Student 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 05:03:32 EDT
../../../../../../img/srcFileCovDistChart0.png 2% of files have more coverage
16   143   16   1
0   100   1   16
16     1  
1    
 
  CluCluRelation       Line # 46 16 0% 16 32 0% 0.0
 
No Tests
 
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_CLUCLU_RELTN")
38    @NamedQueries({
39    @NamedQuery(name="CluCluRelation.getCluCluRelation", query="SELECT rel FROM CluCluRelation rel WHERE rel.clu.id = :cluId or rel.relatedClu.id = :cluId"),
40    @NamedQuery(name="CluCluRelation.getRelatedCluIdsByCluId", query="SELECT rel.relatedClu.id FROM CluCluRelation rel WHERE rel.clu.id = :cluId AND rel.luLuRelationType.id = :luLuRelationTypeId"),
41    @NamedQuery(name="CluCluRelation.getCluIdsByRelatedCluId", query = "SELECT rel.clu.id FROM CluCluRelation rel WHERE rel.relatedClu.id = :relatedCluId AND rel.luLuRelationType.id = :luLuRelationTypeId"),
42    @NamedQuery(name="CluCluRelation.getRelationTypeByCluId", query="SELECT distinct rel.luLuRelationType.id FROM CluCluRelation rel WHERE rel.clu.id = :cluId AND rel.relatedClu.id = :relatedCluId"),
43    @NamedQuery(name="CluCluRelation.getRelatedClusByCluId", query="SELECT rel.relatedClu FROM CluCluRelation rel WHERE rel.clu.id = :cluId AND rel.luLuRelationType.id = :luLuRelationTypeId"),
44    @NamedQuery(name="CluCluRelation.getClusByRelatedCluId", query="SELECT rel.clu FROM CluCluRelation rel WHERE rel.relatedClu.id = :relatedCluId AND rel.luLuRelationType.id = :luLuRelationTypeId")
45    })
 
46    public class CluCluRelation extends MetaEntity implements
47    AttributeOwner<CluCluRelationAttribute> {
48   
49    @ManyToOne
50    @JoinColumn(name="CLU_ID")
51    private Clu clu;
52   
53    @ManyToOne
54    @JoinColumn(name="RELATED_CLU_ID")
55    private Clu relatedClu;
56   
57    @ManyToOne
58    @JoinColumn(name="LU_RELTN_TYPE_ID")
59    private LuLuRelationType luLuRelationType;
60   
61    @Column(name = "CLU_RELTN_REQ")
62    private boolean cluRelationRequired;
63   
64    @Temporal(TemporalType.TIMESTAMP)
65    @Column(name = "EFF_DT")
66    private Date effectiveDate;
67   
68    @Temporal(TemporalType.TIMESTAMP)
69    @Column(name = "EXPIR_DT")
70    private Date expirationDate;
71   
72    @Column(name = "ST")
73    private String state;
74   
75    @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner")
76    private List<CluCluRelationAttribute> attributes;
77   
 
78  0 toggle public Clu getClu() {
79  0 return clu;
80    }
81   
 
82  0 toggle public void setClu(Clu clu) {
83  0 this.clu = clu;
84    }
85   
 
86  0 toggle public Clu getRelatedClu() {
87  0 return relatedClu;
88    }
89   
 
90  0 toggle public void setRelatedClu(Clu relatedClu) {
91  0 this.relatedClu = relatedClu;
92    }
93   
 
94  0 toggle public LuLuRelationType getLuLuRelationType() {
95  0 return luLuRelationType;
96    }
97   
 
98  0 toggle public void setLuLuRelationType(LuLuRelationType luLuRelationType) {
99  0 this.luLuRelationType = luLuRelationType;
100    }
101   
 
102  0 toggle public boolean isCluRelationRequired() {
103  0 return cluRelationRequired;
104    }
105   
 
106  0 toggle public void setCluRelationRequired(boolean cluRelationRequired) {
107  0 this.cluRelationRequired = cluRelationRequired;
108    }
109   
 
110  0 toggle public Date getEffectiveDate() {
111  0 return effectiveDate;
112    }
113   
 
114  0 toggle public void setEffectiveDate(Date effectiveDate) {
115  0 this.effectiveDate = effectiveDate;
116    }
117   
 
118  0 toggle public Date getExpirationDate() {
119  0 return expirationDate;
120    }
121   
 
122  0 toggle public void setExpirationDate(Date expirationDate) {
123  0 this.expirationDate = expirationDate;
124    }
125   
 
126  0 toggle public String getState() {
127  0 return state;
128    }
129   
 
130  0 toggle public void setState(String state) {
131  0 this.state = state;
132    }
133   
 
134  0 toggle @Override
135    public List<CluCluRelationAttribute> getAttributes() {
136  0 return attributes;
137    }
138   
 
139  0 toggle @Override
140    public void setAttributes(List<CluCluRelationAttribute> attributes) {
141  0 this.attributes = attributes;
142    }
143    }