Clover Coverage Report - KS LUM Impl 1.2-M6-SNAPSHOT
Coverage timestamp: Sun Sep 11 2011 07:23:28 EDT
../../../../../../../img/srcFileCovDistChart7.png 45% of files have more coverage
247   571   58   5.15
16   494   0.23   48
48     1.21  
1    
 
  LuDaoImpl       Line # 40 247 0% 58 107 65.6% 0.6559486
 
  (117)
 
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.dao.impl;
17   
18    import java.util.Date;
19    import java.util.List;
20   
21    import javax.persistence.EntityManager;
22    import javax.persistence.PersistenceContext;
23    import javax.persistence.Query;
24   
25    import org.kuali.student.common.dao.impl.AbstractSearchableCrudDaoImpl;
26    import org.kuali.student.common.versionmanagement.dto.VersionDisplayInfo;
27    import org.kuali.student.lum.lu.dao.LuDao;
28    import org.kuali.student.lum.lu.entity.Clu;
29    import org.kuali.student.lum.lu.entity.CluCluRelation;
30    import org.kuali.student.lum.lu.entity.CluLoRelation;
31    import org.kuali.student.lum.lu.entity.CluPublication;
32    import org.kuali.student.lum.lu.entity.CluResult;
33    import org.kuali.student.lum.lu.entity.CluResultType;
34    import org.kuali.student.lum.lu.entity.CluSet;
35    import org.kuali.student.lum.lu.entity.Lui;
36    import org.kuali.student.lum.lu.entity.LuiLuiRelation;
37   
38    import edu.emory.mathcs.backport.java.util.Collections;
39   
 
40    public class LuDaoImpl extends AbstractSearchableCrudDaoImpl implements LuDao {
41   
 
42  13 toggle @PersistenceContext(unitName = "Lu")
43    @Override
44    public void setEm(EntityManager em) {
45  13 super.setEm(em);
46    }
47   
 
48  2 toggle @Override
49    public List<Clu> getClusByIdList(List<String> cluIdList) {
50  2 Query query = em.createNamedQuery("Clu.findClusByIdList");
51  2 query.setParameter("idList", cluIdList);
52  2 @SuppressWarnings("unchecked")
53    List<Clu> resultList = query.getResultList();
54  2 return resultList;
55    }
56   
 
57  6 toggle @Override
58    public List<Clu> getClusByLuType(String luTypeKey, String luState) {
59  6 Query query = em.createNamedQuery("Clu.getClusByLuType");
60  6 query.setParameter("luTypeKey", luTypeKey);
61  6 query.setParameter("luState", luState);
62  6 @SuppressWarnings("unchecked")
63    List<Clu> resultList = query.getResultList();
64  6 return resultList;
65    }
66   
 
67  7 toggle @Override
68    public List<CluSet> getCluSetInfoByIdList(List<String> cluSetIdList) {
69  7 Query query = em.createNamedQuery("CluSet.getCluSetInfoByIdList");
70  7 query.setParameter("cluSetIdList", cluSetIdList);
71  7 @SuppressWarnings("unchecked")
72    List<CluSet> resultList = query.getResultList();
73  7 return resultList;
74    }
75   
 
76  2 toggle @Override
77    public List<Lui> getLuisByIdList(List<String> luiIds) {
78  2 Query query = em.createNamedQuery("Lui.getLuisByIdList");
79  2 query.setParameter("luiIdList", luiIds);
80  2 @SuppressWarnings("unchecked")
81    List<Lui> luis = query.getResultList();
82  2 return luis;
83    }
84   
 
85  3 toggle @Override
86    public List<String> getLuiIdsByCluId(String cluId) {
87  3 Query query = em.createNamedQuery("Lui.getLuiIdsByCluId");
88  3 query.setParameter("cluId", cluId);
89  3 @SuppressWarnings("unchecked")
90    List<String> luiIds = query.getResultList();
91  3 return luiIds;
92    }
93   
 
94  3 toggle @Override
95    public List<Lui> getLuisByRelationType(String luiId,
96    String luLuRelationTypeId) {
97  3 Query query = em
98    .createNamedQuery("LuiLuiRelation.getLuisByRelationType");
99  3 query.setParameter("luiId", luiId);
100  3 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
101   
102  3 @SuppressWarnings("unchecked")
103    List<Lui> luis = query.getResultList();
104  3 return luis;
105    }
106   
 
107  2 toggle @Override
108    public List<String> getLuiIdsByRelationType(String relatedLuiId,
109    String luLuRelationTypeId) {
110  2 Query query = em
111    .createNamedQuery("LuiLuiRelation.getLuiIdsByRelationType");
112  2 query.setParameter("luiId", relatedLuiId);
113  2 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
114   
115  2 @SuppressWarnings("unchecked")
116    List<String> luiIds = query.getResultList();
117  2 return luiIds;
118    }
119   
 
120  4 toggle @Override
121    public List<String> getLuiIdsInAtpByCluId(String cluId, String atpKey) {
122  4 Query query = em.createNamedQuery("Lui.getLuiIdsInAtpByCluId");
123  4 query.setParameter("cluId", cluId);
124  4 query.setParameter("atpKey", atpKey);
125  4 @SuppressWarnings("unchecked")
126    List<String> luiIds = query.getResultList();
127  4 return luiIds;
128    }
129   
 
130  4 toggle @Override
131    public Boolean isCluInCluSet(String cluId, String cluSetId) {
132  4 Query query = em.createNamedQuery("CluSet.isCluInCluSet");
133  4 query.setParameter("cluId", cluId);
134  4 query.setParameter("cluSetId", cluSetId);
135  4 Long valid = (Long) query.getSingleResult();
136  4 return valid.intValue() > 0;
137    }
138   
 
139  3 toggle @Override
140    public List<LuiLuiRelation> getLuiLuiRelations(String luiId) {
141  3 Query query = em
142    .createNamedQuery("LuiLuiRelation.getLuiLuiRelationsByLuiId");
143  3 query.setParameter("luiId", luiId);
144  3 @SuppressWarnings("unchecked")
145    List<LuiLuiRelation> luiLuiRelations = query.getResultList();
146  3 return luiLuiRelations;
147    }
148   
 
149  80 toggle @Override
150    public List<CluCluRelation> getCluCluRelationsByClu(String cluId) {
151  80 Query query = em.createNamedQuery("CluCluRelation.getCluCluRelation");
152  80 query.setParameter("cluId", cluId);
153  80 @SuppressWarnings("unchecked")
154    List<CluCluRelation> cluCluRelations = query.getResultList();
155  80 return cluCluRelations;
156    }
157   
 
158  0 toggle @Override
159    public List<String> getCluIdsByLoId(String loId) {
160  0 Query query = em.createNamedQuery("Clu.getCluIdsByLoId");
161  0 query.setParameter("loId", loId);
162  0 @SuppressWarnings("unchecked")
163    List<String> cluIds = query.getResultList();
164  0 return cluIds;
165    }
166   
 
167  85 toggle @Override
168    public List<String> getRelatedCluIdsByCluId(String cluId,
169    String luLuRelationTypeId) {
170  85 Query query = em
171    .createNamedQuery("CluCluRelation.getRelatedCluIdsByCluId");
172  85 query.setParameter("cluId", cluId);
173  85 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
174  85 @SuppressWarnings("unchecked")
175    List<String> relatedCluIds = query.getResultList();
176  85 return relatedCluIds;
177    }
178   
 
179  17 toggle @Override
180    public List<String> getCluIdsByRelatedCluId(String relatedCluId, String luLuRelationTypeId) {
181  17 Query query = em.createNamedQuery("CluCluRelation.getCluIdsByRelatedCluId");
182  17 query.setParameter("relatedCluId", relatedCluId);
183  17 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
184  17 @SuppressWarnings("unchecked")
185    List<String> relatedCluIds = query.getResultList();
186  17 return relatedCluIds;
187    }
188   
 
189  64 toggle @Override
190    public List<Clu> getRelatedClusByCluId(String cluId,
191    String luLuRelationTypeId) {
192  64 Query query = em
193    .createNamedQuery("CluCluRelation.getRelatedClusByCluId");
194  64 query.setParameter("cluId", cluId);
195  64 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
196  64 @SuppressWarnings("unchecked")
197    List<Clu> relatedClus = query.getResultList();
198  64 return relatedClus;
199    }
200   
 
201  0 toggle @Override
202    public List<Clu> getClusByRelatedCluId(String relatedCluId,
203    String luLuRelationTypeId) {
204  0 Query query = em
205    .createNamedQuery("CluCluRelation.getClusByRelatedCluId");
206  0 query.setParameter("relatedCluId", relatedCluId);
207  0 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
208  0 @SuppressWarnings("unchecked")
209    List<Clu> relatedClus = query.getResultList();
210  0 return relatedClus;
211    }
212   
213   
214   
 
215  1 toggle @Override
216    public List<String> getRelatedLuiIdsByLuiId(String luiId,
217    String luLuRelationTypeId) {
218  1 Query query = em
219    .createNamedQuery("LuiLuiRelation.getRelatedLuiIdsByLuiId");
220  1 query.setParameter("luiId", luiId);
221  1 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
222  1 @SuppressWarnings("unchecked")
223    List<String> relatedLuiIds = query.getResultList();
224  1 return relatedLuiIds;
225    }
226   
 
227  1 toggle @Override
228    public List<Lui> getRelatedLuisByLuiId(String luiId,
229    String luLuRelationTypeId) {
230  1 Query query = em
231    .createNamedQuery("LuiLuiRelation.getRelatedLuisByLuiId");
232  1 query.setParameter("luiId", luiId);
233  1 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
234  1 @SuppressWarnings("unchecked")
235    List<Lui> relatedLuis = query.getResultList();
236  1 return relatedLuis;
237    }
238   
 
239  3 toggle @Override
240    public List<Clu> getClusByRelation(String parentCluId,
241    String luLuRelationTypeKey) {
242  3 Query query = em.createNamedQuery("Clu.getClusByRelation");
243  3 query.setParameter("parentCluId", parentCluId);
244  3 query.setParameter("luLuRelationTypeKey", luLuRelationTypeKey);
245  3 @SuppressWarnings("unchecked")
246    List<Clu> resultList = query.getResultList();
247  3 return resultList;
248    }
249   
 
250  0 toggle @Override
251    public List<Clu> getClusByRelationSt(String cluId, String luLuRelationTypeId, List<String> luStateList) {
252  0 Query query = em.createNamedQuery("CluCluRelation.getRelatedClusByCluIdSt");
253  0 query.setParameter("cluId", cluId);
254  0 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
255  0 query.setParameter("luStateList", luStateList);
256  0 @SuppressWarnings("unchecked")
257    List<Clu> resultList = query.getResultList();
258   
259  0 query = em.createNamedQuery("CluCluRelation.getClusByRelatedCluIdSt");
260  0 query.setParameter("relatedCluId", cluId);
261  0 query.setParameter("luLuRelationTypeId", luLuRelationTypeId);
262  0 query.setParameter("luStateList", luStateList);
263  0 List<Clu> resultListRel = query.getResultList();
264  0 if(resultListRel != null)
265  0 for(Clu clu:resultListRel) {
266  0 if (!resultList.contains(clu))
267  0 resultList.add(clu);
268    }
269   
270  0 return resultList;
271    }
272   
 
273  184 toggle @Override
274    public List<CluLoRelation> getCluLoRelationsByClu(String cluId) {
275  184 Query query = em
276    .createNamedQuery("CluLoRelation.getCluLoRelationByClu");
277  184 query.setParameter("cluId", cluId);
278  184 @SuppressWarnings("unchecked")
279    List<CluLoRelation> cluLoRelations = query.getResultList();
280  184 return cluLoRelations;
281    }
282   
 
283  1 toggle @Override
284    public List<CluLoRelation> getCluLoRelationsByLo(String loId) {
285  1 Query query = em
286    .createNamedQuery("CluLoRelation.getCluLoRelationByLo");
287  1 query.setParameter("loId", loId);
288  1 @SuppressWarnings("unchecked")
289    List<CluLoRelation> cluLoRelations = query.getResultList();
290  1 return cluLoRelations;
291    }
292   
 
293  102 toggle @Override
294    public List<CluLoRelation> getCluLoRelationsByCludIdAndLoId(String cluId,
295    String loId) {
296  102 Query query = em.createNamedQuery("CluLoRelation.getCluLoRelation");
297  102 query.setParameter("cluId", cluId);
298  102 query.setParameter("loId", loId);
299   
300  102 @SuppressWarnings("unchecked")
301    List<CluLoRelation> rels = query.getResultList();
302  102 return rels;
303    }
304   
 
305  0 toggle @Override
306    public List<String> getAllowedLuLuRelationTypesForLuType(String luTypeId,
307    String relatedLuTypeId) {
308  0 Query query = em
309    .createNamedQuery("AllowedLuLuRelationType.getAllowedTypesByLuTypes");
310  0 query.setParameter("luTypeId", luTypeId);
311  0 query.setParameter("relatedLuTypeId", relatedLuTypeId);
312  0 @SuppressWarnings("unchecked")
313    List<String> resultList = query.getResultList();
314  0 return resultList;
315    }
316   
 
317  0 toggle @Override
318    public List<String> getAllowedCluLoRelationTypesForLuType(String luTypeId) {
319  0 Query query = em
320    .createNamedQuery("AllowedCluLoRealtionType.getAllowedTypesByLuType");
321  0 query.setParameter("luTypeId", luTypeId);
322  0 @SuppressWarnings("unchecked")
323    List<String> resultList = query.getResultList();
324  0 return resultList;
325    }
326   
 
327  0 toggle @Override
328    public List<String> getAllowedResultUsageTypesForLuType(String luTypeId) {
329  0 Query query = em
330    .createNamedQuery("AllowedResultUsageLuType.getAllowedTypesByLuType");
331  0 query.setParameter("luTypeId", luTypeId);
332  0 @SuppressWarnings("unchecked")
333    List<String> resultList = query.getResultList();
334  0 return resultList;
335    }
336   
 
337  0 toggle @Override
338    public List<String> getAllowedResultComponentTypesForResultUsageType(
339    String resultUsageType) {
340  0 Query query = em
341    .createNamedQuery("AllowedResultComponentUsageType.getAllowedComponentsByUsageType");
342  0 query.setParameter("resultUsageType", resultUsageType);
343  0 @SuppressWarnings("unchecked")
344    List<String> resultList = query.getResultList();
345  0 return resultList;
346    }
347   
 
348  0 toggle @Override
349    public List<CluResultType> getAllowedCluResultTypesForLuType(String luTypeId) {
350  0 Query query = em
351    .createNamedQuery("AllowedCluResultLuType.getAllowedTypesByLuType");
352  0 query.setParameter("luTypeId", luTypeId);
353  0 @SuppressWarnings("unchecked")
354    List<CluResultType> resultList = query.getResultList();
355  0 return resultList;
356    }
357   
 
358  0 toggle @Override
359    public List<String> getCluIdsByResultUsageType(String resultUsageTypeKey) {
360  0 Query query = em
361    .createNamedQuery("CluResult.getCluIdByResultUsageType");
362  0 query.setParameter("resultUsageType", resultUsageTypeKey);
363  0 @SuppressWarnings("unchecked")
364    List<String> resultList = query.getResultList();
365  0 return resultList;
366    }
367   
 
368  0 toggle @Override
369    public List<String> getCluIdsByResultComponentId(String resultComponentId) {
370  0 Query query = em
371    .createNamedQuery("CluResult.getCluIdByResultComponentId");
372  0 query.setParameter("resultComponentId", resultComponentId);
373  0 @SuppressWarnings("unchecked")
374    List<String> resultList = query.getResultList();
375  0 return resultList;
376    }
377   
 
378  0 toggle @Override
379    public List<String> getAllowedLuLuRelationTypesByLuiId(String luiId,
380    String relatedLuiId) {
381  0 Query query = em
382    .createNamedQuery("LuiLuiRelation.getRelationTypeByLuiId");
383  0 query.setParameter("luiId", luiId);
384  0 query.setParameter("relatedLuiId", relatedLuiId);
385  0 @SuppressWarnings("unchecked")
386    List<String> resultList = query.getResultList();
387  0 return resultList;
388    }
389   
 
390  0 toggle @Override
391    public List<String> getAllowedLuLuRelationTypesByCluId(String cluId,
392    String relatedCluId) {
393  0 Query query = em
394    .createNamedQuery("CluCluRelation.getRelationTypeByCluId");
395  0 query.setParameter("cluId", cluId);
396  0 query.setParameter("relatedCluId", relatedCluId);
397  0 @SuppressWarnings("unchecked")
398    List<String> resultList = query.getResultList();
399  0 return resultList;
400    }
401   
 
402  124 toggle @Override
403    public List<CluResult> getCluResultByClu(String cluId) {
404  124 Query query = em
405    .createNamedQuery("CluResult.getCluResultByCluId");
406  124 query.setParameter("cluId", cluId);
407  124 @SuppressWarnings("unchecked")
408    List<CluResult> resultList = query.getResultList();
409  124 return resultList;
410    }
411   
 
412  18 toggle @Override
413    public Clu getLatestCluVersion(String cluVersionIndId) {
414  18 Query query = em.createNamedQuery("Clu.findLatestClu");
415  18 query.setParameter("versionIndId", cluVersionIndId);
416  18 Clu clu = (Clu)query.getSingleResult();
417  18 return clu;
418    }
419   
 
420  226 toggle @Override
421    public Clu getCurrentCluVersion(String cluVersionIndId) {
422  226 Query query = em.createNamedQuery("Clu.findCurrentClu");
423  226 query.setParameter("versionIndId", cluVersionIndId);
424  226 query.setParameter("currentTime", new Date());
425  226 Clu clu = (Clu)query.getSingleResult();
426  226 return clu;
427    }
428   
 
429  37 toggle @Override
430    public VersionDisplayInfo getCurrentCluVersionInfo(String cluVersionIndId, String objectTypeURI) {
431  37 Query query = em.createNamedQuery("Clu.findCurrentVersionInfo");
432  37 query.setParameter("versionIndId", cluVersionIndId);
433  37 query.setParameter("currentTime", new Date());
434  37 VersionDisplayInfo versionDisplayInfo = (VersionDisplayInfo)query.getSingleResult();
435  36 versionDisplayInfo.setObjectTypeURI(objectTypeURI);
436  36 return versionDisplayInfo;
437    }
438   
 
439  5 toggle @Override
440    public VersionDisplayInfo getCurrentVersionOnDate(String versionIndId,
441    String objectTypeURI, Date date) {
442  5 Query query = em.createNamedQuery("Clu.findCurrentVersionOnDate");
443  5 query.setParameter("versionIndId", versionIndId);
444  5 query.setParameter("date", date);
445  5 VersionDisplayInfo versionDisplayInfo = (VersionDisplayInfo)query.getSingleResult();
446  5 versionDisplayInfo.setObjectTypeURI(objectTypeURI);
447  5 return versionDisplayInfo;
448    }
449   
 
450  2 toggle @Override
451    public VersionDisplayInfo getFirstVersion(String versionIndId,
452    String objectTypeURI) {
453  2 Query query = em.createNamedQuery("Clu.findFirstVersion");
454  2 query.setParameter("versionIndId", versionIndId);
455  2 VersionDisplayInfo versionDisplayInfo = (VersionDisplayInfo)query.getSingleResult();
456  2 versionDisplayInfo.setObjectTypeURI(objectTypeURI);
457  2 return versionDisplayInfo;
458    }
459   
 
460  1 toggle @Override
461    public VersionDisplayInfo getLatestVersion(String versionIndId,
462    String objectTypeURI) {
463  1 Query query = em.createNamedQuery("Clu.findLatestVersion");
464  1 query.setParameter("versionIndId", versionIndId);
465  1 VersionDisplayInfo versionDisplayInfo = (VersionDisplayInfo)query.getSingleResult();
466  1 versionDisplayInfo.setObjectTypeURI(objectTypeURI);
467  1 return versionDisplayInfo;
468    }
469   
 
470  2 toggle @Override
471    public VersionDisplayInfo getVersionBySequenceNumber(String versionIndId,
472    String objectTypeURI, Long sequenceNumber) {
473  2 Query query = em.createNamedQuery("Clu.findVersionBySequence");
474  2 query.setParameter("versionIndId", versionIndId);
475  2 query.setParameter("sequenceNumber", sequenceNumber);
476  2 VersionDisplayInfo versionDisplayInfo = (VersionDisplayInfo)query.getSingleResult();
477  2 versionDisplayInfo.setObjectTypeURI(objectTypeURI);
478  2 return versionDisplayInfo;
479    }
480   
 
481  3 toggle @Override
482    public List<VersionDisplayInfo> getVersions(String versionIndId,
483    String objectTypeURI) {
484  3 Query query = em.createNamedQuery("Clu.findVersions");
485  3 query.setParameter("versionIndId", versionIndId);
486  3 List<VersionDisplayInfo> versionDisplayInfos = (List<VersionDisplayInfo>)query.getResultList();
487  3 if(versionDisplayInfos==null){
488  0 versionDisplayInfos = Collections.emptyList();
489    }
490  3 for(VersionDisplayInfo versionDisplayInfo:versionDisplayInfos){
491  9 versionDisplayInfo.setObjectTypeURI(objectTypeURI);
492    }
493  3 return versionDisplayInfos;
494    }
495   
 
496  13 toggle @Override
497    public List<VersionDisplayInfo> getVersionsInDateRange(String versionIndId,
498    String objectTypeURI, Date from, Date to) {
499  13 if(from==null&&to==null){
500  0 throw new IllegalArgumentException("from and to dates can not both be null");
501    }
502  13 Query query;
503  13 if(from==null){
504  0 query = em.createNamedQuery("Clu.findVersionsBeforeDate");
505  0 query.setParameter("versionIndId", versionIndId);
506  0 query.setParameter("date", to);
507  13 }else if(to==null){
508  7 query = em.createNamedQuery("Clu.findVersionsAfterDate");
509  7 query.setParameter("versionIndId", versionIndId);
510  7 query.setParameter("date", from);
511    }else{
512  6 query = em.createNamedQuery("Clu.findVersionsInDateRange");
513  6 query.setParameter("versionIndId", versionIndId);
514  6 query.setParameter("from", from);
515  6 query.setParameter("to", to);
516    }
517   
518  13 List<VersionDisplayInfo> versionDisplayInfos = (List<VersionDisplayInfo>)query.getResultList();
519  13 if(versionDisplayInfos==null){
520  0 versionDisplayInfos = Collections.emptyList();
521    }
522  13 for(VersionDisplayInfo versionDisplayInfo:versionDisplayInfos){
523  9 versionDisplayInfo.setObjectTypeURI(objectTypeURI);
524    }
525  13 return versionDisplayInfos;
526    }
527   
 
528  1 toggle @Override
529    public List<CluPublication> getCluPublicationsByType(
530    String luPublicationTypeKey) {
531  1 Query query = em.createNamedQuery("CluPublication.findCluPublicationsByType");
532  1 query.setParameter("luPublicationTypeKey", luPublicationTypeKey);
533  1 List<CluPublication> cluPublications = query.getResultList();
534  1 return cluPublications;
535    }
536   
 
537  185 toggle @Override
538    public List<CluPublication> getCluPublicationsByCluId(String cluId) {
539  185 Query query = em.createNamedQuery("CluPublication.findPublicationsByCluId");
540  185 query.setParameter("cluId", cluId);
541  185 List<CluPublication> cluPublications = query.getResultList();
542  185 return cluPublications;
543    }
544   
 
545  0 toggle @Override
546    public List<CluSet> getCluSetsByCluVersionIndId(List<String> cluVersionIndIds) {
547  0 Query query = em.createNamedQuery("CluSet.findCluSetsByCluVersionIndIds");
548  0 query.setParameter("cluVersionIndIds", cluVersionIndIds);
549  0 List<CluSet> cluSetIds = query.getResultList();
550  0 return cluSetIds;
551    }
552   
 
553  0 toggle @Override
554    public List<CluSet> getAllDynamicCluSets() {
555  0 Query query = em.createNamedQuery("CluSet.findAllDynamicCluSets");
556  0 List<CluSet> cluSetIds = query.getResultList();
557  0 return cluSetIds;
558    }
559   
 
560  0 toggle @Override
561    public List<Clu> getCrossListedClusByCodes(List<String> crossListedCodes) {
562  0 if(crossListedCodes!=null && crossListedCodes.isEmpty()){
563  0 crossListedCodes.add(""); //Add a blank param value because jpql IN(:var) has problems with empty lists
564    }
565  0 Query query = em.createNamedQuery("Clu.getCrossListedClusByCodes");
566  0 query.setParameter("crossListedCodes", crossListedCodes);
567  0 List<Clu> clus = query.getResultList();
568  0 return clus;
569    }
570   
571    }