Clover Coverage Report - KS LUM 1.2.1-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Nov 2 2011 05:59:10 EST
../../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
26   210   26   1
0   139   1   26
26     1  
1    
 
  CluSet       Line # 48 26 0% 26 2 96.2% 0.96153843
 
  (78)
 
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.ArrayList;
19    import java.util.Date;
20    import java.util.List;
21   
22    import javax.persistence.CascadeType;
23    import javax.persistence.Column;
24    import javax.persistence.Entity;
25    import javax.persistence.JoinColumn;
26    import javax.persistence.JoinTable;
27    import javax.persistence.ManyToMany;
28    import javax.persistence.ManyToOne;
29    import javax.persistence.NamedQueries;
30    import javax.persistence.NamedQuery;
31    import javax.persistence.OneToMany;
32    import javax.persistence.OneToOne;
33    import javax.persistence.Table;
34    import javax.persistence.Temporal;
35    import javax.persistence.TemporalType;
36   
37    import org.kuali.student.common.entity.AttributeOwner;
38    import org.kuali.student.common.entity.MetaEntity;
39   
40    @Entity
41    @Table(name = "KSLU_CLU_SET")
42    @NamedQueries( {
43    @NamedQuery(name = "CluSet.getCluSetInfoByIdList", query = "SELECT c FROM CluSet c WHERE c.id IN (:cluSetIdList)"),
44    @NamedQuery(name = "CluSet.isCluInCluSet", query = "SELECT COUNT(cluSet) FROM CluSet cluSet JOIN cluSet.cluVerIndIds cluVerIndIds WHERE cluSet.id = :cluSetId AND cluVerIndIds.cluVersionIndId = :cluId "),
45    @NamedQuery(name = "CluSet.findCluSetsByCluVersionIndIds", query = "SELECT j.cluSet FROM CluSetJoinVersionIndClu j WHERE j.cluVersionIndId IN (:cluVersionIndIds)"),
46    @NamedQuery(name = "CluSet.findAllDynamicCluSets", query = "SELECT cluSet FROM CluSet cluSet WHERE cluSet.membershipQuery IS NULL")
47    })
 
48    public class CluSet extends MetaEntity implements AttributeOwner<CluSetAttribute> {
49   
50    @Column(name = "NAME")
51    private String name;
52   
53    @ManyToOne(cascade=CascadeType.ALL)
54    @JoinColumn(name = "RT_DESCR_ID")
55    private LuRichText descr;
56   
57    @Temporal(TemporalType.TIMESTAMP)
58    @Column(name = "EFF_DT")
59    private Date effectiveDate;
60   
61    @Temporal(TemporalType.TIMESTAMP)
62    @Column(name = "EXPIR_DT")
63    private Date expirationDate;
64   
65    @ManyToMany
66    @JoinTable(name = "KSLU_CLU_SET_JN_CLU_SET", joinColumns = @JoinColumn(name = "CLU_SET_PARENT_ID"), inverseJoinColumns = @JoinColumn(name = "CLU_SET_CHILD_ID"))
67    private List<CluSet> cluSets = new ArrayList<CluSet>();
68   
69    // @ManyToMany
70    // @JoinTable(name = "KSLU_CLU_SET_JN_CLU", joinColumns = @JoinColumn(name = "CLU_SET_ID"), inverseJoinColumns = @JoinColumn(name = "CLU_ID"))
71    // private List<Clu> clus = new ArrayList<Clu>();
72   
73    @OneToMany(mappedBy="cluSet",cascade=CascadeType.ALL)
74    private List<CluSetJoinVersionIndClu> cluVerIndIds = new ArrayList<CluSetJoinVersionIndClu>();
75   
76    @OneToMany(cascade = CascadeType.ALL, mappedBy = "owner")
77    private List<CluSetAttribute> attributes = new ArrayList<CluSetAttribute>();
78   
79    @Column(name="TYPE")
80    private String type;
81   
82    @Column(name = "ST")
83    private String state;
84   
85    @Column(name = "ADMIN_ORG_ID")
86    private String adminOrg;
87   
88    @OneToOne(cascade=CascadeType.ALL)
89    @JoinColumn(name="MEM_QUERY_ID")
90    private MembershipQuery membershipQuery;
91   
92    @Column(name = "REUSABLE")
93    private Boolean isReusable;
94   
95    @Column(name = "REFERENCEABLE")
96    private Boolean isReferenceable;
97   
98    // public List<Clu> getClus() {
99    // return clus;
100    // }
101    //
102    // public void setClus(List<Clu> clus) {
103    // this.clus = clus;
104    // }
105   
 
106  174 toggle public String getName() {
107  174 return name;
108    }
109   
 
110  45 toggle public void setName(String name) {
111  45 this.name = name;
112    }
113   
 
114  174 toggle public LuRichText getDescr() {
115  174 return descr;
116    }
117   
 
118  45 toggle public void setDescr(LuRichText descr) {
119  45 this.descr = descr;
120    }
121   
 
122  174 toggle public Date getEffectiveDate() {
123  174 return effectiveDate;
124    }
125   
 
126  45 toggle public void setEffectiveDate(Date effectiveDate) {
127  45 this.effectiveDate = effectiveDate;
128    }
129   
 
130  174 toggle public Date getExpirationDate() {
131  174 return expirationDate;
132    }
133   
 
134  45 toggle public void setExpirationDate(Date expirationDate) {
135  45 this.expirationDate = expirationDate;
136    }
137   
 
138  792 toggle public List<CluSet> getCluSets() {
139  792 return cluSets;
140    }
141   
 
142  12 toggle public void setCluSets(List<CluSet> cluSets) {
143  12 this.cluSets = cluSets;
144    }
145   
 
146  309 toggle public List<CluSetAttribute> getAttributes() {
147  309 return attributes;
148    }
149   
 
150  45 toggle public void setAttributes(List<CluSetAttribute> attributes) {
151  45 this.attributes = attributes;
152    }
153   
 
154  184 toggle public String getType() {
155  184 return type;
156    }
157   
 
158  81 toggle public void setType(String type) {
159  81 this.type = type;
160    }
161   
 
162  174 toggle public String getState() {
163  174 return state;
164    }
165   
 
166  45 toggle public void setState(String state) {
167  45 this.state = state;
168    }
169   
 
170  174 toggle public String getAdminOrg() {
171  174 return adminOrg;
172    }
173   
 
174  45 toggle public void setAdminOrg(String adminOrg) {
175  45 this.adminOrg = adminOrg;
176    }
177   
 
178  181 toggle public MembershipQuery getMembershipQuery() {
179  181 return membershipQuery;
180    }
181   
 
182  46 toggle public void setMembershipQuery(MembershipQuery membershipQuery) {
183  46 this.membershipQuery = membershipQuery;
184    }
185   
 
186  348 toggle public Boolean getIsReusable() {
187  348 return isReusable;
188    }
189   
 
190  45 toggle public void setIsReusable(Boolean isReusable) {
191  45 this.isReusable = isReusable;
192    }
193   
 
194  348 toggle public Boolean getIsReferenceable() {
195  348 return isReferenceable;
196    }
197   
 
198  45 toggle public void setIsReferenceable(Boolean isReferenceable) {
199  45 this.isReferenceable = isReferenceable;
200    }
201   
 
202  415 toggle public List<CluSetJoinVersionIndClu> getCluVerIndIds() {
203  415 return cluVerIndIds;
204    }
205   
 
206  0 toggle public void setCluVerIndIds(List<CluSetJoinVersionIndClu> cluVerIndIds) {
207  0 this.cluVerIndIds = cluVerIndIds;
208    }
209   
210    }